From 359c0eb498ddf54699c24341ee0ba10089137e3a Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Wed, 31 Aug 2022 14:23:19 -0700 Subject: [PATCH] Remove beta features from main (#25795) * initial commit * lint * build fix * generated code * Apply suggestions from code review * lint * 11.2.2 models * generated * changes * lint * lint * tests fix * doc fix * tests fix * docs fix * recordings * callable --- .../azure-search-documents/CHANGELOG.md | 2 +- .../azure/search/documents/_api_versions.py | 3 +- .../search/documents/_generated/__init__.py | 9 +- .../documents/_generated/_configuration.py | 11 +- .../search/documents/_generated/_patch.py | 31 - .../documents/_generated/_search_client.py | 66 +- .../search/documents/_generated/_vendor.py | 27 - .../documents/_generated/aio/__init__.py | 5 - .../_generated/aio/_configuration.py | 11 +- .../search/documents/_generated/aio/_patch.py | 31 - .../_generated/aio/_search_client.py | 62 +- .../aio/operations/_documents_operations.py | 619 +- .../documents/_generated/models/__init__.py | 20 - .../documents/_generated/models/_models.py | 982 +-- .../_generated/models/_models_py3.py | 998 +-- .../_generated/models/_search_client_enums.py | 242 +- .../operations/_documents_operations.py | 1049 +-- .../search/documents/_generated/py.typed | 1 - .../azure/search/documents/_paging.py | 11 - .../azure/search/documents/_search_client.py | 74 +- .../_search_indexing_buffered_sender.py | 12 +- .../azure/search/documents/_version.py | 2 +- .../azure/search/documents/aio/_paging.py | 17 +- .../documents/aio/_search_client_async.py | 74 +- .../_search_indexing_buffered_sender_async.py | 21 +- .../documents/indexes/_generated/__init__.py | 9 +- .../indexes/_generated/_configuration.py | 11 +- .../documents/indexes/_generated/_patch.py | 31 - .../indexes/_generated/_search_client.py | 91 +- .../documents/indexes/_generated/_vendor.py | 27 - .../indexes/_generated/aio/__init__.py | 5 - .../indexes/_generated/aio/_configuration.py | 11 +- .../indexes/_generated/aio/_patch.py | 31 - .../indexes/_generated/aio/_search_client.py | 87 +- .../_generated/aio/operations/__init__.py | 2 - .../aio/operations/_aliases_operations.py | 430 -- .../operations/_data_sources_operations.py | 285 +- .../aio/operations/_indexers_operations.py | 495 +- .../aio/operations/_indexes_operations.py | 419 +- .../operations/_search_client_operations.py | 53 +- .../aio/operations/_skillsets_operations.py | 358 +- .../operations/_synonym_maps_operations.py | 281 +- .../indexes/_generated/models/__init__.py | 70 - .../indexes/_generated/models/_models.py | 5718 ++++------------ .../indexes/_generated/models/_models_py3.py | 5783 ++++------------- .../_generated/models/_search_client_enums.py | 184 +- .../indexes/_generated/operations/__init__.py | 2 - .../operations/_aliases_operations.py | 630 -- .../operations/_data_sources_operations.py | 484 +- .../operations/_indexers_operations.py | 848 +-- .../operations/_indexes_operations.py | 689 +- .../operations/_search_client_operations.py | 88 +- .../operations/_skillsets_operations.py | 600 +- .../operations/_synonym_maps_operations.py | 477 +- .../documents/indexes/_generated/py.typed | 1 - .../documents/indexes/_search_index_client.py | 153 +- .../indexes/_search_indexer_client.py | 123 +- .../indexes/aio/_search_index_client.py | 154 +- .../indexes/aio/_search_indexer_client.py | 82 +- .../documents/indexes/models/__init__.py | 59 +- .../search/documents/indexes/models/_index.py | 150 +- .../documents/indexes/models/_models.py | 581 +- .../azure/search/documents/models/__init__.py | 16 +- ...st_search_index_client_alias_live_async.py | 108 - ...search_index_client_skillset_live_async.py | 29 +- ...estSearchClientAsynctest_get_document.json | 20 +- ...rchClientAsynctest_get_document_count.json | 2 +- ...hClientAsynctest_get_document_missing.json | 2 +- ...t_search_client_index_buffered_sender.json | 54 +- ...synctest_search_client_index_document.json | 50 +- ...TestClientTestAsynctest_search_client.json | 28 +- ...ientTestAsynctest_search_client_large.json | 6 +- ...ync.pyTestSearchClientAliastest_alias.json | 992 --- ...lientDataSourcesAsynctest_data_source.json | 58 +- ...exClientAsynctest_search_index_client.json | 48 +- ...archClientSkillsetstest_skillset_crud.json | 80 +- ...archClientSynonymMapstest_synonym_map.json | 72 +- ...erClientTestAsynctest_search_indexers.json | 168 +- ...e.pyTestSearchClienttest_get_document.json | 20 +- ...stSearchClienttest_get_document_count.json | 2 +- ...SearchClienttest_get_document_missing.json | 2 +- ...t_search_client_index_buffered_sender.json | 54 +- ...menttest_search_client_index_document.json | 52 +- ....pyTestSearchClienttest_search_client.json | 28 +- ...ive.pyTestSearchClientAliastest_alias.json | 1006 --- ...archClientDataSourcestest_data_source.json | 64 +- ...chIndexClienttest_search_index_client.json | 48 +- ...yTestSearchSkillsettest_skillset_crud.json | 80 +- ...archClientSynonymMapstest_synonym_map.json | 72 +- ...IndexerClientTesttest_search_indexers.json | 168 +- .../tests/search_service_preparer.py | 3 - .../test_search_index_client_alias_live.py | 105 - .../test_search_index_client_skillset_live.py | 39 +- 93 files changed, 6349 insertions(+), 21009 deletions(-) delete mode 100644 sdk/search/azure-search-documents/azure/search/documents/_generated/_patch.py delete mode 100644 sdk/search/azure-search-documents/azure/search/documents/_generated/_vendor.py delete mode 100644 sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_patch.py delete mode 100644 sdk/search/azure-search-documents/azure/search/documents/_generated/py.typed delete mode 100644 sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_patch.py delete mode 100644 sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_vendor.py delete mode 100644 sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/_patch.py delete mode 100644 sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_aliases_operations.py delete mode 100644 sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_aliases_operations.py delete mode 100644 sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/py.typed delete mode 100644 sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_alias_live_async.py delete mode 100644 sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_alias_live_async.pyTestSearchClientAliastest_alias.json delete mode 100644 sdk/search/azure-search-documents/tests/recordings/test_search_index_client_alias_live.pyTestSearchClientAliastest_alias.json delete mode 100644 sdk/search/azure-search-documents/tests/test_search_index_client_alias_live.py diff --git a/sdk/search/azure-search-documents/CHANGELOG.md b/sdk/search/azure-search-documents/CHANGELOG.md index cc73ac333adb..6e166adfa2f5 100644 --- a/sdk/search/azure-search-documents/CHANGELOG.md +++ b/sdk/search/azure-search-documents/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 11.3.0b9 (Unreleased) +## 11.3.0 (Unreleased) ### Features Added - Added support for other national clouds. diff --git a/sdk/search/azure-search-documents/azure/search/documents/_api_versions.py b/sdk/search/azure-search-documents/azure/search/documents/_api_versions.py index 3022ed5208b8..baa8535e581d 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_api_versions.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_api_versions.py @@ -9,7 +9,6 @@ class ApiVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): #: this is the default version V2020_06_30 = "2020-06-30" - V2021_04_30_PREVIEW = "2021-04-30-Preview" -DEFAULT_VERSION = ApiVersion.V2021_04_30_PREVIEW +DEFAULT_VERSION = ApiVersion.V2020_06_30 diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/__init__.py index f7a9a21f5fab..d58f5fc3b7f8 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_generated/__init__.py @@ -9,7 +9,8 @@ from ._search_client import SearchClient __all__ = ['SearchClient'] -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/_configuration.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/_configuration.py index d828b3b9856e..fddf92d233ee 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/_configuration.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_generated/_configuration.py @@ -17,7 +17,7 @@ VERSION = "unknown" -class SearchClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes +class SearchClientConfiguration(Configuration): """Configuration for SearchClient. Note that all parameters used to create this instance are saved as instance @@ -27,9 +27,6 @@ class SearchClientConfiguration(Configuration): # pylint: disable=too-many-inst :type endpoint: str :param index_name: The name of the index. :type index_name: str - :keyword api_version: Api Version. The default value is "2021-04-30-Preview". Note that - overriding this default value may result in unsupported behavior. - :paramtype api_version: str """ def __init__( @@ -39,17 +36,15 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - super(SearchClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") if index_name is None: raise ValueError("Parameter 'index_name' must not be None.") + super(SearchClientConfiguration, self).__init__(**kwargs) self.endpoint = endpoint self.index_name = index_name - self.api_version = api_version + self.api_version = "2020-06-30" kwargs.setdefault('sdk_moniker', 'search-documents/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/_patch.py deleted file mode 100644 index 74e48ecd07cf..000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/_patch.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- - -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -def patch_sdk(): - pass \ No newline at end of file diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/_search_client.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/_search_client.py index e76c9d80a07d..cf5857632715 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/_search_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_generated/_search_client.py @@ -6,22 +6,21 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from copy import deepcopy from typing import TYPE_CHECKING -from msrest import Deserializer, Serializer - from azure.core import PipelineClient - -from . import models -from ._configuration import SearchClientConfiguration -from .operations import DocumentsOperations +from msrest import Deserializer, Serializer if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any - from azure.core.rest import HttpRequest, HttpResponse + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import SearchClientConfiguration +from .operations import DocumentsOperations +from . import models + class SearchClient(object): """Client that can be used to query an index and upload, merge, or delete documents. @@ -32,9 +31,6 @@ class SearchClient(object): :type endpoint: str :param index_name: The name of the index. :type index_name: str - :keyword api_version: Api Version. The default value is "2021-04-30-Preview". Note that - overriding this default value may result in unsupported behavior. - :paramtype api_version: str """ def __init__( @@ -44,48 +40,36 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - _base_url = '{endpoint}/indexes(\'{indexName}\')' - self._config = SearchClientConfiguration(endpoint=endpoint, index_name=index_name, **kwargs) - self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs) + base_url = '{endpoint}/indexes(\'{indexName}\')' + self._config = SearchClientConfiguration(endpoint, index_name, **kwargs) + self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - self.documents = DocumentsOperations(self._client, self._config, self._serialize, self._deserialize) + self._deserialize = Deserializer(client_models) + self.documents = DocumentsOperations( + self._client, self._config, self._serialize, self._deserialize) - def _send_request( - self, - request, # type: HttpRequest - **kwargs # type: Any - ): - # type: (...) -> HttpResponse + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse """Runs the network request through the client's chained policies. - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = client._send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.HttpResponse + :rtype: ~azure.core.pipeline.transport.HttpResponse """ - - request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - - request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) - return self._client.send_request(request_copy, **kwargs) + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response def close(self): # type: () -> None diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/_vendor.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/_vendor.py deleted file mode 100644 index 138f663c53a4..000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/_vendor.py +++ /dev/null @@ -1,27 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.core.pipeline.transport import HttpRequest - -def _convert_request(request, files=None): - data = request.content if not files else None - request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) - if files: - request.set_formdata_body(files) - return request - -def _format_url_section(template, **kwargs): - components = template.split("/") - while components: - try: - return template.format(**kwargs) - except KeyError as key: - formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] - template = "/".join(components) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/__init__.py index f7a9a21f5fab..ec41d54fc046 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/__init__.py @@ -8,8 +8,3 @@ from ._search_client import SearchClient __all__ = ['SearchClient'] - -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_configuration.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_configuration.py index 8ec5557ca686..9d23ae394f82 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_configuration.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_configuration.py @@ -13,7 +13,7 @@ VERSION = "unknown" -class SearchClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes +class SearchClientConfiguration(Configuration): """Configuration for SearchClient. Note that all parameters used to create this instance are saved as instance @@ -23,9 +23,6 @@ class SearchClientConfiguration(Configuration): # pylint: disable=too-many-inst :type endpoint: str :param index_name: The name of the index. :type index_name: str - :keyword api_version: Api Version. The default value is "2021-04-30-Preview". Note that - overriding this default value may result in unsupported behavior. - :paramtype api_version: str """ def __init__( @@ -34,17 +31,15 @@ def __init__( index_name: str, **kwargs: Any ) -> None: - super(SearchClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") if index_name is None: raise ValueError("Parameter 'index_name' must not be None.") + super(SearchClientConfiguration, self).__init__(**kwargs) self.endpoint = endpoint self.index_name = index_name - self.api_version = api_version + self.api_version = "2020-06-30" kwargs.setdefault('sdk_moniker', 'search-documents/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_patch.py deleted file mode 100644 index 74e48ecd07cf..000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_patch.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- - -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -def patch_sdk(): - pass \ No newline at end of file diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_search_client.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_search_client.py index 60afdefd8742..7799d633940a 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_search_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/_search_client.py @@ -6,19 +6,18 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from copy import deepcopy -from typing import Any, Awaitable - -from msrest import Deserializer, Serializer +from typing import Any from azure.core import AsyncPipelineClient -from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from msrest import Deserializer, Serializer -from .. import models from ._configuration import SearchClientConfiguration from .operations import DocumentsOperations +from .. import models + -class SearchClient: +class SearchClient(object): """Client that can be used to query an index and upload, merge, or delete documents. :ivar documents: DocumentsOperations operations @@ -27,9 +26,6 @@ class SearchClient: :type endpoint: str :param index_name: The name of the index. :type index_name: str - :keyword api_version: Api Version. The default value is "2021-04-30-Preview". Note that - overriding this default value may result in unsupported behavior. - :paramtype api_version: str """ def __init__( @@ -38,47 +34,35 @@ def __init__( index_name: str, **kwargs: Any ) -> None: - _base_url = '{endpoint}/indexes(\'{indexName}\')' - self._config = SearchClientConfiguration(endpoint=endpoint, index_name=index_name, **kwargs) - self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs) + base_url = '{endpoint}/indexes(\'{indexName}\')' + self._config = SearchClientConfiguration(endpoint, index_name, **kwargs) + self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - self.documents = DocumentsOperations(self._client, self._config, self._serialize, self._deserialize) + self._deserialize = Deserializer(client_models) + self.documents = DocumentsOperations( + self._client, self._config, self._serialize, self._deserialize) - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = await client._send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.AsyncHttpResponse + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse """ - - request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - - request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) - return self._client.send_request(request_copy, **kwargs) + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response async def close(self) -> None: await self._client.close() diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/operations/_documents_operations.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/operations/_documents_operations.py index d75ef016e795..792a75ab8814 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/operations/_documents_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_generated/aio/operations/_documents_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,17 +5,15 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, List, Optional, TypeVar +from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -from ..._vendor import _convert_request -from ...operations._documents_operations import build_autocomplete_get_request, build_autocomplete_post_request, build_count_request, build_get_request, build_index_request, build_search_get_request, build_search_post_request, build_suggest_get_request, build_suggest_post_request + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +39,6 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - @distributed_trace_async async def count( self, request_options: Optional["_models.RequestOptions"] = None, @@ -62,35 +58,38 @@ async def count( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_count_request( - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.count.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.count.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('long', pipeline_response) @@ -99,11 +98,8 @@ async def count( return cls(pipeline_response, deserialized, {}) return deserialized + count.metadata = {'url': '/docs/$count'} # type: ignore - count.metadata = {'url': "/docs/$count"} # type: ignore - - - @distributed_trace_async async def search_get( self, search_text: Optional[str] = None, @@ -130,9 +126,7 @@ async def search_get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _include_total_result_count = None _facets = None _filter = None @@ -144,20 +138,16 @@ async def search_get( _query_type = None _scoring_parameters = None _scoring_profile = None - _semantic_configuration = None _search_fields = None - _query_language = None - _speller = None - _answers = None _search_mode = None _scoring_statistics = None _session_id = None _select = None _skip = None _top = None - _captions = None - _semantic_fields = None _x_ms_client_request_id = None + if request_options is not None: + _x_ms_client_request_id = request_options.x_ms_client_request_id if search_options is not None: _include_total_result_count = search_options.include_total_result_count _facets = search_options.facets @@ -170,69 +160,79 @@ async def search_get( _query_type = search_options.query_type _scoring_parameters = search_options.scoring_parameters _scoring_profile = search_options.scoring_profile - _semantic_configuration = search_options.semantic_configuration _search_fields = search_options.search_fields - _query_language = search_options.query_language - _speller = search_options.speller - _answers = search_options.answers _search_mode = search_options.search_mode _scoring_statistics = search_options.scoring_statistics _session_id = search_options.session_id _select = search_options.select _skip = search_options.skip _top = search_options.top - _captions = search_options.captions - _semantic_fields = search_options.semantic_fields - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_search_get_request( - api_version=api_version, - search_text=search_text, - include_total_result_count=_include_total_result_count, - facets=_facets, - filter=_filter, - highlight_fields=_highlight_fields, - highlight_post_tag=_highlight_post_tag, - highlight_pre_tag=_highlight_pre_tag, - minimum_coverage=_minimum_coverage, - order_by=_order_by, - query_type=_query_type, - scoring_parameters=_scoring_parameters, - scoring_profile=_scoring_profile, - semantic_configuration=_semantic_configuration, - search_fields=_search_fields, - query_language=_query_language, - speller=_speller, - answers=_answers, - search_mode=_search_mode, - scoring_statistics=_scoring_statistics, - session_id=_session_id, - select=_select, - skip=_skip, - top=_top, - captions=_captions, - semantic_fields=_semantic_fields, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.search_get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.search_get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if search_text is not None: + query_parameters['search'] = self._serialize.query("search_text", search_text, 'str') + if _include_total_result_count is not None: + query_parameters['$count'] = self._serialize.query("include_total_result_count", _include_total_result_count, 'bool') + if _facets is not None: + query_parameters['facet'] = [self._serialize.query("facets", q, 'str') if q is not None else '' for q in _facets] + if _filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", _filter, 'str') + if _highlight_fields is not None: + query_parameters['highlight'] = self._serialize.query("highlight_fields", _highlight_fields, '[str]', div=',') + if _highlight_post_tag is not None: + query_parameters['highlightPostTag'] = self._serialize.query("highlight_post_tag", _highlight_post_tag, 'str') + if _highlight_pre_tag is not None: + query_parameters['highlightPreTag'] = self._serialize.query("highlight_pre_tag", _highlight_pre_tag, 'str') + if _minimum_coverage is not None: + query_parameters['minimumCoverage'] = self._serialize.query("minimum_coverage", _minimum_coverage, 'float') + if _order_by is not None: + query_parameters['$orderby'] = self._serialize.query("order_by", _order_by, '[str]', div=',') + if _query_type is not None: + query_parameters['queryType'] = self._serialize.query("query_type", _query_type, 'str') + if _scoring_parameters is not None: + query_parameters['scoringParameter'] = [self._serialize.query("scoring_parameters", q, 'str') if q is not None else '' for q in _scoring_parameters] + if _scoring_profile is not None: + query_parameters['scoringProfile'] = self._serialize.query("scoring_profile", _scoring_profile, 'str') + if _search_fields is not None: + query_parameters['searchFields'] = self._serialize.query("search_fields", _search_fields, '[str]', div=',') + if _search_mode is not None: + query_parameters['searchMode'] = self._serialize.query("search_mode", _search_mode, 'str') + if _scoring_statistics is not None: + query_parameters['scoringStatistics'] = self._serialize.query("scoring_statistics", _scoring_statistics, 'str') + if _session_id is not None: + query_parameters['sessionId'] = self._serialize.query("session_id", _session_id, 'str') + if _select is not None: + query_parameters['$select'] = self._serialize.query("select", _select, '[str]', div=',') + if _skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", _skip, 'int') + if _top is not None: + query_parameters['$top'] = self._serialize.query("top", _top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchDocumentsResult', pipeline_response) @@ -241,11 +241,8 @@ async def search_get( return cls(pipeline_response, deserialized, {}) return deserialized + search_get.metadata = {'url': '/docs'} # type: ignore - search_get.metadata = {'url': "/docs"} # type: ignore - - - @distributed_trace_async async def search_post( self, search_request: "_models.SearchRequest", @@ -268,39 +265,43 @@ async def search_post( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(search_request, 'SearchRequest') - - request = build_search_post_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.search_post.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.search_post.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(search_request, 'SearchRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchDocumentsResult', pipeline_response) @@ -309,11 +310,8 @@ async def search_post( return cls(pipeline_response, deserialized, {}) return deserialized + search_post.metadata = {'url': '/docs/search.post.search'} # type: ignore - search_post.metadata = {'url': "/docs/search.post.search"} # type: ignore - - - @distributed_trace_async async def get( self, key: str, @@ -340,37 +338,41 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_request( - key=key, - api_version=api_version, - selected_fields=selected_fields, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'key': self._serialize.url("key", key, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if selected_fields is not None: + query_parameters['$select'] = self._serialize.query("selected_fields", selected_fields, '[str]', div=',') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('object', pipeline_response) @@ -379,11 +381,8 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/docs(\'{key}\')'} # type: ignore - get.metadata = {'url': "/docs(\'{key}\')"} # type: ignore - - - @distributed_trace_async async def suggest_get( self, search_text: str, @@ -414,9 +413,7 @@ async def suggest_get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _filter = None _use_fuzzy_matching = None _highlight_post_tag = None @@ -427,6 +424,8 @@ async def suggest_get( _select = None _top = None _x_ms_client_request_id = None + if request_options is not None: + _x_ms_client_request_id = request_options.x_ms_client_request_id if suggest_options is not None: _filter = suggest_options.filter _use_fuzzy_matching = suggest_options.use_fuzzy_matching @@ -437,42 +436,54 @@ async def suggest_get( _search_fields = suggest_options.search_fields _select = suggest_options.select _top = suggest_options.top - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_suggest_get_request( - api_version=api_version, - search_text=search_text, - suggester_name=suggester_name, - filter=_filter, - use_fuzzy_matching=_use_fuzzy_matching, - highlight_post_tag=_highlight_post_tag, - highlight_pre_tag=_highlight_pre_tag, - minimum_coverage=_minimum_coverage, - order_by=_order_by, - search_fields=_search_fields, - select=_select, - top=_top, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.suggest_get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.suggest_get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['search'] = self._serialize.query("search_text", search_text, 'str') + query_parameters['suggesterName'] = self._serialize.query("suggester_name", suggester_name, 'str') + if _filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", _filter, 'str') + if _use_fuzzy_matching is not None: + query_parameters['fuzzy'] = self._serialize.query("use_fuzzy_matching", _use_fuzzy_matching, 'bool') + if _highlight_post_tag is not None: + query_parameters['highlightPostTag'] = self._serialize.query("highlight_post_tag", _highlight_post_tag, 'str') + if _highlight_pre_tag is not None: + query_parameters['highlightPreTag'] = self._serialize.query("highlight_pre_tag", _highlight_pre_tag, 'str') + if _minimum_coverage is not None: + query_parameters['minimumCoverage'] = self._serialize.query("minimum_coverage", _minimum_coverage, 'float') + if _order_by is not None: + query_parameters['$orderby'] = self._serialize.query("order_by", _order_by, '[str]', div=',') + if _search_fields is not None: + query_parameters['searchFields'] = self._serialize.query("search_fields", _search_fields, '[str]', div=',') + if _select is not None: + query_parameters['$select'] = self._serialize.query("select", _select, '[str]', div=',') + if _top is not None: + query_parameters['$top'] = self._serialize.query("top", _top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SuggestDocumentsResult', pipeline_response) @@ -481,11 +492,8 @@ async def suggest_get( return cls(pipeline_response, deserialized, {}) return deserialized + suggest_get.metadata = {'url': '/docs/search.suggest'} # type: ignore - suggest_get.metadata = {'url': "/docs/search.suggest"} # type: ignore - - - @distributed_trace_async async def suggest_post( self, suggest_request: "_models.SuggestRequest", @@ -508,39 +516,43 @@ async def suggest_post( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(suggest_request, 'SuggestRequest') - - request = build_suggest_post_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.suggest_post.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.suggest_post.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(suggest_request, 'SuggestRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SuggestDocumentsResult', pipeline_response) @@ -549,11 +561,8 @@ async def suggest_post( return cls(pipeline_response, deserialized, {}) return deserialized + suggest_post.metadata = {'url': '/docs/search.post.suggest'} # type: ignore - suggest_post.metadata = {'url': "/docs/search.post.suggest"} # type: ignore - - - @distributed_trace_async async def index( self, actions: List["_models.IndexAction"], @@ -576,40 +585,45 @@ async def index( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + _batch = _models.IndexBatch(actions=actions) - _json = self._serialize.body(_batch, 'IndexBatch') - - request = build_index_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.index.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.index.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_batch, 'IndexBatch') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 207]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -622,11 +636,8 @@ async def index( return cls(pipeline_response, deserialized, {}) return deserialized + index.metadata = {'url': '/docs/search.index'} # type: ignore - index.metadata = {'url': "/docs/search.index"} # type: ignore - - - @distributed_trace_async async def autocomplete_get( self, search_text: str, @@ -656,9 +667,7 @@ async def autocomplete_get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None _autocomplete_mode = None _filter = None @@ -668,8 +677,6 @@ async def autocomplete_get( _minimum_coverage = None _search_fields = None _top = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id if autocomplete_options is not None: _autocomplete_mode = autocomplete_options.autocomplete_mode _filter = autocomplete_options.filter @@ -679,39 +686,54 @@ async def autocomplete_get( _minimum_coverage = autocomplete_options.minimum_coverage _search_fields = autocomplete_options.search_fields _top = autocomplete_options.top + if request_options is not None: + _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_autocomplete_get_request( - api_version=api_version, - search_text=search_text, - suggester_name=suggester_name, - x_ms_client_request_id=_x_ms_client_request_id, - autocomplete_mode=_autocomplete_mode, - filter=_filter, - use_fuzzy_matching=_use_fuzzy_matching, - highlight_post_tag=_highlight_post_tag, - highlight_pre_tag=_highlight_pre_tag, - minimum_coverage=_minimum_coverage, - search_fields=_search_fields, - top=_top, - template_url=self.autocomplete_get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.autocomplete_get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['search'] = self._serialize.query("search_text", search_text, 'str') + query_parameters['suggesterName'] = self._serialize.query("suggester_name", suggester_name, 'str') + if _autocomplete_mode is not None: + query_parameters['autocompleteMode'] = self._serialize.query("autocomplete_mode", _autocomplete_mode, 'str') + if _filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", _filter, 'str') + if _use_fuzzy_matching is not None: + query_parameters['fuzzy'] = self._serialize.query("use_fuzzy_matching", _use_fuzzy_matching, 'bool') + if _highlight_post_tag is not None: + query_parameters['highlightPostTag'] = self._serialize.query("highlight_post_tag", _highlight_post_tag, 'str') + if _highlight_pre_tag is not None: + query_parameters['highlightPreTag'] = self._serialize.query("highlight_pre_tag", _highlight_pre_tag, 'str') + if _minimum_coverage is not None: + query_parameters['minimumCoverage'] = self._serialize.query("minimum_coverage", _minimum_coverage, 'float') + if _search_fields is not None: + query_parameters['searchFields'] = self._serialize.query("search_fields", _search_fields, '[str]', div=',') + if _top is not None: + query_parameters['$top'] = self._serialize.query("top", _top, 'int') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AutocompleteResult', pipeline_response) @@ -720,11 +742,8 @@ async def autocomplete_get( return cls(pipeline_response, deserialized, {}) return deserialized + autocomplete_get.metadata = {'url': '/docs/search.autocomplete'} # type: ignore - autocomplete_get.metadata = {'url': "/docs/search.autocomplete"} # type: ignore - - - @distributed_trace_async async def autocomplete_post( self, autocomplete_request: "_models.AutocompleteRequest", @@ -747,39 +766,43 @@ async def autocomplete_post( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(autocomplete_request, 'AutocompleteRequest') - - request = build_autocomplete_post_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.autocomplete_post.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.autocomplete_post.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(autocomplete_request, 'AutocompleteRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AutocompleteResult', pipeline_response) @@ -788,6 +811,4 @@ async def autocomplete_post( return cls(pipeline_response, deserialized, {}) return deserialized - - autocomplete_post.metadata = {'url': "/docs/search.post.autocomplete"} # type: ignore - + autocomplete_post.metadata = {'url': '/docs/search.post.autocomplete'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/models/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/models/__init__.py index 014f69d11880..abb65d224c74 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/models/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_generated/models/__init__.py @@ -7,12 +7,10 @@ # -------------------------------------------------------------------------- try: - from ._models_py3 import AnswerResult from ._models_py3 import AutocompleteItem from ._models_py3 import AutocompleteOptions from ._models_py3 import AutocompleteRequest from ._models_py3 import AutocompleteResult - from ._models_py3 import CaptionResult from ._models_py3 import FacetResult from ._models_py3 import IndexAction from ._models_py3 import IndexBatch @@ -29,12 +27,10 @@ from ._models_py3 import SuggestRequest from ._models_py3 import SuggestResult except (SyntaxError, ImportError): - from ._models import AnswerResult # type: ignore from ._models import AutocompleteItem # type: ignore from ._models import AutocompleteOptions # type: ignore from ._models import AutocompleteRequest # type: ignore from ._models import AutocompleteResult # type: ignore - from ._models import CaptionResult # type: ignore from ._models import FacetResult # type: ignore from ._models import IndexAction # type: ignore from ._models import IndexBatch # type: ignore @@ -52,27 +48,18 @@ from ._models import SuggestResult # type: ignore from ._search_client_enums import ( - Answers, AutocompleteMode, - Captions, IndexActionType, - QueryAnswerType, - QueryCaptionType, - QueryLanguage, - QuerySpellerType, QueryType, ScoringStatistics, SearchMode, - Speller, ) __all__ = [ - 'AnswerResult', 'AutocompleteItem', 'AutocompleteOptions', 'AutocompleteRequest', 'AutocompleteResult', - 'CaptionResult', 'FacetResult', 'IndexAction', 'IndexBatch', @@ -88,16 +75,9 @@ 'SuggestOptions', 'SuggestRequest', 'SuggestResult', - 'Answers', 'AutocompleteMode', - 'Captions', 'IndexActionType', - 'QueryAnswerType', - 'QueryCaptionType', - 'QueryLanguage', - 'QuerySpellerType', 'QueryType', 'ScoringStatistics', 'SearchMode', - 'Speller', ] diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/models/_models.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/models/_models.py index 610190aa816a..2db90ad23359 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/models/_models.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_generated/models/_models.py @@ -10,58 +10,6 @@ import msrest.serialization -class AnswerResult(msrest.serialization.Model): - """An answer is a text passage extracted from the contents of the most relevant documents that matched the query. Answers are extracted from the top search results. Answer candidates are scored and the top answers are selected. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar additional_properties: Unmatched properties from the message are deserialized to this - collection. - :vartype additional_properties: dict[str, any] - :ivar score: The score value represents how relevant the answer is to the query relative to - other answers returned for the query. - :vartype score: float - :ivar key: The key of the document the answer was extracted from. - :vartype key: str - :ivar text: The text passage extracted from the document contents as the answer. - :vartype text: str - :ivar highlights: Same text passage as in the Text property with highlighted text phrases most - relevant to the query. - :vartype highlights: str - """ - - _validation = { - 'score': {'readonly': True}, - 'key': {'readonly': True}, - 'text': {'readonly': True}, - 'highlights': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'score': {'key': 'score', 'type': 'float'}, - 'key': {'key': 'key', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'highlights': {'key': 'highlights', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - """ - super(AnswerResult, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.score = None - self.key = None - self.text = None - self.highlights = None - - class AutocompleteItem(msrest.serialization.Model): """The result of Autocomplete requests. @@ -89,8 +37,6 @@ def __init__( self, **kwargs ): - """ - """ super(AutocompleteItem, self).__init__(**kwargs) self.text = None self.query_plus_text = None @@ -99,36 +45,36 @@ def __init__( class AutocompleteOptions(msrest.serialization.Model): """Parameter group. - :ivar autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use + :param autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms. Possible values include: "oneTerm", "twoTerms", "oneTermWithContext". - :vartype autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode - :ivar filter: An OData expression that filters the documents used to produce completed terms + :type autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode + :param filter: An OData expression that filters the documents used to produce completed terms for the Autocomplete result. - :vartype filter: str - :ivar use_fuzzy_matching: A value indicating whether to use fuzzy matching for the autocomplete - query. Default is false. When set to true, the query will find terms even if there's a - substituted or missing character in the search text. While this provides a better experience in - some scenarios, it comes at a performance cost as fuzzy autocomplete queries are slower and - consume more resources. - :vartype use_fuzzy_matching: bool - :ivar highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :type filter: str + :param use_fuzzy_matching: A value indicating whether to use fuzzy matching for the + autocomplete query. Default is false. When set to true, the query will find terms even if + there's a substituted or missing character in the search text. While this provides a better + experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are + slower and consume more resources. + :type use_fuzzy_matching: bool + :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting is disabled. - :vartype highlight_post_tag: str - :ivar highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :type highlight_post_tag: str + :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting is disabled. - :vartype highlight_pre_tag: str - :ivar minimum_coverage: A number between 0 and 100 indicating the percentage of the index that + :type highlight_pre_tag: str + :param minimum_coverage: A number between 0 and 100 indicating the percentage of the index that must be covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. - :vartype minimum_coverage: float - :ivar search_fields: The list of field names to consider when querying for auto-completed + :type minimum_coverage: float + :param search_fields: The list of field names to consider when querying for auto-completed terms. Target fields must be included in the specified suggester. - :vartype search_fields: list[str] - :ivar top: The number of auto-completed terms to retrieve. This must be a value between 1 and + :type search_fields: list[str] + :param top: The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The default is 5. - :vartype top: int + :type top: int """ _attribute_map = { @@ -146,38 +92,6 @@ def __init__( self, **kwargs ): - """ - :keyword autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use - 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing - auto-completed terms. Possible values include: "oneTerm", "twoTerms", "oneTermWithContext". - :paramtype autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode - :keyword filter: An OData expression that filters the documents used to produce completed terms - for the Autocomplete result. - :paramtype filter: str - :keyword use_fuzzy_matching: A value indicating whether to use fuzzy matching for the - autocomplete query. Default is false. When set to true, the query will find terms even if - there's a substituted or missing character in the search text. While this provides a better - experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are - slower and consume more resources. - :paramtype use_fuzzy_matching: bool - :keyword highlight_post_tag: A string tag that is appended to hit highlights. Must be set with - highlightPreTag. If omitted, hit highlighting is disabled. - :paramtype highlight_post_tag: str - :keyword highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with - highlightPostTag. If omitted, hit highlighting is disabled. - :paramtype highlight_pre_tag: str - :keyword minimum_coverage: A number between 0 and 100 indicating the percentage of the index - that must be covered by an autocomplete query in order for the query to be reported as a - success. This parameter can be useful for ensuring search availability even for services with - only one replica. The default is 80. - :paramtype minimum_coverage: float - :keyword search_fields: The list of field names to consider when querying for auto-completed - terms. Target fields must be included in the specified suggester. - :paramtype search_fields: list[str] - :keyword top: The number of auto-completed terms to retrieve. This must be a value between 1 - and 100. The default is 5. - :paramtype top: int - """ super(AutocompleteOptions, self).__init__(**kwargs) self.autocomplete_mode = kwargs.get('autocomplete_mode', None) self.filter = kwargs.get('filter', None) @@ -194,41 +108,41 @@ class AutocompleteRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar search_text: Required. The search text on which to base autocomplete results. - :vartype search_text: str - :ivar autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use + :param search_text: Required. The search text on which to base autocomplete results. + :type search_text: str + :param autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms. Possible values include: "oneTerm", "twoTerms", "oneTermWithContext". - :vartype autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode - :ivar filter: An OData expression that filters the documents used to produce completed terms + :type autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode + :param filter: An OData expression that filters the documents used to produce completed terms for the Autocomplete result. - :vartype filter: str - :ivar use_fuzzy_matching: A value indicating whether to use fuzzy matching for the autocomplete - query. Default is false. When set to true, the query will autocomplete terms even if there's a - substituted or missing character in the search text. While this provides a better experience in - some scenarios, it comes at a performance cost as fuzzy autocomplete queries are slower and - consume more resources. - :vartype use_fuzzy_matching: bool - :ivar highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :type filter: str + :param use_fuzzy_matching: A value indicating whether to use fuzzy matching for the + autocomplete query. Default is false. When set to true, the query will autocomplete terms even + if there's a substituted or missing character in the search text. While this provides a better + experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are + slower and consume more resources. + :type use_fuzzy_matching: bool + :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting is disabled. - :vartype highlight_post_tag: str - :ivar highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :type highlight_post_tag: str + :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting is disabled. - :vartype highlight_pre_tag: str - :ivar minimum_coverage: A number between 0 and 100 indicating the percentage of the index that + :type highlight_pre_tag: str + :param minimum_coverage: A number between 0 and 100 indicating the percentage of the index that must be covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. - :vartype minimum_coverage: float - :ivar search_fields: The comma-separated list of field names to consider when querying for + :type minimum_coverage: float + :param search_fields: The comma-separated list of field names to consider when querying for auto-completed terms. Target fields must be included in the specified suggester. - :vartype search_fields: str - :ivar suggester_name: Required. The name of the suggester as specified in the suggesters + :type search_fields: str + :param suggester_name: Required. The name of the suggester as specified in the suggesters collection that's part of the index definition. - :vartype suggester_name: str - :ivar top: The number of auto-completed terms to retrieve. This must be a value between 1 and + :type suggester_name: str + :param top: The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The default is 5. - :vartype top: int + :type top: int """ _validation = { @@ -253,43 +167,6 @@ def __init__( self, **kwargs ): - """ - :keyword search_text: Required. The search text on which to base autocomplete results. - :paramtype search_text: str - :keyword autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use - 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing - auto-completed terms. Possible values include: "oneTerm", "twoTerms", "oneTermWithContext". - :paramtype autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode - :keyword filter: An OData expression that filters the documents used to produce completed terms - for the Autocomplete result. - :paramtype filter: str - :keyword use_fuzzy_matching: A value indicating whether to use fuzzy matching for the - autocomplete query. Default is false. When set to true, the query will autocomplete terms even - if there's a substituted or missing character in the search text. While this provides a better - experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are - slower and consume more resources. - :paramtype use_fuzzy_matching: bool - :keyword highlight_post_tag: A string tag that is appended to hit highlights. Must be set with - highlightPreTag. If omitted, hit highlighting is disabled. - :paramtype highlight_post_tag: str - :keyword highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with - highlightPostTag. If omitted, hit highlighting is disabled. - :paramtype highlight_pre_tag: str - :keyword minimum_coverage: A number between 0 and 100 indicating the percentage of the index - that must be covered by an autocomplete query in order for the query to be reported as a - success. This parameter can be useful for ensuring search availability even for services with - only one replica. The default is 80. - :paramtype minimum_coverage: float - :keyword search_fields: The comma-separated list of field names to consider when querying for - auto-completed terms. Target fields must be included in the specified suggester. - :paramtype search_fields: str - :keyword suggester_name: Required. The name of the suggester as specified in the suggesters - collection that's part of the index definition. - :paramtype suggester_name: str - :keyword top: The number of auto-completed terms to retrieve. This must be a value between 1 - and 100. The default is 5. - :paramtype top: int - """ super(AutocompleteRequest, self).__init__(**kwargs) self.search_text = kwargs['search_text'] self.autocomplete_mode = kwargs.get('autocomplete_mode', None) @@ -331,63 +208,19 @@ def __init__( self, **kwargs ): - """ - """ super(AutocompleteResult, self).__init__(**kwargs) self.coverage = None self.results = None -class CaptionResult(msrest.serialization.Model): - """Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'.. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar additional_properties: Unmatched properties from the message are deserialized to this - collection. - :vartype additional_properties: dict[str, any] - :ivar text: A representative text passage extracted from the document most relevant to the - search query. - :vartype text: str - :ivar highlights: Same text passage as in the Text property with highlighted phrases most - relevant to the query. - :vartype highlights: str - """ - - _validation = { - 'text': {'readonly': True}, - 'highlights': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'text': {'key': 'text', 'type': 'str'}, - 'highlights': {'key': 'highlights', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - """ - super(CaptionResult, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.text = None - self.highlights = None - - class FacetResult(msrest.serialization.Model): """A single bucket of a facet query result. Reports the number of documents with a field value falling within a particular range or having a particular value or interval. Variables are only populated by the server, and will be ignored when sending a request. - :ivar additional_properties: Unmatched properties from the message are deserialized to this + :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] + :type additional_properties: dict[str, any] :ivar count: The approximate count of documents falling within the bucket described by this facet. :vartype count: long @@ -406,11 +239,6 @@ def __init__( self, **kwargs ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - """ super(FacetResult, self).__init__(**kwargs) self.additional_properties = kwargs.get('additional_properties', None) self.count = None @@ -419,12 +247,12 @@ def __init__( class IndexAction(msrest.serialization.Model): """Represents an index action that operates on a document. - :ivar additional_properties: Unmatched properties from the message are deserialized to this + :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] - :ivar action_type: The operation to perform on a document in an indexing batch. Possible values - include: "upload", "merge", "mergeOrUpload", "delete". - :vartype action_type: str or ~azure.search.documents.models.IndexActionType + :type additional_properties: dict[str, any] + :param action_type: The operation to perform on a document in an indexing batch. Possible + values include: "upload", "merge", "mergeOrUpload", "delete". + :type action_type: str or ~azure.search.documents.models.IndexActionType """ _attribute_map = { @@ -436,14 +264,6 @@ def __init__( self, **kwargs ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - :keyword action_type: The operation to perform on a document in an indexing batch. Possible - values include: "upload", "merge", "mergeOrUpload", "delete". - :paramtype action_type: str or ~azure.search.documents.models.IndexActionType - """ super(IndexAction, self).__init__(**kwargs) self.additional_properties = kwargs.get('additional_properties', None) self.action_type = kwargs.get('action_type', None) @@ -454,8 +274,8 @@ class IndexBatch(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar actions: Required. The actions in the batch. - :vartype actions: list[~azure.search.documents.models.IndexAction] + :param actions: Required. The actions in the batch. + :type actions: list[~azure.search.documents.models.IndexAction] """ _validation = { @@ -470,10 +290,6 @@ def __init__( self, **kwargs ): - """ - :keyword actions: Required. The actions in the batch. - :paramtype actions: list[~azure.search.documents.models.IndexAction] - """ super(IndexBatch, self).__init__(**kwargs) self.actions = kwargs['actions'] @@ -502,8 +318,6 @@ def __init__( self, **kwargs ): - """ - """ super(IndexDocumentsResult, self).__init__(**kwargs) self.results = None @@ -548,8 +362,6 @@ def __init__( self, **kwargs ): - """ - """ super(IndexingResult, self).__init__(**kwargs) self.key = None self.error_message = None @@ -560,8 +372,8 @@ def __init__( class RequestOptions(msrest.serialization.Model): """Parameter group. - :ivar x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :vartype x_ms_client_request_id: str + :param x_ms_client_request_id: The tracking ID sent with the request to help with debugging. + :type x_ms_client_request_id: str """ _attribute_map = { @@ -572,10 +384,6 @@ def __init__( self, **kwargs ): - """ - :keyword x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :paramtype x_ms_client_request_id: str - """ super(RequestOptions, self).__init__(**kwargs) self.x_ms_client_request_id = kwargs.get('x_ms_client_request_id', None) @@ -598,9 +406,6 @@ class SearchDocumentsResult(msrest.serialization.Model): :ivar facets: The facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not include any facet expressions. :vartype facets: dict[str, list[~azure.search.documents.models.FacetResult]] - :ivar answers: The answers query results for the search operation; null if the answers query - parameter was not specified or set to 'none'. - :vartype answers: list[~azure.search.documents.models.AnswerResult] :ivar next_page_parameters: Continuation JSON payload returned when Azure Cognitive Search can't return all the requested results in a single Search response. You can use this JSON along with @odata.nextLink to formulate another POST Search request to get the next part of the @@ -619,7 +424,6 @@ class SearchDocumentsResult(msrest.serialization.Model): 'count': {'readonly': True}, 'coverage': {'readonly': True}, 'facets': {'readonly': True}, - 'answers': {'readonly': True}, 'next_page_parameters': {'readonly': True}, 'results': {'required': True, 'readonly': True}, 'next_link': {'readonly': True}, @@ -629,7 +433,6 @@ class SearchDocumentsResult(msrest.serialization.Model): 'count': {'key': '@odata\\.count', 'type': 'long'}, 'coverage': {'key': '@search\\.coverage', 'type': 'float'}, 'facets': {'key': '@search\\.facets', 'type': '{[FacetResult]}'}, - 'answers': {'key': '@search\\.answers', 'type': '[AnswerResult]'}, 'next_page_parameters': {'key': '@search\\.nextPageParameters', 'type': 'SearchRequest'}, 'results': {'key': 'value', 'type': '[SearchResult]'}, 'next_link': {'key': '@odata\\.nextLink', 'type': 'str'}, @@ -639,13 +442,10 @@ def __init__( self, **kwargs ): - """ - """ super(SearchDocumentsResult, self).__init__(**kwargs) self.count = None self.coverage = None self.facets = None - self.answers = None self.next_page_parameters = None self.results = None self.next_link = None @@ -682,8 +482,6 @@ def __init__( self, **kwargs ): - """ - """ super(SearchError, self).__init__(**kwargs) self.code = None self.message = None @@ -693,107 +491,79 @@ def __init__( class SearchOptions(msrest.serialization.Model): """Parameter group. - :ivar include_total_result_count: A value that specifies whether to fetch the total count of + :param include_total_result_count: A value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation. - :vartype include_total_result_count: bool - :ivar facets: The list of facet expressions to apply to the search query. Each facet expression - contains a field name, optionally followed by a comma-separated list of name:value pairs. - :vartype facets: list[str] - :ivar filter: The OData $filter expression to apply to the search query. - :vartype filter: str - :ivar highlight_fields: The list of field names to use for hit highlights. Only searchable + :type include_total_result_count: bool + :param facets: The list of facet expressions to apply to the search query. Each facet + expression contains a field name, optionally followed by a comma-separated list of name:value + pairs. + :type facets: list[str] + :param filter: The OData $filter expression to apply to the search query. + :type filter: str + :param highlight_fields: The list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting. - :vartype highlight_fields: list[str] - :ivar highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :type highlight_fields: list[str] + :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>. - :vartype highlight_post_tag: str - :ivar highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :type highlight_post_tag: str + :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>. - :vartype highlight_pre_tag: str - :ivar minimum_coverage: A number between 0 and 100 indicating the percentage of the index that + :type highlight_pre_tag: str + :param minimum_coverage: A number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100. - :vartype minimum_coverage: float - :ivar order_by: The list of OData $orderby expressions by which to sort the results. Each + :type minimum_coverage: float + :param order_by: The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, and desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no OrderBy is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. - :vartype order_by: list[str] - :ivar query_type: A value that specifies the syntax of the search query. The default is + :type order_by: list[str] + :param query_type: A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax. Possible values include: - "simple", "full", "semantic". - :vartype query_type: str or ~azure.search.documents.models.QueryType - :ivar scoring_parameters: The list of parameter values to be used in scoring functions (for + "simple", "full". + :type query_type: str or ~azure.search.documents.models.QueryType + :param scoring_parameters: The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be "mylocation--122.2,44.8" (without the quotes). - :vartype scoring_parameters: list[str] - :ivar scoring_profile: The name of a scoring profile to evaluate match scores for matching + :type scoring_parameters: list[str] + :param scoring_profile: The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. - :vartype scoring_profile: str - :ivar semantic_configuration: The name of the semantic configuration that lists which fields - should be used for semantic ranking, captions, highlights, and answers. - :vartype semantic_configuration: str - :ivar search_fields: The list of field names to which to scope the full-text search. When using - fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each - fielded search expression take precedence over any field names listed in this parameter. - :vartype search_fields: list[str] - :ivar query_language: The language of the query. Possible values include: "none", "en-us", - "en-gb", "en-in", "en-ca", "en-au", "fr-fr", "fr-ca", "de-de", "es-es", "es-mx", "zh-cn", - "zh-tw", "pt-br", "pt-pt", "it-it", "ja-jp", "ko-kr", "ru-ru", "cs-cz", "nl-be", "nl-nl", - "hu-hu", "pl-pl", "sv-se", "tr-tr", "hi-in", "ar-sa", "ar-eg", "ar-ma", "ar-kw", "ar-jo", - "da-dk", "no-no", "bg-bg", "hr-hr", "hr-ba", "ms-my", "ms-bn", "sl-sl", "ta-in", "vi-vn", - "el-gr", "ro-ro", "is-is", "id-id", "th-th", "lt-lt", "uk-ua", "lv-lv", "et-ee", "ca-es", - "fi-fi", "sr-ba", "sr-me", "sr-rs", "sk-sk", "nb-no", "hy-am", "bn-in", "eu-es", "gl-es", - "gu-in", "he-il", "ga-ie", "kn-in", "ml-in", "mr-in", "fa-ae", "pa-in", "te-in", "ur-pk". - :vartype query_language: str or ~azure.search.documents.models.QueryLanguage - :ivar speller: Improve search recall by spell-correcting individual search query terms. - Possible values include: "none", "lexicon". - :vartype speller: str or ~azure.search.documents.models.Speller - :ivar answers: This parameter is only valid if the query type is 'semantic'. If set, the query - returns answers extracted from key passages in the highest ranked documents. The number of - answers returned can be configured by appending the pipe character '|' followed by the - 'count-:code:``' option after the answers parameter value, such as - 'extractive|count-3'. Default count is 1. Possible values include: "none", "extractive". - :vartype answers: str or ~azure.search.documents.models.Answers - :ivar search_mode: A value that specifies whether any or all of the search terms must be + :type scoring_profile: str + :param search_fields: The list of field names to which to scope the full-text search. When + using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of + each fielded search expression take precedence over any field names listed in this parameter. + :type search_fields: list[str] + :param search_mode: A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. Possible values include: "any", "all". - :vartype search_mode: str or ~azure.search.documents.models.SearchMode - :ivar scoring_statistics: A value that specifies whether we want to calculate scoring + :type search_mode: str or ~azure.search.documents.models.SearchMode + :param scoring_statistics: A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. Possible values include: "local", "global". - :vartype scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics - :ivar session_id: A value to be used to create a sticky session, which can help to get more + :type scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics + :param session_id: A value to be used to create a sticky session, which can help to get more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character. - :vartype session_id: str - :ivar select: The list of fields to retrieve. If unspecified, all fields marked as retrievable + :type session_id: str + :param select: The list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included. - :vartype select: list[str] - :ivar skip: The number of search results to skip. This value cannot be greater than 100,000. If - you need to scan documents in sequence, but cannot use $skip due to this limitation, consider - using $orderby on a totally-ordered key and $filter with a range query instead. - :vartype skip: int - :ivar top: The number of search results to retrieve. This can be used in conjunction with $skip - to implement client-side paging of search results. If results are truncated due to server-side - paging, the response will include a continuation token that can be used to issue another Search - request for the next page of results. - :vartype top: int - :ivar captions: This parameter is only valid if the query type is 'semantic'. If set, the query - returns captions extracted from key passages in the highest ranked documents. When Captions is - set to 'extractive', highlighting is enabled by default, and can be configured by appending the - pipe character '|' followed by the 'highlight-' option, such as - 'extractive|highlight-true'. Defaults to 'None'. Possible values include: "none", "extractive". - :vartype captions: str or ~azure.search.documents.models.Captions - :ivar semantic_fields: The list of field names used for semantic search. - :vartype semantic_fields: list[str] + :type select: list[str] + :param skip: The number of search results to skip. This value cannot be greater than 100,000. + If you need to scan documents in sequence, but cannot use $skip due to this limitation, + consider using $orderby on a totally-ordered key and $filter with a range query instead. + :type skip: int + :param top: The number of search results to retrieve. This can be used in conjunction with + $skip to implement client-side paging of search results. If results are truncated due to + server-side paging, the response will include a continuation token that can be used to issue + another Search request for the next page of results. + :type top: int """ _attribute_map = { @@ -808,129 +578,19 @@ class SearchOptions(msrest.serialization.Model): 'query_type': {'key': 'queryType', 'type': 'str'}, 'scoring_parameters': {'key': 'ScoringParameters', 'type': '[str]'}, 'scoring_profile': {'key': 'scoringProfile', 'type': 'str'}, - 'semantic_configuration': {'key': 'semanticConfiguration', 'type': 'str'}, 'search_fields': {'key': 'searchFields', 'type': '[str]'}, - 'query_language': {'key': 'queryLanguage', 'type': 'str'}, - 'speller': {'key': 'speller', 'type': 'str'}, - 'answers': {'key': 'answers', 'type': 'str'}, 'search_mode': {'key': 'searchMode', 'type': 'str'}, 'scoring_statistics': {'key': 'scoringStatistics', 'type': 'str'}, 'session_id': {'key': 'sessionId', 'type': 'str'}, 'select': {'key': '$select', 'type': '[str]'}, 'skip': {'key': '$skip', 'type': 'int'}, 'top': {'key': '$top', 'type': 'int'}, - 'captions': {'key': 'captions', 'type': 'str'}, - 'semantic_fields': {'key': 'semanticFields', 'type': '[str]'}, } def __init__( self, **kwargs ): - """ - :keyword include_total_result_count: A value that specifies whether to fetch the total count of - results. Default is false. Setting this value to true may have a performance impact. Note that - the count returned is an approximation. - :paramtype include_total_result_count: bool - :keyword facets: The list of facet expressions to apply to the search query. Each facet - expression contains a field name, optionally followed by a comma-separated list of name:value - pairs. - :paramtype facets: list[str] - :keyword filter: The OData $filter expression to apply to the search query. - :paramtype filter: str - :keyword highlight_fields: The list of field names to use for hit highlights. Only searchable - fields can be used for hit highlighting. - :paramtype highlight_fields: list[str] - :keyword highlight_post_tag: A string tag that is appended to hit highlights. Must be set with - highlightPreTag. Default is </em>. - :paramtype highlight_post_tag: str - :keyword highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with - highlightPostTag. Default is <em>. - :paramtype highlight_pre_tag: str - :keyword minimum_coverage: A number between 0 and 100 indicating the percentage of the index - that must be covered by a search query in order for the query to be reported as a success. This - parameter can be useful for ensuring search availability even for services with only one - replica. The default is 100. - :paramtype minimum_coverage: float - :keyword order_by: The list of OData $orderby expressions by which to sort the results. Each - expression can be either a field name or a call to either the geo.distance() or the - search.score() functions. Each expression can be followed by asc to indicate ascending, and - desc to indicate descending. The default is ascending order. Ties will be broken by the match - scores of documents. If no OrderBy is specified, the default sort order is descending by - document match score. There can be at most 32 $orderby clauses. - :paramtype order_by: list[str] - :keyword query_type: A value that specifies the syntax of the search query. The default is - 'simple'. Use 'full' if your query uses the Lucene query syntax. Possible values include: - "simple", "full", "semantic". - :paramtype query_type: str or ~azure.search.documents.models.QueryType - :keyword scoring_parameters: The list of parameter values to be used in scoring functions (for - example, referencePointParameter) using the format name-values. For example, if the scoring - profile defines a function with a parameter called 'mylocation' the parameter string would be - "mylocation--122.2,44.8" (without the quotes). - :paramtype scoring_parameters: list[str] - :keyword scoring_profile: The name of a scoring profile to evaluate match scores for matching - documents in order to sort the results. - :paramtype scoring_profile: str - :keyword semantic_configuration: The name of the semantic configuration that lists which fields - should be used for semantic ranking, captions, highlights, and answers. - :paramtype semantic_configuration: str - :keyword search_fields: The list of field names to which to scope the full-text search. When - using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of - each fielded search expression take precedence over any field names listed in this parameter. - :paramtype search_fields: list[str] - :keyword query_language: The language of the query. Possible values include: "none", "en-us", - "en-gb", "en-in", "en-ca", "en-au", "fr-fr", "fr-ca", "de-de", "es-es", "es-mx", "zh-cn", - "zh-tw", "pt-br", "pt-pt", "it-it", "ja-jp", "ko-kr", "ru-ru", "cs-cz", "nl-be", "nl-nl", - "hu-hu", "pl-pl", "sv-se", "tr-tr", "hi-in", "ar-sa", "ar-eg", "ar-ma", "ar-kw", "ar-jo", - "da-dk", "no-no", "bg-bg", "hr-hr", "hr-ba", "ms-my", "ms-bn", "sl-sl", "ta-in", "vi-vn", - "el-gr", "ro-ro", "is-is", "id-id", "th-th", "lt-lt", "uk-ua", "lv-lv", "et-ee", "ca-es", - "fi-fi", "sr-ba", "sr-me", "sr-rs", "sk-sk", "nb-no", "hy-am", "bn-in", "eu-es", "gl-es", - "gu-in", "he-il", "ga-ie", "kn-in", "ml-in", "mr-in", "fa-ae", "pa-in", "te-in", "ur-pk". - :paramtype query_language: str or ~azure.search.documents.models.QueryLanguage - :keyword speller: Improve search recall by spell-correcting individual search query terms. - Possible values include: "none", "lexicon". - :paramtype speller: str or ~azure.search.documents.models.Speller - :keyword answers: This parameter is only valid if the query type is 'semantic'. If set, the - query returns answers extracted from key passages in the highest ranked documents. The number - of answers returned can be configured by appending the pipe character '|' followed by the - 'count-:code:``' option after the answers parameter value, such as - 'extractive|count-3'. Default count is 1. Possible values include: "none", "extractive". - :paramtype answers: str or ~azure.search.documents.models.Answers - :keyword search_mode: A value that specifies whether any or all of the search terms must be - matched in order to count the document as a match. Possible values include: "any", "all". - :paramtype search_mode: str or ~azure.search.documents.models.SearchMode - :keyword scoring_statistics: A value that specifies whether we want to calculate scoring - statistics (such as document frequency) globally for more consistent scoring, or locally, for - lower latency. Possible values include: "local", "global". - :paramtype scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics - :keyword session_id: A value to be used to create a sticky session, which can help to get more - consistent results. As long as the same sessionId is used, a best-effort attempt will be made - to target the same replica set. Be wary that reusing the same sessionID values repeatedly can - interfere with the load balancing of the requests across replicas and adversely affect the - performance of the search service. The value used as sessionId cannot start with a '_' - character. - :paramtype session_id: str - :keyword select: The list of fields to retrieve. If unspecified, all fields marked as - retrievable in the schema are included. - :paramtype select: list[str] - :keyword skip: The number of search results to skip. This value cannot be greater than 100,000. - If you need to scan documents in sequence, but cannot use $skip due to this limitation, - consider using $orderby on a totally-ordered key and $filter with a range query instead. - :paramtype skip: int - :keyword top: The number of search results to retrieve. This can be used in conjunction with - $skip to implement client-side paging of search results. If results are truncated due to - server-side paging, the response will include a continuation token that can be used to issue - another Search request for the next page of results. - :paramtype top: int - :keyword captions: This parameter is only valid if the query type is 'semantic'. If set, the - query returns captions extracted from key passages in the highest ranked documents. When - Captions is set to 'extractive', highlighting is enabled by default, and can be configured by - appending the pipe character '|' followed by the 'highlight-' option, such as - 'extractive|highlight-true'. Defaults to 'None'. Possible values include: "none", "extractive". - :paramtype captions: str or ~azure.search.documents.models.Captions - :keyword semantic_fields: The list of field names used for semantic search. - :paramtype semantic_fields: list[str] - """ super(SearchOptions, self).__init__(**kwargs) self.include_total_result_count = kwargs.get('include_total_result_count', None) self.facets = kwargs.get('facets', None) @@ -943,126 +603,97 @@ def __init__( self.query_type = kwargs.get('query_type', None) self.scoring_parameters = kwargs.get('scoring_parameters', None) self.scoring_profile = kwargs.get('scoring_profile', None) - self.semantic_configuration = kwargs.get('semantic_configuration', None) self.search_fields = kwargs.get('search_fields', None) - self.query_language = kwargs.get('query_language', None) - self.speller = kwargs.get('speller', None) - self.answers = kwargs.get('answers', None) self.search_mode = kwargs.get('search_mode', None) self.scoring_statistics = kwargs.get('scoring_statistics', None) self.session_id = kwargs.get('session_id', None) self.select = kwargs.get('select', None) self.skip = kwargs.get('skip', None) self.top = kwargs.get('top', None) - self.captions = kwargs.get('captions', None) - self.semantic_fields = kwargs.get('semantic_fields', None) class SearchRequest(msrest.serialization.Model): """Parameters for filtering, sorting, faceting, paging, and other search query behaviors. - :ivar include_total_result_count: A value that specifies whether to fetch the total count of + :param include_total_result_count: A value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation. - :vartype include_total_result_count: bool - :ivar facets: The list of facet expressions to apply to the search query. Each facet expression - contains a field name, optionally followed by a comma-separated list of name:value pairs. - :vartype facets: list[str] - :ivar filter: The OData $filter expression to apply to the search query. - :vartype filter: str - :ivar highlight_fields: The comma-separated list of field names to use for hit highlights. Only - searchable fields can be used for hit highlighting. - :vartype highlight_fields: str - :ivar highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :type include_total_result_count: bool + :param facets: The list of facet expressions to apply to the search query. Each facet + expression contains a field name, optionally followed by a comma-separated list of name:value + pairs. + :type facets: list[str] + :param filter: The OData $filter expression to apply to the search query. + :type filter: str + :param highlight_fields: The comma-separated list of field names to use for hit highlights. + Only searchable fields can be used for hit highlighting. + :type highlight_fields: str + :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>. - :vartype highlight_post_tag: str - :ivar highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :type highlight_post_tag: str + :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>. - :vartype highlight_pre_tag: str - :ivar minimum_coverage: A number between 0 and 100 indicating the percentage of the index that + :type highlight_pre_tag: str + :param minimum_coverage: A number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100. - :vartype minimum_coverage: float - :ivar order_by: The comma-separated list of OData $orderby expressions by which to sort the + :type minimum_coverage: float + :param order_by: The comma-separated list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. - :vartype order_by: str - :ivar query_type: A value that specifies the syntax of the search query. The default is + :type order_by: str + :param query_type: A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax. Possible values include: - "simple", "full", "semantic". - :vartype query_type: str or ~azure.search.documents.models.QueryType - :ivar scoring_statistics: A value that specifies whether we want to calculate scoring + "simple", "full". + :type query_type: str or ~azure.search.documents.models.QueryType + :param scoring_statistics: A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global scoring statistics can increase latency of search queries. Possible values include: "local", "global". - :vartype scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics - :ivar session_id: A value to be used to create a sticky session, which can help getting more + :type scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics + :param session_id: A value to be used to create a sticky session, which can help getting more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character. - :vartype session_id: str - :ivar scoring_parameters: The list of parameter values to be used in scoring functions (for + :type session_id: str + :param scoring_parameters: The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be "mylocation--122.2,44.8" (without the quotes). - :vartype scoring_parameters: list[str] - :ivar scoring_profile: The name of a scoring profile to evaluate match scores for matching + :type scoring_parameters: list[str] + :param scoring_profile: The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. - :vartype scoring_profile: str - :ivar semantic_configuration: The name of a semantic configuration that will be used when - processing documents for queries of type semantic. - :vartype semantic_configuration: str - :ivar search_text: A full-text search query expression; Use "*" or omit this parameter to match - all documents. - :vartype search_text: str - :ivar search_fields: The comma-separated list of field names to which to scope the full-text + :type scoring_profile: str + :param search_text: A full-text search query expression; Use "*" or omit this parameter to + match all documents. + :type search_text: str + :param search_fields: The comma-separated list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter. - :vartype search_fields: str - :ivar search_mode: A value that specifies whether any or all of the search terms must be + :type search_fields: str + :param search_mode: A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. Possible values include: "any", "all". - :vartype search_mode: str or ~azure.search.documents.models.SearchMode - :ivar query_language: A value that specifies the language of the search query. Possible values - include: "none", "en-us", "en-gb", "en-in", "en-ca", "en-au", "fr-fr", "fr-ca", "de-de", - "es-es", "es-mx", "zh-cn", "zh-tw", "pt-br", "pt-pt", "it-it", "ja-jp", "ko-kr", "ru-ru", - "cs-cz", "nl-be", "nl-nl", "hu-hu", "pl-pl", "sv-se", "tr-tr", "hi-in", "ar-sa", "ar-eg", - "ar-ma", "ar-kw", "ar-jo", "da-dk", "no-no", "bg-bg", "hr-hr", "hr-ba", "ms-my", "ms-bn", - "sl-sl", "ta-in", "vi-vn", "el-gr", "ro-ro", "is-is", "id-id", "th-th", "lt-lt", "uk-ua", - "lv-lv", "et-ee", "ca-es", "fi-fi", "sr-ba", "sr-me", "sr-rs", "sk-sk", "nb-no", "hy-am", - "bn-in", "eu-es", "gl-es", "gu-in", "he-il", "ga-ie", "kn-in", "ml-in", "mr-in", "fa-ae", - "pa-in", "te-in", "ur-pk". - :vartype query_language: str or ~azure.search.documents.models.QueryLanguage - :ivar speller: A value that specified the type of the speller to use to spell-correct - individual search query terms. Possible values include: "none", "lexicon". - :vartype speller: str or ~azure.search.documents.models.QuerySpellerType - :ivar answers: A value that specifies whether answers should be returned as part of the search - response. Possible values include: "none", "extractive". - :vartype answers: str or ~azure.search.documents.models.QueryAnswerType - :ivar select: The comma-separated list of fields to retrieve. If unspecified, all fields marked - as retrievable in the schema are included. - :vartype select: str - :ivar skip: The number of search results to skip. This value cannot be greater than 100,000. If - you need to scan documents in sequence, but cannot use skip due to this limitation, consider + :type search_mode: str or ~azure.search.documents.models.SearchMode + :param select: The comma-separated list of fields to retrieve. If unspecified, all fields + marked as retrievable in the schema are included. + :type select: str + :param skip: The number of search results to skip. This value cannot be greater than 100,000. + If you need to scan documents in sequence, but cannot use skip due to this limitation, consider using orderby on a totally-ordered key and filter with a range query instead. - :vartype skip: int - :ivar top: The number of search results to retrieve. This can be used in conjunction with $skip - to implement client-side paging of search results. If results are truncated due to server-side - paging, the response will include a continuation token that can be used to issue another Search - request for the next page of results. - :vartype top: int - :ivar captions: A value that specifies whether captions should be returned as part of the - search response. Possible values include: "none", "extractive". - :vartype captions: str or ~azure.search.documents.models.QueryCaptionType - :ivar semantic_fields: The comma-separated list of field names used for semantic search. - :vartype semantic_fields: str + :type skip: int + :param top: The number of search results to retrieve. This can be used in conjunction with + $skip to implement client-side paging of search results. If results are truncated due to + server-side paging, the response will include a continuation token that can be used to issue + another Search request for the next page of results. + :type top: int """ _attribute_map = { @@ -1079,129 +710,18 @@ class SearchRequest(msrest.serialization.Model): 'session_id': {'key': 'sessionId', 'type': 'str'}, 'scoring_parameters': {'key': 'scoringParameters', 'type': '[str]'}, 'scoring_profile': {'key': 'scoringProfile', 'type': 'str'}, - 'semantic_configuration': {'key': 'semanticConfiguration', 'type': 'str'}, 'search_text': {'key': 'search', 'type': 'str'}, 'search_fields': {'key': 'searchFields', 'type': 'str'}, 'search_mode': {'key': 'searchMode', 'type': 'str'}, - 'query_language': {'key': 'queryLanguage', 'type': 'str'}, - 'speller': {'key': 'speller', 'type': 'str'}, - 'answers': {'key': 'answers', 'type': 'str'}, 'select': {'key': 'select', 'type': 'str'}, 'skip': {'key': 'skip', 'type': 'int'}, 'top': {'key': 'top', 'type': 'int'}, - 'captions': {'key': 'captions', 'type': 'str'}, - 'semantic_fields': {'key': 'semanticFields', 'type': 'str'}, } def __init__( self, **kwargs ): - """ - :keyword include_total_result_count: A value that specifies whether to fetch the total count of - results. Default is false. Setting this value to true may have a performance impact. Note that - the count returned is an approximation. - :paramtype include_total_result_count: bool - :keyword facets: The list of facet expressions to apply to the search query. Each facet - expression contains a field name, optionally followed by a comma-separated list of name:value - pairs. - :paramtype facets: list[str] - :keyword filter: The OData $filter expression to apply to the search query. - :paramtype filter: str - :keyword highlight_fields: The comma-separated list of field names to use for hit highlights. - Only searchable fields can be used for hit highlighting. - :paramtype highlight_fields: str - :keyword highlight_post_tag: A string tag that is appended to hit highlights. Must be set with - highlightPreTag. Default is </em>. - :paramtype highlight_post_tag: str - :keyword highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with - highlightPostTag. Default is <em>. - :paramtype highlight_pre_tag: str - :keyword minimum_coverage: A number between 0 and 100 indicating the percentage of the index - that must be covered by a search query in order for the query to be reported as a success. This - parameter can be useful for ensuring search availability even for services with only one - replica. The default is 100. - :paramtype minimum_coverage: float - :keyword order_by: The comma-separated list of OData $orderby expressions by which to sort the - results. Each expression can be either a field name or a call to either the geo.distance() or - the search.score() functions. Each expression can be followed by asc to indicate ascending, or - desc to indicate descending. The default is ascending order. Ties will be broken by the match - scores of documents. If no $orderby is specified, the default sort order is descending by - document match score. There can be at most 32 $orderby clauses. - :paramtype order_by: str - :keyword query_type: A value that specifies the syntax of the search query. The default is - 'simple'. Use 'full' if your query uses the Lucene query syntax. Possible values include: - "simple", "full", "semantic". - :paramtype query_type: str or ~azure.search.documents.models.QueryType - :keyword scoring_statistics: A value that specifies whether we want to calculate scoring - statistics (such as document frequency) globally for more consistent scoring, or locally, for - lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally - before scoring. Using global scoring statistics can increase latency of search queries. - Possible values include: "local", "global". - :paramtype scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics - :keyword session_id: A value to be used to create a sticky session, which can help getting more - consistent results. As long as the same sessionId is used, a best-effort attempt will be made - to target the same replica set. Be wary that reusing the same sessionID values repeatedly can - interfere with the load balancing of the requests across replicas and adversely affect the - performance of the search service. The value used as sessionId cannot start with a '_' - character. - :paramtype session_id: str - :keyword scoring_parameters: The list of parameter values to be used in scoring functions (for - example, referencePointParameter) using the format name-values. For example, if the scoring - profile defines a function with a parameter called 'mylocation' the parameter string would be - "mylocation--122.2,44.8" (without the quotes). - :paramtype scoring_parameters: list[str] - :keyword scoring_profile: The name of a scoring profile to evaluate match scores for matching - documents in order to sort the results. - :paramtype scoring_profile: str - :keyword semantic_configuration: The name of a semantic configuration that will be used when - processing documents for queries of type semantic. - :paramtype semantic_configuration: str - :keyword search_text: A full-text search query expression; Use "*" or omit this parameter to - match all documents. - :paramtype search_text: str - :keyword search_fields: The comma-separated list of field names to which to scope the full-text - search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the - field names of each fielded search expression take precedence over any field names listed in - this parameter. - :paramtype search_fields: str - :keyword search_mode: A value that specifies whether any or all of the search terms must be - matched in order to count the document as a match. Possible values include: "any", "all". - :paramtype search_mode: str or ~azure.search.documents.models.SearchMode - :keyword query_language: A value that specifies the language of the search query. Possible - values include: "none", "en-us", "en-gb", "en-in", "en-ca", "en-au", "fr-fr", "fr-ca", "de-de", - "es-es", "es-mx", "zh-cn", "zh-tw", "pt-br", "pt-pt", "it-it", "ja-jp", "ko-kr", "ru-ru", - "cs-cz", "nl-be", "nl-nl", "hu-hu", "pl-pl", "sv-se", "tr-tr", "hi-in", "ar-sa", "ar-eg", - "ar-ma", "ar-kw", "ar-jo", "da-dk", "no-no", "bg-bg", "hr-hr", "hr-ba", "ms-my", "ms-bn", - "sl-sl", "ta-in", "vi-vn", "el-gr", "ro-ro", "is-is", "id-id", "th-th", "lt-lt", "uk-ua", - "lv-lv", "et-ee", "ca-es", "fi-fi", "sr-ba", "sr-me", "sr-rs", "sk-sk", "nb-no", "hy-am", - "bn-in", "eu-es", "gl-es", "gu-in", "he-il", "ga-ie", "kn-in", "ml-in", "mr-in", "fa-ae", - "pa-in", "te-in", "ur-pk". - :paramtype query_language: str or ~azure.search.documents.models.QueryLanguage - :keyword speller: A value that specified the type of the speller to use to spell-correct - individual search query terms. Possible values include: "none", "lexicon". - :paramtype speller: str or ~azure.search.documents.models.QuerySpellerType - :keyword answers: A value that specifies whether answers should be returned as part of the - search response. Possible values include: "none", "extractive". - :paramtype answers: str or ~azure.search.documents.models.QueryAnswerType - :keyword select: The comma-separated list of fields to retrieve. If unspecified, all fields - marked as retrievable in the schema are included. - :paramtype select: str - :keyword skip: The number of search results to skip. This value cannot be greater than 100,000. - If you need to scan documents in sequence, but cannot use skip due to this limitation, consider - using orderby on a totally-ordered key and filter with a range query instead. - :paramtype skip: int - :keyword top: The number of search results to retrieve. This can be used in conjunction with - $skip to implement client-side paging of search results. If results are truncated due to - server-side paging, the response will include a continuation token that can be used to issue - another Search request for the next page of results. - :paramtype top: int - :keyword captions: A value that specifies whether captions should be returned as part of the - search response. Possible values include: "none", "extractive". - :paramtype captions: str or ~azure.search.documents.models.QueryCaptionType - :keyword semantic_fields: The comma-separated list of field names used for semantic search. - :paramtype semantic_fields: str - """ super(SearchRequest, self).__init__(**kwargs) self.include_total_result_count = kwargs.get('include_total_result_count', None) self.facets = kwargs.get('facets', None) @@ -1216,18 +736,12 @@ def __init__( self.session_id = kwargs.get('session_id', None) self.scoring_parameters = kwargs.get('scoring_parameters', None) self.scoring_profile = kwargs.get('scoring_profile', None) - self.semantic_configuration = kwargs.get('semantic_configuration', None) self.search_text = kwargs.get('search_text', None) self.search_fields = kwargs.get('search_fields', None) self.search_mode = kwargs.get('search_mode', None) - self.query_language = kwargs.get('query_language', None) - self.speller = kwargs.get('speller', None) - self.answers = kwargs.get('answers', None) self.select = kwargs.get('select', None) self.skip = kwargs.get('skip', None) self.top = kwargs.get('top', None) - self.captions = kwargs.get('captions', None) - self.semantic_fields = kwargs.get('semantic_fields', None) class SearchResult(msrest.serialization.Model): @@ -1237,55 +751,36 @@ class SearchResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar additional_properties: Unmatched properties from the message are deserialized to this + :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] + :type additional_properties: dict[str, any] :ivar score: Required. The relevance score of the document compared to other documents returned by the query. :vartype score: float - :ivar reranker_score: The relevance score computed by the semantic ranker for the top search - results. Search results are sorted by the RerankerScore first and then by the Score. - RerankerScore is only returned for queries of type 'semantic'. - :vartype reranker_score: float :ivar highlights: Text fragments from the document that indicate the matching search terms, organized by each applicable field; null if hit highlighting was not enabled for the query. :vartype highlights: dict[str, list[str]] - :ivar captions: Captions are the most representative passages from the document relatively to - the search query. They are often used as document summary. Captions are only returned for - queries of type 'semantic'. - :vartype captions: list[~azure.search.documents.models.CaptionResult] """ _validation = { 'score': {'required': True, 'readonly': True}, - 'reranker_score': {'readonly': True}, 'highlights': {'readonly': True}, - 'captions': {'readonly': True}, } _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'score': {'key': '@search\\.score', 'type': 'float'}, - 'reranker_score': {'key': '@search\\.rerankerScore', 'type': 'float'}, 'highlights': {'key': '@search\\.highlights', 'type': '{[str]}'}, - 'captions': {'key': '@search\\.captions', 'type': '[CaptionResult]'}, } def __init__( self, **kwargs ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - """ super(SearchResult, self).__init__(**kwargs) self.additional_properties = kwargs.get('additional_properties', None) self.score = None - self.reranker_score = None self.highlights = None - self.captions = None class SuggestDocumentsResult(msrest.serialization.Model): @@ -1316,8 +811,6 @@ def __init__( self, **kwargs ): - """ - """ super(SuggestDocumentsResult, self).__init__(**kwargs) self.results = None self.coverage = None @@ -1326,41 +819,41 @@ def __init__( class SuggestOptions(msrest.serialization.Model): """Parameter group. - :ivar filter: An OData expression that filters the documents considered for suggestions. - :vartype filter: str - :ivar use_fuzzy_matching: A value indicating whether to use fuzzy matching for the suggestions + :param filter: An OData expression that filters the documents considered for suggestions. + :type filter: str + :param use_fuzzy_matching: A value indicating whether to use fuzzy matching for the suggestions query. Default is false. When set to true, the query will find terms even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy suggestions queries are slower and consume more resources. - :vartype use_fuzzy_matching: bool - :ivar highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :type use_fuzzy_matching: bool + :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting of suggestions is disabled. - :vartype highlight_post_tag: str - :ivar highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :type highlight_post_tag: str + :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting of suggestions is disabled. - :vartype highlight_pre_tag: str - :ivar minimum_coverage: A number between 0 and 100 indicating the percentage of the index that + :type highlight_pre_tag: str + :param minimum_coverage: A number between 0 and 100 indicating the percentage of the index that must be covered by a suggestions query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. - :vartype minimum_coverage: float - :ivar order_by: The list of OData $orderby expressions by which to sort the results. Each + :type minimum_coverage: float + :param order_by: The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. - :vartype order_by: list[str] - :ivar search_fields: The list of field names to search for the specified search text. Target + :type order_by: list[str] + :param search_fields: The list of field names to search for the specified search text. Target fields must be included in the specified suggester. - :vartype search_fields: list[str] - :ivar select: The list of fields to retrieve. If unspecified, only the key field will be + :type search_fields: list[str] + :param select: The list of fields to retrieve. If unspecified, only the key field will be included in the results. - :vartype select: list[str] - :ivar top: The number of suggestions to retrieve. The value must be a number between 1 and 100. - The default is 5. - :vartype top: int + :type select: list[str] + :param top: The number of suggestions to retrieve. The value must be a number between 1 and + 100. The default is 5. + :type top: int """ _attribute_map = { @@ -1379,43 +872,6 @@ def __init__( self, **kwargs ): - """ - :keyword filter: An OData expression that filters the documents considered for suggestions. - :paramtype filter: str - :keyword use_fuzzy_matching: A value indicating whether to use fuzzy matching for the - suggestions query. Default is false. When set to true, the query will find terms even if - there's a substituted or missing character in the search text. While this provides a better - experience in some scenarios, it comes at a performance cost as fuzzy suggestions queries are - slower and consume more resources. - :paramtype use_fuzzy_matching: bool - :keyword highlight_post_tag: A string tag that is appended to hit highlights. Must be set with - highlightPreTag. If omitted, hit highlighting of suggestions is disabled. - :paramtype highlight_post_tag: str - :keyword highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with - highlightPostTag. If omitted, hit highlighting of suggestions is disabled. - :paramtype highlight_pre_tag: str - :keyword minimum_coverage: A number between 0 and 100 indicating the percentage of the index - that must be covered by a suggestions query in order for the query to be reported as a success. - This parameter can be useful for ensuring search availability even for services with only one - replica. The default is 80. - :paramtype minimum_coverage: float - :keyword order_by: The list of OData $orderby expressions by which to sort the results. Each - expression can be either a field name or a call to either the geo.distance() or the - search.score() functions. Each expression can be followed by asc to indicate ascending, or desc - to indicate descending. The default is ascending order. Ties will be broken by the match scores - of documents. If no $orderby is specified, the default sort order is descending by document - match score. There can be at most 32 $orderby clauses. - :paramtype order_by: list[str] - :keyword search_fields: The list of field names to search for the specified search text. Target - fields must be included in the specified suggester. - :paramtype search_fields: list[str] - :keyword select: The list of fields to retrieve. If unspecified, only the key field will be - included in the results. - :paramtype select: list[str] - :keyword top: The number of suggestions to retrieve. The value must be a number between 1 and - 100. The default is 5. - :paramtype top: int - """ super(SuggestOptions, self).__init__(**kwargs) self.filter = kwargs.get('filter', None) self.use_fuzzy_matching = kwargs.get('use_fuzzy_matching', None) @@ -1433,47 +889,47 @@ class SuggestRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar filter: An OData expression that filters the documents considered for suggestions. - :vartype filter: str - :ivar use_fuzzy_matching: A value indicating whether to use fuzzy matching for the suggestion + :param filter: An OData expression that filters the documents considered for suggestions. + :type filter: str + :param use_fuzzy_matching: A value indicating whether to use fuzzy matching for the suggestion query. Default is false. When set to true, the query will find suggestions even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy suggestion searches are slower and consume more resources. - :vartype use_fuzzy_matching: bool - :ivar highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :type use_fuzzy_matching: bool + :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting of suggestions is disabled. - :vartype highlight_post_tag: str - :ivar highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :type highlight_post_tag: str + :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting of suggestions is disabled. - :vartype highlight_pre_tag: str - :ivar minimum_coverage: A number between 0 and 100 indicating the percentage of the index that + :type highlight_pre_tag: str + :param minimum_coverage: A number between 0 and 100 indicating the percentage of the index that must be covered by a suggestion query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. - :vartype minimum_coverage: float - :ivar order_by: The comma-separated list of OData $orderby expressions by which to sort the + :type minimum_coverage: float + :param order_by: The comma-separated list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. - :vartype order_by: str - :ivar search_text: Required. The search text to use to suggest documents. Must be at least 1 + :type order_by: str + :param search_text: Required. The search text to use to suggest documents. Must be at least 1 character, and no more than 100 characters. - :vartype search_text: str - :ivar search_fields: The comma-separated list of field names to search for the specified search - text. Target fields must be included in the specified suggester. - :vartype search_fields: str - :ivar select: The comma-separated list of fields to retrieve. If unspecified, only the key + :type search_text: str + :param search_fields: The comma-separated list of field names to search for the specified + search text. Target fields must be included in the specified suggester. + :type search_fields: str + :param select: The comma-separated list of fields to retrieve. If unspecified, only the key field will be included in the results. - :vartype select: str - :ivar suggester_name: Required. The name of the suggester as specified in the suggesters + :type select: str + :param suggester_name: Required. The name of the suggester as specified in the suggesters collection that's part of the index definition. - :vartype suggester_name: str - :ivar top: The number of suggestions to retrieve. This must be a value between 1 and 100. The + :type suggester_name: str + :param top: The number of suggestions to retrieve. This must be a value between 1 and 100. The default is 5. - :vartype top: int + :type top: int """ _validation = { @@ -1499,49 +955,6 @@ def __init__( self, **kwargs ): - """ - :keyword filter: An OData expression that filters the documents considered for suggestions. - :paramtype filter: str - :keyword use_fuzzy_matching: A value indicating whether to use fuzzy matching for the - suggestion query. Default is false. When set to true, the query will find suggestions even if - there's a substituted or missing character in the search text. While this provides a better - experience in some scenarios, it comes at a performance cost as fuzzy suggestion searches are - slower and consume more resources. - :paramtype use_fuzzy_matching: bool - :keyword highlight_post_tag: A string tag that is appended to hit highlights. Must be set with - highlightPreTag. If omitted, hit highlighting of suggestions is disabled. - :paramtype highlight_post_tag: str - :keyword highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with - highlightPostTag. If omitted, hit highlighting of suggestions is disabled. - :paramtype highlight_pre_tag: str - :keyword minimum_coverage: A number between 0 and 100 indicating the percentage of the index - that must be covered by a suggestion query in order for the query to be reported as a success. - This parameter can be useful for ensuring search availability even for services with only one - replica. The default is 80. - :paramtype minimum_coverage: float - :keyword order_by: The comma-separated list of OData $orderby expressions by which to sort the - results. Each expression can be either a field name or a call to either the geo.distance() or - the search.score() functions. Each expression can be followed by asc to indicate ascending, or - desc to indicate descending. The default is ascending order. Ties will be broken by the match - scores of documents. If no $orderby is specified, the default sort order is descending by - document match score. There can be at most 32 $orderby clauses. - :paramtype order_by: str - :keyword search_text: Required. The search text to use to suggest documents. Must be at least 1 - character, and no more than 100 characters. - :paramtype search_text: str - :keyword search_fields: The comma-separated list of field names to search for the specified - search text. Target fields must be included in the specified suggester. - :paramtype search_fields: str - :keyword select: The comma-separated list of fields to retrieve. If unspecified, only the key - field will be included in the results. - :paramtype select: str - :keyword suggester_name: Required. The name of the suggester as specified in the suggesters - collection that's part of the index definition. - :paramtype suggester_name: str - :keyword top: The number of suggestions to retrieve. This must be a value between 1 and 100. - The default is 5. - :paramtype top: int - """ super(SuggestRequest, self).__init__(**kwargs) self.filter = kwargs.get('filter', None) self.use_fuzzy_matching = kwargs.get('use_fuzzy_matching', None) @@ -1563,9 +976,9 @@ class SuggestResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar additional_properties: Unmatched properties from the message are deserialized to this + :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] + :type additional_properties: dict[str, any] :ivar text: Required. The text of the suggestion result. :vartype text: str """ @@ -1583,11 +996,6 @@ def __init__( self, **kwargs ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - """ super(SuggestResult, self).__init__(**kwargs) self.additional_properties = kwargs.get('additional_properties', None) self.text = None diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/models/_models_py3.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/models/_models_py3.py index 303dd7446e8b..51cdd5da73ac 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/models/_models_py3.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_generated/models/_models_py3.py @@ -14,60 +14,6 @@ from ._search_client_enums import * -class AnswerResult(msrest.serialization.Model): - """An answer is a text passage extracted from the contents of the most relevant documents that matched the query. Answers are extracted from the top search results. Answer candidates are scored and the top answers are selected. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar additional_properties: Unmatched properties from the message are deserialized to this - collection. - :vartype additional_properties: dict[str, any] - :ivar score: The score value represents how relevant the answer is to the query relative to - other answers returned for the query. - :vartype score: float - :ivar key: The key of the document the answer was extracted from. - :vartype key: str - :ivar text: The text passage extracted from the document contents as the answer. - :vartype text: str - :ivar highlights: Same text passage as in the Text property with highlighted text phrases most - relevant to the query. - :vartype highlights: str - """ - - _validation = { - 'score': {'readonly': True}, - 'key': {'readonly': True}, - 'text': {'readonly': True}, - 'highlights': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'score': {'key': 'score', 'type': 'float'}, - 'key': {'key': 'key', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'highlights': {'key': 'highlights', 'type': 'str'}, - } - - def __init__( - self, - *, - additional_properties: Optional[Dict[str, Any]] = None, - **kwargs - ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - """ - super(AnswerResult, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.score = None - self.key = None - self.text = None - self.highlights = None - - class AutocompleteItem(msrest.serialization.Model): """The result of Autocomplete requests. @@ -95,8 +41,6 @@ def __init__( self, **kwargs ): - """ - """ super(AutocompleteItem, self).__init__(**kwargs) self.text = None self.query_plus_text = None @@ -105,36 +49,36 @@ def __init__( class AutocompleteOptions(msrest.serialization.Model): """Parameter group. - :ivar autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use + :param autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms. Possible values include: "oneTerm", "twoTerms", "oneTermWithContext". - :vartype autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode - :ivar filter: An OData expression that filters the documents used to produce completed terms + :type autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode + :param filter: An OData expression that filters the documents used to produce completed terms for the Autocomplete result. - :vartype filter: str - :ivar use_fuzzy_matching: A value indicating whether to use fuzzy matching for the autocomplete - query. Default is false. When set to true, the query will find terms even if there's a - substituted or missing character in the search text. While this provides a better experience in - some scenarios, it comes at a performance cost as fuzzy autocomplete queries are slower and - consume more resources. - :vartype use_fuzzy_matching: bool - :ivar highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :type filter: str + :param use_fuzzy_matching: A value indicating whether to use fuzzy matching for the + autocomplete query. Default is false. When set to true, the query will find terms even if + there's a substituted or missing character in the search text. While this provides a better + experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are + slower and consume more resources. + :type use_fuzzy_matching: bool + :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting is disabled. - :vartype highlight_post_tag: str - :ivar highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :type highlight_post_tag: str + :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting is disabled. - :vartype highlight_pre_tag: str - :ivar minimum_coverage: A number between 0 and 100 indicating the percentage of the index that + :type highlight_pre_tag: str + :param minimum_coverage: A number between 0 and 100 indicating the percentage of the index that must be covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. - :vartype minimum_coverage: float - :ivar search_fields: The list of field names to consider when querying for auto-completed + :type minimum_coverage: float + :param search_fields: The list of field names to consider when querying for auto-completed terms. Target fields must be included in the specified suggester. - :vartype search_fields: list[str] - :ivar top: The number of auto-completed terms to retrieve. This must be a value between 1 and + :type search_fields: list[str] + :param top: The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The default is 5. - :vartype top: int + :type top: int """ _attribute_map = { @@ -161,38 +105,6 @@ def __init__( top: Optional[int] = None, **kwargs ): - """ - :keyword autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use - 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing - auto-completed terms. Possible values include: "oneTerm", "twoTerms", "oneTermWithContext". - :paramtype autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode - :keyword filter: An OData expression that filters the documents used to produce completed terms - for the Autocomplete result. - :paramtype filter: str - :keyword use_fuzzy_matching: A value indicating whether to use fuzzy matching for the - autocomplete query. Default is false. When set to true, the query will find terms even if - there's a substituted or missing character in the search text. While this provides a better - experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are - slower and consume more resources. - :paramtype use_fuzzy_matching: bool - :keyword highlight_post_tag: A string tag that is appended to hit highlights. Must be set with - highlightPreTag. If omitted, hit highlighting is disabled. - :paramtype highlight_post_tag: str - :keyword highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with - highlightPostTag. If omitted, hit highlighting is disabled. - :paramtype highlight_pre_tag: str - :keyword minimum_coverage: A number between 0 and 100 indicating the percentage of the index - that must be covered by an autocomplete query in order for the query to be reported as a - success. This parameter can be useful for ensuring search availability even for services with - only one replica. The default is 80. - :paramtype minimum_coverage: float - :keyword search_fields: The list of field names to consider when querying for auto-completed - terms. Target fields must be included in the specified suggester. - :paramtype search_fields: list[str] - :keyword top: The number of auto-completed terms to retrieve. This must be a value between 1 - and 100. The default is 5. - :paramtype top: int - """ super(AutocompleteOptions, self).__init__(**kwargs) self.autocomplete_mode = autocomplete_mode self.filter = filter @@ -209,41 +121,41 @@ class AutocompleteRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar search_text: Required. The search text on which to base autocomplete results. - :vartype search_text: str - :ivar autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use + :param search_text: Required. The search text on which to base autocomplete results. + :type search_text: str + :param autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms. Possible values include: "oneTerm", "twoTerms", "oneTermWithContext". - :vartype autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode - :ivar filter: An OData expression that filters the documents used to produce completed terms + :type autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode + :param filter: An OData expression that filters the documents used to produce completed terms for the Autocomplete result. - :vartype filter: str - :ivar use_fuzzy_matching: A value indicating whether to use fuzzy matching for the autocomplete - query. Default is false. When set to true, the query will autocomplete terms even if there's a - substituted or missing character in the search text. While this provides a better experience in - some scenarios, it comes at a performance cost as fuzzy autocomplete queries are slower and - consume more resources. - :vartype use_fuzzy_matching: bool - :ivar highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :type filter: str + :param use_fuzzy_matching: A value indicating whether to use fuzzy matching for the + autocomplete query. Default is false. When set to true, the query will autocomplete terms even + if there's a substituted or missing character in the search text. While this provides a better + experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are + slower and consume more resources. + :type use_fuzzy_matching: bool + :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting is disabled. - :vartype highlight_post_tag: str - :ivar highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :type highlight_post_tag: str + :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting is disabled. - :vartype highlight_pre_tag: str - :ivar minimum_coverage: A number between 0 and 100 indicating the percentage of the index that + :type highlight_pre_tag: str + :param minimum_coverage: A number between 0 and 100 indicating the percentage of the index that must be covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. - :vartype minimum_coverage: float - :ivar search_fields: The comma-separated list of field names to consider when querying for + :type minimum_coverage: float + :param search_fields: The comma-separated list of field names to consider when querying for auto-completed terms. Target fields must be included in the specified suggester. - :vartype search_fields: str - :ivar suggester_name: Required. The name of the suggester as specified in the suggesters + :type search_fields: str + :param suggester_name: Required. The name of the suggester as specified in the suggesters collection that's part of the index definition. - :vartype suggester_name: str - :ivar top: The number of auto-completed terms to retrieve. This must be a value between 1 and + :type suggester_name: str + :param top: The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The default is 5. - :vartype top: int + :type top: int """ _validation = { @@ -279,43 +191,6 @@ def __init__( top: Optional[int] = None, **kwargs ): - """ - :keyword search_text: Required. The search text on which to base autocomplete results. - :paramtype search_text: str - :keyword autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use - 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing - auto-completed terms. Possible values include: "oneTerm", "twoTerms", "oneTermWithContext". - :paramtype autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode - :keyword filter: An OData expression that filters the documents used to produce completed terms - for the Autocomplete result. - :paramtype filter: str - :keyword use_fuzzy_matching: A value indicating whether to use fuzzy matching for the - autocomplete query. Default is false. When set to true, the query will autocomplete terms even - if there's a substituted or missing character in the search text. While this provides a better - experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are - slower and consume more resources. - :paramtype use_fuzzy_matching: bool - :keyword highlight_post_tag: A string tag that is appended to hit highlights. Must be set with - highlightPreTag. If omitted, hit highlighting is disabled. - :paramtype highlight_post_tag: str - :keyword highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with - highlightPostTag. If omitted, hit highlighting is disabled. - :paramtype highlight_pre_tag: str - :keyword minimum_coverage: A number between 0 and 100 indicating the percentage of the index - that must be covered by an autocomplete query in order for the query to be reported as a - success. This parameter can be useful for ensuring search availability even for services with - only one replica. The default is 80. - :paramtype minimum_coverage: float - :keyword search_fields: The comma-separated list of field names to consider when querying for - auto-completed terms. Target fields must be included in the specified suggester. - :paramtype search_fields: str - :keyword suggester_name: Required. The name of the suggester as specified in the suggesters - collection that's part of the index definition. - :paramtype suggester_name: str - :keyword top: The number of auto-completed terms to retrieve. This must be a value between 1 - and 100. The default is 5. - :paramtype top: int - """ super(AutocompleteRequest, self).__init__(**kwargs) self.search_text = search_text self.autocomplete_mode = autocomplete_mode @@ -357,65 +232,19 @@ def __init__( self, **kwargs ): - """ - """ super(AutocompleteResult, self).__init__(**kwargs) self.coverage = None self.results = None -class CaptionResult(msrest.serialization.Model): - """Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'.. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar additional_properties: Unmatched properties from the message are deserialized to this - collection. - :vartype additional_properties: dict[str, any] - :ivar text: A representative text passage extracted from the document most relevant to the - search query. - :vartype text: str - :ivar highlights: Same text passage as in the Text property with highlighted phrases most - relevant to the query. - :vartype highlights: str - """ - - _validation = { - 'text': {'readonly': True}, - 'highlights': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'text': {'key': 'text', 'type': 'str'}, - 'highlights': {'key': 'highlights', 'type': 'str'}, - } - - def __init__( - self, - *, - additional_properties: Optional[Dict[str, Any]] = None, - **kwargs - ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - """ - super(CaptionResult, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.text = None - self.highlights = None - - class FacetResult(msrest.serialization.Model): """A single bucket of a facet query result. Reports the number of documents with a field value falling within a particular range or having a particular value or interval. Variables are only populated by the server, and will be ignored when sending a request. - :ivar additional_properties: Unmatched properties from the message are deserialized to this + :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] + :type additional_properties: dict[str, any] :ivar count: The approximate count of documents falling within the bucket described by this facet. :vartype count: long @@ -436,11 +265,6 @@ def __init__( additional_properties: Optional[Dict[str, Any]] = None, **kwargs ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - """ super(FacetResult, self).__init__(**kwargs) self.additional_properties = additional_properties self.count = None @@ -449,12 +273,12 @@ def __init__( class IndexAction(msrest.serialization.Model): """Represents an index action that operates on a document. - :ivar additional_properties: Unmatched properties from the message are deserialized to this + :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] - :ivar action_type: The operation to perform on a document in an indexing batch. Possible values - include: "upload", "merge", "mergeOrUpload", "delete". - :vartype action_type: str or ~azure.search.documents.models.IndexActionType + :type additional_properties: dict[str, any] + :param action_type: The operation to perform on a document in an indexing batch. Possible + values include: "upload", "merge", "mergeOrUpload", "delete". + :type action_type: str or ~azure.search.documents.models.IndexActionType """ _attribute_map = { @@ -469,14 +293,6 @@ def __init__( action_type: Optional[Union[str, "IndexActionType"]] = None, **kwargs ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - :keyword action_type: The operation to perform on a document in an indexing batch. Possible - values include: "upload", "merge", "mergeOrUpload", "delete". - :paramtype action_type: str or ~azure.search.documents.models.IndexActionType - """ super(IndexAction, self).__init__(**kwargs) self.additional_properties = additional_properties self.action_type = action_type @@ -487,8 +303,8 @@ class IndexBatch(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar actions: Required. The actions in the batch. - :vartype actions: list[~azure.search.documents.models.IndexAction] + :param actions: Required. The actions in the batch. + :type actions: list[~azure.search.documents.models.IndexAction] """ _validation = { @@ -505,10 +321,6 @@ def __init__( actions: List["IndexAction"], **kwargs ): - """ - :keyword actions: Required. The actions in the batch. - :paramtype actions: list[~azure.search.documents.models.IndexAction] - """ super(IndexBatch, self).__init__(**kwargs) self.actions = actions @@ -537,8 +349,6 @@ def __init__( self, **kwargs ): - """ - """ super(IndexDocumentsResult, self).__init__(**kwargs) self.results = None @@ -583,8 +393,6 @@ def __init__( self, **kwargs ): - """ - """ super(IndexingResult, self).__init__(**kwargs) self.key = None self.error_message = None @@ -595,8 +403,8 @@ def __init__( class RequestOptions(msrest.serialization.Model): """Parameter group. - :ivar x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :vartype x_ms_client_request_id: str + :param x_ms_client_request_id: The tracking ID sent with the request to help with debugging. + :type x_ms_client_request_id: str """ _attribute_map = { @@ -609,10 +417,6 @@ def __init__( x_ms_client_request_id: Optional[str] = None, **kwargs ): - """ - :keyword x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :paramtype x_ms_client_request_id: str - """ super(RequestOptions, self).__init__(**kwargs) self.x_ms_client_request_id = x_ms_client_request_id @@ -635,9 +439,6 @@ class SearchDocumentsResult(msrest.serialization.Model): :ivar facets: The facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not include any facet expressions. :vartype facets: dict[str, list[~azure.search.documents.models.FacetResult]] - :ivar answers: The answers query results for the search operation; null if the answers query - parameter was not specified or set to 'none'. - :vartype answers: list[~azure.search.documents.models.AnswerResult] :ivar next_page_parameters: Continuation JSON payload returned when Azure Cognitive Search can't return all the requested results in a single Search response. You can use this JSON along with @odata.nextLink to formulate another POST Search request to get the next part of the @@ -656,7 +457,6 @@ class SearchDocumentsResult(msrest.serialization.Model): 'count': {'readonly': True}, 'coverage': {'readonly': True}, 'facets': {'readonly': True}, - 'answers': {'readonly': True}, 'next_page_parameters': {'readonly': True}, 'results': {'required': True, 'readonly': True}, 'next_link': {'readonly': True}, @@ -666,7 +466,6 @@ class SearchDocumentsResult(msrest.serialization.Model): 'count': {'key': '@odata\\.count', 'type': 'long'}, 'coverage': {'key': '@search\\.coverage', 'type': 'float'}, 'facets': {'key': '@search\\.facets', 'type': '{[FacetResult]}'}, - 'answers': {'key': '@search\\.answers', 'type': '[AnswerResult]'}, 'next_page_parameters': {'key': '@search\\.nextPageParameters', 'type': 'SearchRequest'}, 'results': {'key': 'value', 'type': '[SearchResult]'}, 'next_link': {'key': '@odata\\.nextLink', 'type': 'str'}, @@ -676,13 +475,10 @@ def __init__( self, **kwargs ): - """ - """ super(SearchDocumentsResult, self).__init__(**kwargs) self.count = None self.coverage = None self.facets = None - self.answers = None self.next_page_parameters = None self.results = None self.next_link = None @@ -719,8 +515,6 @@ def __init__( self, **kwargs ): - """ - """ super(SearchError, self).__init__(**kwargs) self.code = None self.message = None @@ -730,107 +524,79 @@ def __init__( class SearchOptions(msrest.serialization.Model): """Parameter group. - :ivar include_total_result_count: A value that specifies whether to fetch the total count of + :param include_total_result_count: A value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation. - :vartype include_total_result_count: bool - :ivar facets: The list of facet expressions to apply to the search query. Each facet expression - contains a field name, optionally followed by a comma-separated list of name:value pairs. - :vartype facets: list[str] - :ivar filter: The OData $filter expression to apply to the search query. - :vartype filter: str - :ivar highlight_fields: The list of field names to use for hit highlights. Only searchable + :type include_total_result_count: bool + :param facets: The list of facet expressions to apply to the search query. Each facet + expression contains a field name, optionally followed by a comma-separated list of name:value + pairs. + :type facets: list[str] + :param filter: The OData $filter expression to apply to the search query. + :type filter: str + :param highlight_fields: The list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting. - :vartype highlight_fields: list[str] - :ivar highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :type highlight_fields: list[str] + :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>. - :vartype highlight_post_tag: str - :ivar highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :type highlight_post_tag: str + :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>. - :vartype highlight_pre_tag: str - :ivar minimum_coverage: A number between 0 and 100 indicating the percentage of the index that + :type highlight_pre_tag: str + :param minimum_coverage: A number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100. - :vartype minimum_coverage: float - :ivar order_by: The list of OData $orderby expressions by which to sort the results. Each + :type minimum_coverage: float + :param order_by: The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, and desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no OrderBy is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. - :vartype order_by: list[str] - :ivar query_type: A value that specifies the syntax of the search query. The default is + :type order_by: list[str] + :param query_type: A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax. Possible values include: - "simple", "full", "semantic". - :vartype query_type: str or ~azure.search.documents.models.QueryType - :ivar scoring_parameters: The list of parameter values to be used in scoring functions (for + "simple", "full". + :type query_type: str or ~azure.search.documents.models.QueryType + :param scoring_parameters: The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be "mylocation--122.2,44.8" (without the quotes). - :vartype scoring_parameters: list[str] - :ivar scoring_profile: The name of a scoring profile to evaluate match scores for matching + :type scoring_parameters: list[str] + :param scoring_profile: The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. - :vartype scoring_profile: str - :ivar semantic_configuration: The name of the semantic configuration that lists which fields - should be used for semantic ranking, captions, highlights, and answers. - :vartype semantic_configuration: str - :ivar search_fields: The list of field names to which to scope the full-text search. When using - fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each - fielded search expression take precedence over any field names listed in this parameter. - :vartype search_fields: list[str] - :ivar query_language: The language of the query. Possible values include: "none", "en-us", - "en-gb", "en-in", "en-ca", "en-au", "fr-fr", "fr-ca", "de-de", "es-es", "es-mx", "zh-cn", - "zh-tw", "pt-br", "pt-pt", "it-it", "ja-jp", "ko-kr", "ru-ru", "cs-cz", "nl-be", "nl-nl", - "hu-hu", "pl-pl", "sv-se", "tr-tr", "hi-in", "ar-sa", "ar-eg", "ar-ma", "ar-kw", "ar-jo", - "da-dk", "no-no", "bg-bg", "hr-hr", "hr-ba", "ms-my", "ms-bn", "sl-sl", "ta-in", "vi-vn", - "el-gr", "ro-ro", "is-is", "id-id", "th-th", "lt-lt", "uk-ua", "lv-lv", "et-ee", "ca-es", - "fi-fi", "sr-ba", "sr-me", "sr-rs", "sk-sk", "nb-no", "hy-am", "bn-in", "eu-es", "gl-es", - "gu-in", "he-il", "ga-ie", "kn-in", "ml-in", "mr-in", "fa-ae", "pa-in", "te-in", "ur-pk". - :vartype query_language: str or ~azure.search.documents.models.QueryLanguage - :ivar speller: Improve search recall by spell-correcting individual search query terms. - Possible values include: "none", "lexicon". - :vartype speller: str or ~azure.search.documents.models.Speller - :ivar answers: This parameter is only valid if the query type is 'semantic'. If set, the query - returns answers extracted from key passages in the highest ranked documents. The number of - answers returned can be configured by appending the pipe character '|' followed by the - 'count-:code:``' option after the answers parameter value, such as - 'extractive|count-3'. Default count is 1. Possible values include: "none", "extractive". - :vartype answers: str or ~azure.search.documents.models.Answers - :ivar search_mode: A value that specifies whether any or all of the search terms must be + :type scoring_profile: str + :param search_fields: The list of field names to which to scope the full-text search. When + using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of + each fielded search expression take precedence over any field names listed in this parameter. + :type search_fields: list[str] + :param search_mode: A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. Possible values include: "any", "all". - :vartype search_mode: str or ~azure.search.documents.models.SearchMode - :ivar scoring_statistics: A value that specifies whether we want to calculate scoring + :type search_mode: str or ~azure.search.documents.models.SearchMode + :param scoring_statistics: A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. Possible values include: "local", "global". - :vartype scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics - :ivar session_id: A value to be used to create a sticky session, which can help to get more + :type scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics + :param session_id: A value to be used to create a sticky session, which can help to get more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character. - :vartype session_id: str - :ivar select: The list of fields to retrieve. If unspecified, all fields marked as retrievable + :type session_id: str + :param select: The list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included. - :vartype select: list[str] - :ivar skip: The number of search results to skip. This value cannot be greater than 100,000. If - you need to scan documents in sequence, but cannot use $skip due to this limitation, consider - using $orderby on a totally-ordered key and $filter with a range query instead. - :vartype skip: int - :ivar top: The number of search results to retrieve. This can be used in conjunction with $skip - to implement client-side paging of search results. If results are truncated due to server-side - paging, the response will include a continuation token that can be used to issue another Search - request for the next page of results. - :vartype top: int - :ivar captions: This parameter is only valid if the query type is 'semantic'. If set, the query - returns captions extracted from key passages in the highest ranked documents. When Captions is - set to 'extractive', highlighting is enabled by default, and can be configured by appending the - pipe character '|' followed by the 'highlight-' option, such as - 'extractive|highlight-true'. Defaults to 'None'. Possible values include: "none", "extractive". - :vartype captions: str or ~azure.search.documents.models.Captions - :ivar semantic_fields: The list of field names used for semantic search. - :vartype semantic_fields: list[str] + :type select: list[str] + :param skip: The number of search results to skip. This value cannot be greater than 100,000. + If you need to scan documents in sequence, but cannot use $skip due to this limitation, + consider using $orderby on a totally-ordered key and $filter with a range query instead. + :type skip: int + :param top: The number of search results to retrieve. This can be used in conjunction with + $skip to implement client-side paging of search results. If results are truncated due to + server-side paging, the response will include a continuation token that can be used to issue + another Search request for the next page of results. + :type top: int """ _attribute_map = { @@ -845,19 +611,13 @@ class SearchOptions(msrest.serialization.Model): 'query_type': {'key': 'queryType', 'type': 'str'}, 'scoring_parameters': {'key': 'ScoringParameters', 'type': '[str]'}, 'scoring_profile': {'key': 'scoringProfile', 'type': 'str'}, - 'semantic_configuration': {'key': 'semanticConfiguration', 'type': 'str'}, 'search_fields': {'key': 'searchFields', 'type': '[str]'}, - 'query_language': {'key': 'queryLanguage', 'type': 'str'}, - 'speller': {'key': 'speller', 'type': 'str'}, - 'answers': {'key': 'answers', 'type': 'str'}, 'search_mode': {'key': 'searchMode', 'type': 'str'}, 'scoring_statistics': {'key': 'scoringStatistics', 'type': 'str'}, 'session_id': {'key': 'sessionId', 'type': 'str'}, 'select': {'key': '$select', 'type': '[str]'}, 'skip': {'key': '$skip', 'type': 'int'}, 'top': {'key': '$top', 'type': 'int'}, - 'captions': {'key': 'captions', 'type': 'str'}, - 'semantic_fields': {'key': 'semanticFields', 'type': '[str]'}, } def __init__( @@ -874,125 +634,15 @@ def __init__( query_type: Optional[Union[str, "QueryType"]] = None, scoring_parameters: Optional[List[str]] = None, scoring_profile: Optional[str] = None, - semantic_configuration: Optional[str] = None, search_fields: Optional[List[str]] = None, - query_language: Optional[Union[str, "QueryLanguage"]] = None, - speller: Optional[Union[str, "Speller"]] = None, - answers: Optional[Union[str, "Answers"]] = None, search_mode: Optional[Union[str, "SearchMode"]] = None, scoring_statistics: Optional[Union[str, "ScoringStatistics"]] = None, session_id: Optional[str] = None, select: Optional[List[str]] = None, skip: Optional[int] = None, top: Optional[int] = None, - captions: Optional[Union[str, "Captions"]] = None, - semantic_fields: Optional[List[str]] = None, **kwargs ): - """ - :keyword include_total_result_count: A value that specifies whether to fetch the total count of - results. Default is false. Setting this value to true may have a performance impact. Note that - the count returned is an approximation. - :paramtype include_total_result_count: bool - :keyword facets: The list of facet expressions to apply to the search query. Each facet - expression contains a field name, optionally followed by a comma-separated list of name:value - pairs. - :paramtype facets: list[str] - :keyword filter: The OData $filter expression to apply to the search query. - :paramtype filter: str - :keyword highlight_fields: The list of field names to use for hit highlights. Only searchable - fields can be used for hit highlighting. - :paramtype highlight_fields: list[str] - :keyword highlight_post_tag: A string tag that is appended to hit highlights. Must be set with - highlightPreTag. Default is </em>. - :paramtype highlight_post_tag: str - :keyword highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with - highlightPostTag. Default is <em>. - :paramtype highlight_pre_tag: str - :keyword minimum_coverage: A number between 0 and 100 indicating the percentage of the index - that must be covered by a search query in order for the query to be reported as a success. This - parameter can be useful for ensuring search availability even for services with only one - replica. The default is 100. - :paramtype minimum_coverage: float - :keyword order_by: The list of OData $orderby expressions by which to sort the results. Each - expression can be either a field name or a call to either the geo.distance() or the - search.score() functions. Each expression can be followed by asc to indicate ascending, and - desc to indicate descending. The default is ascending order. Ties will be broken by the match - scores of documents. If no OrderBy is specified, the default sort order is descending by - document match score. There can be at most 32 $orderby clauses. - :paramtype order_by: list[str] - :keyword query_type: A value that specifies the syntax of the search query. The default is - 'simple'. Use 'full' if your query uses the Lucene query syntax. Possible values include: - "simple", "full", "semantic". - :paramtype query_type: str or ~azure.search.documents.models.QueryType - :keyword scoring_parameters: The list of parameter values to be used in scoring functions (for - example, referencePointParameter) using the format name-values. For example, if the scoring - profile defines a function with a parameter called 'mylocation' the parameter string would be - "mylocation--122.2,44.8" (without the quotes). - :paramtype scoring_parameters: list[str] - :keyword scoring_profile: The name of a scoring profile to evaluate match scores for matching - documents in order to sort the results. - :paramtype scoring_profile: str - :keyword semantic_configuration: The name of the semantic configuration that lists which fields - should be used for semantic ranking, captions, highlights, and answers. - :paramtype semantic_configuration: str - :keyword search_fields: The list of field names to which to scope the full-text search. When - using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of - each fielded search expression take precedence over any field names listed in this parameter. - :paramtype search_fields: list[str] - :keyword query_language: The language of the query. Possible values include: "none", "en-us", - "en-gb", "en-in", "en-ca", "en-au", "fr-fr", "fr-ca", "de-de", "es-es", "es-mx", "zh-cn", - "zh-tw", "pt-br", "pt-pt", "it-it", "ja-jp", "ko-kr", "ru-ru", "cs-cz", "nl-be", "nl-nl", - "hu-hu", "pl-pl", "sv-se", "tr-tr", "hi-in", "ar-sa", "ar-eg", "ar-ma", "ar-kw", "ar-jo", - "da-dk", "no-no", "bg-bg", "hr-hr", "hr-ba", "ms-my", "ms-bn", "sl-sl", "ta-in", "vi-vn", - "el-gr", "ro-ro", "is-is", "id-id", "th-th", "lt-lt", "uk-ua", "lv-lv", "et-ee", "ca-es", - "fi-fi", "sr-ba", "sr-me", "sr-rs", "sk-sk", "nb-no", "hy-am", "bn-in", "eu-es", "gl-es", - "gu-in", "he-il", "ga-ie", "kn-in", "ml-in", "mr-in", "fa-ae", "pa-in", "te-in", "ur-pk". - :paramtype query_language: str or ~azure.search.documents.models.QueryLanguage - :keyword speller: Improve search recall by spell-correcting individual search query terms. - Possible values include: "none", "lexicon". - :paramtype speller: str or ~azure.search.documents.models.Speller - :keyword answers: This parameter is only valid if the query type is 'semantic'. If set, the - query returns answers extracted from key passages in the highest ranked documents. The number - of answers returned can be configured by appending the pipe character '|' followed by the - 'count-:code:``' option after the answers parameter value, such as - 'extractive|count-3'. Default count is 1. Possible values include: "none", "extractive". - :paramtype answers: str or ~azure.search.documents.models.Answers - :keyword search_mode: A value that specifies whether any or all of the search terms must be - matched in order to count the document as a match. Possible values include: "any", "all". - :paramtype search_mode: str or ~azure.search.documents.models.SearchMode - :keyword scoring_statistics: A value that specifies whether we want to calculate scoring - statistics (such as document frequency) globally for more consistent scoring, or locally, for - lower latency. Possible values include: "local", "global". - :paramtype scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics - :keyword session_id: A value to be used to create a sticky session, which can help to get more - consistent results. As long as the same sessionId is used, a best-effort attempt will be made - to target the same replica set. Be wary that reusing the same sessionID values repeatedly can - interfere with the load balancing of the requests across replicas and adversely affect the - performance of the search service. The value used as sessionId cannot start with a '_' - character. - :paramtype session_id: str - :keyword select: The list of fields to retrieve. If unspecified, all fields marked as - retrievable in the schema are included. - :paramtype select: list[str] - :keyword skip: The number of search results to skip. This value cannot be greater than 100,000. - If you need to scan documents in sequence, but cannot use $skip due to this limitation, - consider using $orderby on a totally-ordered key and $filter with a range query instead. - :paramtype skip: int - :keyword top: The number of search results to retrieve. This can be used in conjunction with - $skip to implement client-side paging of search results. If results are truncated due to - server-side paging, the response will include a continuation token that can be used to issue - another Search request for the next page of results. - :paramtype top: int - :keyword captions: This parameter is only valid if the query type is 'semantic'. If set, the - query returns captions extracted from key passages in the highest ranked documents. When - Captions is set to 'extractive', highlighting is enabled by default, and can be configured by - appending the pipe character '|' followed by the 'highlight-' option, such as - 'extractive|highlight-true'. Defaults to 'None'. Possible values include: "none", "extractive". - :paramtype captions: str or ~azure.search.documents.models.Captions - :keyword semantic_fields: The list of field names used for semantic search. - :paramtype semantic_fields: list[str] - """ super(SearchOptions, self).__init__(**kwargs) self.include_total_result_count = include_total_result_count self.facets = facets @@ -1005,126 +655,97 @@ def __init__( self.query_type = query_type self.scoring_parameters = scoring_parameters self.scoring_profile = scoring_profile - self.semantic_configuration = semantic_configuration self.search_fields = search_fields - self.query_language = query_language - self.speller = speller - self.answers = answers self.search_mode = search_mode self.scoring_statistics = scoring_statistics self.session_id = session_id self.select = select self.skip = skip self.top = top - self.captions = captions - self.semantic_fields = semantic_fields class SearchRequest(msrest.serialization.Model): """Parameters for filtering, sorting, faceting, paging, and other search query behaviors. - :ivar include_total_result_count: A value that specifies whether to fetch the total count of + :param include_total_result_count: A value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation. - :vartype include_total_result_count: bool - :ivar facets: The list of facet expressions to apply to the search query. Each facet expression - contains a field name, optionally followed by a comma-separated list of name:value pairs. - :vartype facets: list[str] - :ivar filter: The OData $filter expression to apply to the search query. - :vartype filter: str - :ivar highlight_fields: The comma-separated list of field names to use for hit highlights. Only - searchable fields can be used for hit highlighting. - :vartype highlight_fields: str - :ivar highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :type include_total_result_count: bool + :param facets: The list of facet expressions to apply to the search query. Each facet + expression contains a field name, optionally followed by a comma-separated list of name:value + pairs. + :type facets: list[str] + :param filter: The OData $filter expression to apply to the search query. + :type filter: str + :param highlight_fields: The comma-separated list of field names to use for hit highlights. + Only searchable fields can be used for hit highlighting. + :type highlight_fields: str + :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>. - :vartype highlight_post_tag: str - :ivar highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :type highlight_post_tag: str + :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>. - :vartype highlight_pre_tag: str - :ivar minimum_coverage: A number between 0 and 100 indicating the percentage of the index that + :type highlight_pre_tag: str + :param minimum_coverage: A number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100. - :vartype minimum_coverage: float - :ivar order_by: The comma-separated list of OData $orderby expressions by which to sort the + :type minimum_coverage: float + :param order_by: The comma-separated list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. - :vartype order_by: str - :ivar query_type: A value that specifies the syntax of the search query. The default is + :type order_by: str + :param query_type: A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax. Possible values include: - "simple", "full", "semantic". - :vartype query_type: str or ~azure.search.documents.models.QueryType - :ivar scoring_statistics: A value that specifies whether we want to calculate scoring + "simple", "full". + :type query_type: str or ~azure.search.documents.models.QueryType + :param scoring_statistics: A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global scoring statistics can increase latency of search queries. Possible values include: "local", "global". - :vartype scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics - :ivar session_id: A value to be used to create a sticky session, which can help getting more + :type scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics + :param session_id: A value to be used to create a sticky session, which can help getting more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character. - :vartype session_id: str - :ivar scoring_parameters: The list of parameter values to be used in scoring functions (for + :type session_id: str + :param scoring_parameters: The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be "mylocation--122.2,44.8" (without the quotes). - :vartype scoring_parameters: list[str] - :ivar scoring_profile: The name of a scoring profile to evaluate match scores for matching + :type scoring_parameters: list[str] + :param scoring_profile: The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. - :vartype scoring_profile: str - :ivar semantic_configuration: The name of a semantic configuration that will be used when - processing documents for queries of type semantic. - :vartype semantic_configuration: str - :ivar search_text: A full-text search query expression; Use "*" or omit this parameter to match - all documents. - :vartype search_text: str - :ivar search_fields: The comma-separated list of field names to which to scope the full-text + :type scoring_profile: str + :param search_text: A full-text search query expression; Use "*" or omit this parameter to + match all documents. + :type search_text: str + :param search_fields: The comma-separated list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter. - :vartype search_fields: str - :ivar search_mode: A value that specifies whether any or all of the search terms must be + :type search_fields: str + :param search_mode: A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. Possible values include: "any", "all". - :vartype search_mode: str or ~azure.search.documents.models.SearchMode - :ivar query_language: A value that specifies the language of the search query. Possible values - include: "none", "en-us", "en-gb", "en-in", "en-ca", "en-au", "fr-fr", "fr-ca", "de-de", - "es-es", "es-mx", "zh-cn", "zh-tw", "pt-br", "pt-pt", "it-it", "ja-jp", "ko-kr", "ru-ru", - "cs-cz", "nl-be", "nl-nl", "hu-hu", "pl-pl", "sv-se", "tr-tr", "hi-in", "ar-sa", "ar-eg", - "ar-ma", "ar-kw", "ar-jo", "da-dk", "no-no", "bg-bg", "hr-hr", "hr-ba", "ms-my", "ms-bn", - "sl-sl", "ta-in", "vi-vn", "el-gr", "ro-ro", "is-is", "id-id", "th-th", "lt-lt", "uk-ua", - "lv-lv", "et-ee", "ca-es", "fi-fi", "sr-ba", "sr-me", "sr-rs", "sk-sk", "nb-no", "hy-am", - "bn-in", "eu-es", "gl-es", "gu-in", "he-il", "ga-ie", "kn-in", "ml-in", "mr-in", "fa-ae", - "pa-in", "te-in", "ur-pk". - :vartype query_language: str or ~azure.search.documents.models.QueryLanguage - :ivar speller: A value that specified the type of the speller to use to spell-correct - individual search query terms. Possible values include: "none", "lexicon". - :vartype speller: str or ~azure.search.documents.models.QuerySpellerType - :ivar answers: A value that specifies whether answers should be returned as part of the search - response. Possible values include: "none", "extractive". - :vartype answers: str or ~azure.search.documents.models.QueryAnswerType - :ivar select: The comma-separated list of fields to retrieve. If unspecified, all fields marked - as retrievable in the schema are included. - :vartype select: str - :ivar skip: The number of search results to skip. This value cannot be greater than 100,000. If - you need to scan documents in sequence, but cannot use skip due to this limitation, consider + :type search_mode: str or ~azure.search.documents.models.SearchMode + :param select: The comma-separated list of fields to retrieve. If unspecified, all fields + marked as retrievable in the schema are included. + :type select: str + :param skip: The number of search results to skip. This value cannot be greater than 100,000. + If you need to scan documents in sequence, but cannot use skip due to this limitation, consider using orderby on a totally-ordered key and filter with a range query instead. - :vartype skip: int - :ivar top: The number of search results to retrieve. This can be used in conjunction with $skip - to implement client-side paging of search results. If results are truncated due to server-side - paging, the response will include a continuation token that can be used to issue another Search - request for the next page of results. - :vartype top: int - :ivar captions: A value that specifies whether captions should be returned as part of the - search response. Possible values include: "none", "extractive". - :vartype captions: str or ~azure.search.documents.models.QueryCaptionType - :ivar semantic_fields: The comma-separated list of field names used for semantic search. - :vartype semantic_fields: str + :type skip: int + :param top: The number of search results to retrieve. This can be used in conjunction with + $skip to implement client-side paging of search results. If results are truncated due to + server-side paging, the response will include a continuation token that can be used to issue + another Search request for the next page of results. + :type top: int """ _attribute_map = { @@ -1141,18 +762,12 @@ class SearchRequest(msrest.serialization.Model): 'session_id': {'key': 'sessionId', 'type': 'str'}, 'scoring_parameters': {'key': 'scoringParameters', 'type': '[str]'}, 'scoring_profile': {'key': 'scoringProfile', 'type': 'str'}, - 'semantic_configuration': {'key': 'semanticConfiguration', 'type': 'str'}, 'search_text': {'key': 'search', 'type': 'str'}, 'search_fields': {'key': 'searchFields', 'type': 'str'}, 'search_mode': {'key': 'searchMode', 'type': 'str'}, - 'query_language': {'key': 'queryLanguage', 'type': 'str'}, - 'speller': {'key': 'speller', 'type': 'str'}, - 'answers': {'key': 'answers', 'type': 'str'}, 'select': {'key': 'select', 'type': 'str'}, 'skip': {'key': 'skip', 'type': 'int'}, 'top': {'key': 'top', 'type': 'int'}, - 'captions': {'key': 'captions', 'type': 'str'}, - 'semantic_fields': {'key': 'semanticFields', 'type': 'str'}, } def __init__( @@ -1171,125 +786,14 @@ def __init__( session_id: Optional[str] = None, scoring_parameters: Optional[List[str]] = None, scoring_profile: Optional[str] = None, - semantic_configuration: Optional[str] = None, search_text: Optional[str] = None, search_fields: Optional[str] = None, search_mode: Optional[Union[str, "SearchMode"]] = None, - query_language: Optional[Union[str, "QueryLanguage"]] = None, - speller: Optional[Union[str, "QuerySpellerType"]] = None, - answers: Optional[Union[str, "QueryAnswerType"]] = None, select: Optional[str] = None, skip: Optional[int] = None, top: Optional[int] = None, - captions: Optional[Union[str, "QueryCaptionType"]] = None, - semantic_fields: Optional[str] = None, **kwargs ): - """ - :keyword include_total_result_count: A value that specifies whether to fetch the total count of - results. Default is false. Setting this value to true may have a performance impact. Note that - the count returned is an approximation. - :paramtype include_total_result_count: bool - :keyword facets: The list of facet expressions to apply to the search query. Each facet - expression contains a field name, optionally followed by a comma-separated list of name:value - pairs. - :paramtype facets: list[str] - :keyword filter: The OData $filter expression to apply to the search query. - :paramtype filter: str - :keyword highlight_fields: The comma-separated list of field names to use for hit highlights. - Only searchable fields can be used for hit highlighting. - :paramtype highlight_fields: str - :keyword highlight_post_tag: A string tag that is appended to hit highlights. Must be set with - highlightPreTag. Default is </em>. - :paramtype highlight_post_tag: str - :keyword highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with - highlightPostTag. Default is <em>. - :paramtype highlight_pre_tag: str - :keyword minimum_coverage: A number between 0 and 100 indicating the percentage of the index - that must be covered by a search query in order for the query to be reported as a success. This - parameter can be useful for ensuring search availability even for services with only one - replica. The default is 100. - :paramtype minimum_coverage: float - :keyword order_by: The comma-separated list of OData $orderby expressions by which to sort the - results. Each expression can be either a field name or a call to either the geo.distance() or - the search.score() functions. Each expression can be followed by asc to indicate ascending, or - desc to indicate descending. The default is ascending order. Ties will be broken by the match - scores of documents. If no $orderby is specified, the default sort order is descending by - document match score. There can be at most 32 $orderby clauses. - :paramtype order_by: str - :keyword query_type: A value that specifies the syntax of the search query. The default is - 'simple'. Use 'full' if your query uses the Lucene query syntax. Possible values include: - "simple", "full", "semantic". - :paramtype query_type: str or ~azure.search.documents.models.QueryType - :keyword scoring_statistics: A value that specifies whether we want to calculate scoring - statistics (such as document frequency) globally for more consistent scoring, or locally, for - lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally - before scoring. Using global scoring statistics can increase latency of search queries. - Possible values include: "local", "global". - :paramtype scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics - :keyword session_id: A value to be used to create a sticky session, which can help getting more - consistent results. As long as the same sessionId is used, a best-effort attempt will be made - to target the same replica set. Be wary that reusing the same sessionID values repeatedly can - interfere with the load balancing of the requests across replicas and adversely affect the - performance of the search service. The value used as sessionId cannot start with a '_' - character. - :paramtype session_id: str - :keyword scoring_parameters: The list of parameter values to be used in scoring functions (for - example, referencePointParameter) using the format name-values. For example, if the scoring - profile defines a function with a parameter called 'mylocation' the parameter string would be - "mylocation--122.2,44.8" (without the quotes). - :paramtype scoring_parameters: list[str] - :keyword scoring_profile: The name of a scoring profile to evaluate match scores for matching - documents in order to sort the results. - :paramtype scoring_profile: str - :keyword semantic_configuration: The name of a semantic configuration that will be used when - processing documents for queries of type semantic. - :paramtype semantic_configuration: str - :keyword search_text: A full-text search query expression; Use "*" or omit this parameter to - match all documents. - :paramtype search_text: str - :keyword search_fields: The comma-separated list of field names to which to scope the full-text - search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the - field names of each fielded search expression take precedence over any field names listed in - this parameter. - :paramtype search_fields: str - :keyword search_mode: A value that specifies whether any or all of the search terms must be - matched in order to count the document as a match. Possible values include: "any", "all". - :paramtype search_mode: str or ~azure.search.documents.models.SearchMode - :keyword query_language: A value that specifies the language of the search query. Possible - values include: "none", "en-us", "en-gb", "en-in", "en-ca", "en-au", "fr-fr", "fr-ca", "de-de", - "es-es", "es-mx", "zh-cn", "zh-tw", "pt-br", "pt-pt", "it-it", "ja-jp", "ko-kr", "ru-ru", - "cs-cz", "nl-be", "nl-nl", "hu-hu", "pl-pl", "sv-se", "tr-tr", "hi-in", "ar-sa", "ar-eg", - "ar-ma", "ar-kw", "ar-jo", "da-dk", "no-no", "bg-bg", "hr-hr", "hr-ba", "ms-my", "ms-bn", - "sl-sl", "ta-in", "vi-vn", "el-gr", "ro-ro", "is-is", "id-id", "th-th", "lt-lt", "uk-ua", - "lv-lv", "et-ee", "ca-es", "fi-fi", "sr-ba", "sr-me", "sr-rs", "sk-sk", "nb-no", "hy-am", - "bn-in", "eu-es", "gl-es", "gu-in", "he-il", "ga-ie", "kn-in", "ml-in", "mr-in", "fa-ae", - "pa-in", "te-in", "ur-pk". - :paramtype query_language: str or ~azure.search.documents.models.QueryLanguage - :keyword speller: A value that specified the type of the speller to use to spell-correct - individual search query terms. Possible values include: "none", "lexicon". - :paramtype speller: str or ~azure.search.documents.models.QuerySpellerType - :keyword answers: A value that specifies whether answers should be returned as part of the - search response. Possible values include: "none", "extractive". - :paramtype answers: str or ~azure.search.documents.models.QueryAnswerType - :keyword select: The comma-separated list of fields to retrieve. If unspecified, all fields - marked as retrievable in the schema are included. - :paramtype select: str - :keyword skip: The number of search results to skip. This value cannot be greater than 100,000. - If you need to scan documents in sequence, but cannot use skip due to this limitation, consider - using orderby on a totally-ordered key and filter with a range query instead. - :paramtype skip: int - :keyword top: The number of search results to retrieve. This can be used in conjunction with - $skip to implement client-side paging of search results. If results are truncated due to - server-side paging, the response will include a continuation token that can be used to issue - another Search request for the next page of results. - :paramtype top: int - :keyword captions: A value that specifies whether captions should be returned as part of the - search response. Possible values include: "none", "extractive". - :paramtype captions: str or ~azure.search.documents.models.QueryCaptionType - :keyword semantic_fields: The comma-separated list of field names used for semantic search. - :paramtype semantic_fields: str - """ super(SearchRequest, self).__init__(**kwargs) self.include_total_result_count = include_total_result_count self.facets = facets @@ -1304,18 +808,12 @@ def __init__( self.session_id = session_id self.scoring_parameters = scoring_parameters self.scoring_profile = scoring_profile - self.semantic_configuration = semantic_configuration self.search_text = search_text self.search_fields = search_fields self.search_mode = search_mode - self.query_language = query_language - self.speller = speller - self.answers = answers self.select = select self.skip = skip self.top = top - self.captions = captions - self.semantic_fields = semantic_fields class SearchResult(msrest.serialization.Model): @@ -1325,38 +823,26 @@ class SearchResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar additional_properties: Unmatched properties from the message are deserialized to this + :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] + :type additional_properties: dict[str, any] :ivar score: Required. The relevance score of the document compared to other documents returned by the query. :vartype score: float - :ivar reranker_score: The relevance score computed by the semantic ranker for the top search - results. Search results are sorted by the RerankerScore first and then by the Score. - RerankerScore is only returned for queries of type 'semantic'. - :vartype reranker_score: float :ivar highlights: Text fragments from the document that indicate the matching search terms, organized by each applicable field; null if hit highlighting was not enabled for the query. :vartype highlights: dict[str, list[str]] - :ivar captions: Captions are the most representative passages from the document relatively to - the search query. They are often used as document summary. Captions are only returned for - queries of type 'semantic'. - :vartype captions: list[~azure.search.documents.models.CaptionResult] """ _validation = { 'score': {'required': True, 'readonly': True}, - 'reranker_score': {'readonly': True}, 'highlights': {'readonly': True}, - 'captions': {'readonly': True}, } _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'score': {'key': '@search\\.score', 'type': 'float'}, - 'reranker_score': {'key': '@search\\.rerankerScore', 'type': 'float'}, 'highlights': {'key': '@search\\.highlights', 'type': '{[str]}'}, - 'captions': {'key': '@search\\.captions', 'type': '[CaptionResult]'}, } def __init__( @@ -1365,17 +851,10 @@ def __init__( additional_properties: Optional[Dict[str, Any]] = None, **kwargs ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - """ super(SearchResult, self).__init__(**kwargs) self.additional_properties = additional_properties self.score = None - self.reranker_score = None self.highlights = None - self.captions = None class SuggestDocumentsResult(msrest.serialization.Model): @@ -1406,8 +885,6 @@ def __init__( self, **kwargs ): - """ - """ super(SuggestDocumentsResult, self).__init__(**kwargs) self.results = None self.coverage = None @@ -1416,41 +893,41 @@ def __init__( class SuggestOptions(msrest.serialization.Model): """Parameter group. - :ivar filter: An OData expression that filters the documents considered for suggestions. - :vartype filter: str - :ivar use_fuzzy_matching: A value indicating whether to use fuzzy matching for the suggestions + :param filter: An OData expression that filters the documents considered for suggestions. + :type filter: str + :param use_fuzzy_matching: A value indicating whether to use fuzzy matching for the suggestions query. Default is false. When set to true, the query will find terms even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy suggestions queries are slower and consume more resources. - :vartype use_fuzzy_matching: bool - :ivar highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :type use_fuzzy_matching: bool + :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting of suggestions is disabled. - :vartype highlight_post_tag: str - :ivar highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :type highlight_post_tag: str + :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting of suggestions is disabled. - :vartype highlight_pre_tag: str - :ivar minimum_coverage: A number between 0 and 100 indicating the percentage of the index that + :type highlight_pre_tag: str + :param minimum_coverage: A number between 0 and 100 indicating the percentage of the index that must be covered by a suggestions query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. - :vartype minimum_coverage: float - :ivar order_by: The list of OData $orderby expressions by which to sort the results. Each + :type minimum_coverage: float + :param order_by: The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. - :vartype order_by: list[str] - :ivar search_fields: The list of field names to search for the specified search text. Target + :type order_by: list[str] + :param search_fields: The list of field names to search for the specified search text. Target fields must be included in the specified suggester. - :vartype search_fields: list[str] - :ivar select: The list of fields to retrieve. If unspecified, only the key field will be + :type search_fields: list[str] + :param select: The list of fields to retrieve. If unspecified, only the key field will be included in the results. - :vartype select: list[str] - :ivar top: The number of suggestions to retrieve. The value must be a number between 1 and 100. - The default is 5. - :vartype top: int + :type select: list[str] + :param top: The number of suggestions to retrieve. The value must be a number between 1 and + 100. The default is 5. + :type top: int """ _attribute_map = { @@ -1479,43 +956,6 @@ def __init__( top: Optional[int] = None, **kwargs ): - """ - :keyword filter: An OData expression that filters the documents considered for suggestions. - :paramtype filter: str - :keyword use_fuzzy_matching: A value indicating whether to use fuzzy matching for the - suggestions query. Default is false. When set to true, the query will find terms even if - there's a substituted or missing character in the search text. While this provides a better - experience in some scenarios, it comes at a performance cost as fuzzy suggestions queries are - slower and consume more resources. - :paramtype use_fuzzy_matching: bool - :keyword highlight_post_tag: A string tag that is appended to hit highlights. Must be set with - highlightPreTag. If omitted, hit highlighting of suggestions is disabled. - :paramtype highlight_post_tag: str - :keyword highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with - highlightPostTag. If omitted, hit highlighting of suggestions is disabled. - :paramtype highlight_pre_tag: str - :keyword minimum_coverage: A number between 0 and 100 indicating the percentage of the index - that must be covered by a suggestions query in order for the query to be reported as a success. - This parameter can be useful for ensuring search availability even for services with only one - replica. The default is 80. - :paramtype minimum_coverage: float - :keyword order_by: The list of OData $orderby expressions by which to sort the results. Each - expression can be either a field name or a call to either the geo.distance() or the - search.score() functions. Each expression can be followed by asc to indicate ascending, or desc - to indicate descending. The default is ascending order. Ties will be broken by the match scores - of documents. If no $orderby is specified, the default sort order is descending by document - match score. There can be at most 32 $orderby clauses. - :paramtype order_by: list[str] - :keyword search_fields: The list of field names to search for the specified search text. Target - fields must be included in the specified suggester. - :paramtype search_fields: list[str] - :keyword select: The list of fields to retrieve. If unspecified, only the key field will be - included in the results. - :paramtype select: list[str] - :keyword top: The number of suggestions to retrieve. The value must be a number between 1 and - 100. The default is 5. - :paramtype top: int - """ super(SuggestOptions, self).__init__(**kwargs) self.filter = filter self.use_fuzzy_matching = use_fuzzy_matching @@ -1533,47 +973,47 @@ class SuggestRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar filter: An OData expression that filters the documents considered for suggestions. - :vartype filter: str - :ivar use_fuzzy_matching: A value indicating whether to use fuzzy matching for the suggestion + :param filter: An OData expression that filters the documents considered for suggestions. + :type filter: str + :param use_fuzzy_matching: A value indicating whether to use fuzzy matching for the suggestion query. Default is false. When set to true, the query will find suggestions even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy suggestion searches are slower and consume more resources. - :vartype use_fuzzy_matching: bool - :ivar highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :type use_fuzzy_matching: bool + :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting of suggestions is disabled. - :vartype highlight_post_tag: str - :ivar highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :type highlight_post_tag: str + :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting of suggestions is disabled. - :vartype highlight_pre_tag: str - :ivar minimum_coverage: A number between 0 and 100 indicating the percentage of the index that + :type highlight_pre_tag: str + :param minimum_coverage: A number between 0 and 100 indicating the percentage of the index that must be covered by a suggestion query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. - :vartype minimum_coverage: float - :ivar order_by: The comma-separated list of OData $orderby expressions by which to sort the + :type minimum_coverage: float + :param order_by: The comma-separated list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. - :vartype order_by: str - :ivar search_text: Required. The search text to use to suggest documents. Must be at least 1 + :type order_by: str + :param search_text: Required. The search text to use to suggest documents. Must be at least 1 character, and no more than 100 characters. - :vartype search_text: str - :ivar search_fields: The comma-separated list of field names to search for the specified search - text. Target fields must be included in the specified suggester. - :vartype search_fields: str - :ivar select: The comma-separated list of fields to retrieve. If unspecified, only the key + :type search_text: str + :param search_fields: The comma-separated list of field names to search for the specified + search text. Target fields must be included in the specified suggester. + :type search_fields: str + :param select: The comma-separated list of fields to retrieve. If unspecified, only the key field will be included in the results. - :vartype select: str - :ivar suggester_name: Required. The name of the suggester as specified in the suggesters + :type select: str + :param suggester_name: Required. The name of the suggester as specified in the suggesters collection that's part of the index definition. - :vartype suggester_name: str - :ivar top: The number of suggestions to retrieve. This must be a value between 1 and 100. The + :type suggester_name: str + :param top: The number of suggestions to retrieve. This must be a value between 1 and 100. The default is 5. - :vartype top: int + :type top: int """ _validation = { @@ -1611,49 +1051,6 @@ def __init__( top: Optional[int] = None, **kwargs ): - """ - :keyword filter: An OData expression that filters the documents considered for suggestions. - :paramtype filter: str - :keyword use_fuzzy_matching: A value indicating whether to use fuzzy matching for the - suggestion query. Default is false. When set to true, the query will find suggestions even if - there's a substituted or missing character in the search text. While this provides a better - experience in some scenarios, it comes at a performance cost as fuzzy suggestion searches are - slower and consume more resources. - :paramtype use_fuzzy_matching: bool - :keyword highlight_post_tag: A string tag that is appended to hit highlights. Must be set with - highlightPreTag. If omitted, hit highlighting of suggestions is disabled. - :paramtype highlight_post_tag: str - :keyword highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with - highlightPostTag. If omitted, hit highlighting of suggestions is disabled. - :paramtype highlight_pre_tag: str - :keyword minimum_coverage: A number between 0 and 100 indicating the percentage of the index - that must be covered by a suggestion query in order for the query to be reported as a success. - This parameter can be useful for ensuring search availability even for services with only one - replica. The default is 80. - :paramtype minimum_coverage: float - :keyword order_by: The comma-separated list of OData $orderby expressions by which to sort the - results. Each expression can be either a field name or a call to either the geo.distance() or - the search.score() functions. Each expression can be followed by asc to indicate ascending, or - desc to indicate descending. The default is ascending order. Ties will be broken by the match - scores of documents. If no $orderby is specified, the default sort order is descending by - document match score. There can be at most 32 $orderby clauses. - :paramtype order_by: str - :keyword search_text: Required. The search text to use to suggest documents. Must be at least 1 - character, and no more than 100 characters. - :paramtype search_text: str - :keyword search_fields: The comma-separated list of field names to search for the specified - search text. Target fields must be included in the specified suggester. - :paramtype search_fields: str - :keyword select: The comma-separated list of fields to retrieve. If unspecified, only the key - field will be included in the results. - :paramtype select: str - :keyword suggester_name: Required. The name of the suggester as specified in the suggesters - collection that's part of the index definition. - :paramtype suggester_name: str - :keyword top: The number of suggestions to retrieve. This must be a value between 1 and 100. - The default is 5. - :paramtype top: int - """ super(SuggestRequest, self).__init__(**kwargs) self.filter = filter self.use_fuzzy_matching = use_fuzzy_matching @@ -1675,9 +1072,9 @@ class SuggestResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar additional_properties: Unmatched properties from the message are deserialized to this + :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] + :type additional_properties: dict[str, any] :ivar text: Required. The text of the suggestion result. :vartype text: str """ @@ -1697,11 +1094,6 @@ def __init__( additional_properties: Optional[Dict[str, Any]] = None, **kwargs ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - """ super(SuggestResult, self).__init__(**kwargs) self.additional_properties = additional_properties self.text = None diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/models/_search_client_enums.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/models/_search_client_enums.py index 0302ceefc12a..55dfae9b60ad 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/models/_search_client_enums.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_generated/models/_search_client_enums.py @@ -6,20 +6,27 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum +from enum import Enum, EnumMeta from six import with_metaclass -from azure.core import CaseInsensitiveEnumMeta +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) -class Answers(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) - #: Do not return answers for the query. - NONE = "none" - #: Extracts answer candidates from the contents of the documents returned in response to a query - #: expressed as a question in natural language. - EXTRACTIVE = "extractive" -class AutocompleteMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class AutocompleteMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context in producing autocomplete terms. """ @@ -36,15 +43,7 @@ class AutocompleteMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: terms could include 'washington medicaid' and 'washington medical'. ONE_TERM_WITH_CONTEXT = "oneTermWithContext" -class Captions(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - #: Do not return captions for the query. - NONE = "none" - #: Extracts captions from the matching documents that contain passages relevant to the search - #: query. - EXTRACTIVE = "extractive" - -class IndexActionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class IndexActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The operation to perform on a document in an indexing batch. """ @@ -63,196 +62,9 @@ class IndexActionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: document, use merge instead and set the field explicitly to null. DELETE = "delete" -class QueryAnswerType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """This parameter is only valid if the query type is 'semantic'. If set, the query returns answers - extracted from key passages in the highest ranked documents. The number of answers returned can - be configured by appending the pipe character '|' followed by the 'count-:code:``' option after the answers parameter value, such as 'extractive|count-3'. Default - count is 1. - """ - - #: Do not return answers for the query. - NONE = "none" - #: Extracts answer candidates from the contents of the documents returned in response to a query - #: expressed as a question in natural language. - EXTRACTIVE = "extractive" - -class QueryCaptionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """This parameter is only valid if the query type is 'semantic'. If set, the query returns - captions extracted from key passages in the highest ranked documents. When Captions is set to - 'extractive', highlighting is enabled by default, and can be configured by appending the pipe - character '|' followed by the 'highlight-' option, such as - 'extractive|highlight-true'. Defaults to 'None'. - """ - - #: Do not return captions for the query. - NONE = "none" - #: Extracts captions from the matching documents that contain passages relevant to the search - #: query. - EXTRACTIVE = "extractive" - -class QueryLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The language of the query. - """ - - #: Query language not specified. - NONE = "none" - #: Query language value for English (United States). - EN_US = "en-us" - #: Query language value for English (Great Britain). - EN_GB = "en-gb" - #: Query language value for English (India). - EN_IN = "en-in" - #: Query language value for English (Canada). - EN_CA = "en-ca" - #: Query language value for English (Australia). - EN_AU = "en-au" - #: Query language value for French (France). - FR_FR = "fr-fr" - #: Query language value for French (Canada). - FR_CA = "fr-ca" - #: Query language value for German (Germany). - DE_DE = "de-de" - #: Query language value for Spanish (Spain). - ES_ES = "es-es" - #: Query language value for Spanish (Mexico). - ES_MX = "es-mx" - #: Query language value for Chinese (China). - ZH_CN = "zh-cn" - #: Query language value for Chinese (Taiwan). - ZH_TW = "zh-tw" - #: Query language value for Portuguese (Brazil). - PT_BR = "pt-br" - #: Query language value for Portuguese (Portugal). - PT_PT = "pt-pt" - #: Query language value for Italian (Italy). - IT_IT = "it-it" - #: Query language value for Japanese (Japan). - JA_JP = "ja-jp" - #: Query language value for Korean (Korea). - KO_KR = "ko-kr" - #: Query language value for Russian (Russia). - RU_RU = "ru-ru" - #: Query language value for Czech (Czech Republic). - CS_CZ = "cs-cz" - #: Query language value for Dutch (Belgium). - NL_BE = "nl-be" - #: Query language value for Dutch (Netherlands). - NL_NL = "nl-nl" - #: Query language value for Hungarian (Hungary). - HU_HU = "hu-hu" - #: Query language value for Polish (Poland). - PL_PL = "pl-pl" - #: Query language value for Swedish (Sweden). - SV_SE = "sv-se" - #: Query language value for Turkish (Turkey). - TR_TR = "tr-tr" - #: Query language value for Hindi (India). - HI_IN = "hi-in" - #: Query language value for Arabic (Saudi Arabia). - AR_SA = "ar-sa" - #: Query language value for Arabic (Egypt). - AR_EG = "ar-eg" - #: Query language value for Arabic (Morocco). - AR_MA = "ar-ma" - #: Query language value for Arabic (Kuwait). - AR_KW = "ar-kw" - #: Query language value for Arabic (Jordan). - AR_JO = "ar-jo" - #: Query language value for Danish (Denmark). - DA_DK = "da-dk" - #: Query language value for Norwegian (Norway). - NO_NO = "no-no" - #: Query language value for Bulgarian (Bulgaria). - BG_BG = "bg-bg" - #: Query language value for Croatian (Croatia). - HR_HR = "hr-hr" - #: Query language value for Croatian (Bosnia and Herzegovina). - HR_BA = "hr-ba" - #: Query language value for Malay (Malaysia). - MS_MY = "ms-my" - #: Query language value for Malay (Brunei Darussalam). - MS_BN = "ms-bn" - #: Query language value for Slovenian (Slovenia). - SL_SL = "sl-sl" - #: Query language value for Tamil (India). - TA_IN = "ta-in" - #: Query language value for Vietnamese (Viet Nam). - VI_VN = "vi-vn" - #: Query language value for Greek (Greece). - EL_GR = "el-gr" - #: Query language value for Romanian (Romania). - RO_RO = "ro-ro" - #: Query language value for Icelandic (Iceland). - IS_IS = "is-is" - #: Query language value for Indonesian (Indonesia). - ID_ID = "id-id" - #: Query language value for Thai (Thailand). - TH_TH = "th-th" - #: Query language value for Lithuanian (Lithuania). - LT_LT = "lt-lt" - #: Query language value for Ukrainian (Ukraine). - UK_UA = "uk-ua" - #: Query language value for Latvian (Latvia). - LV_LV = "lv-lv" - #: Query language value for Estonian (Estonia). - ET_EE = "et-ee" - #: Query language value for Catalan (Spain). - CA_ES = "ca-es" - #: Query language value for Finnish (Finland). - FI_FI = "fi-fi" - #: Query language value for Serbian (Bosnia and Herzegovina). - SR_BA = "sr-ba" - #: Query language value for Serbian (Montenegro). - SR_ME = "sr-me" - #: Query language value for Serbian (Serbia). - SR_RS = "sr-rs" - #: Query language value for Slovak (Slovakia). - SK_SK = "sk-sk" - #: Query language value for Norwegian (Norway). - NB_NO = "nb-no" - #: Query language value for Armenian (Armenia). - HY_AM = "hy-am" - #: Query language value for Bengali (India). - BN_IN = "bn-in" - #: Query language value for Basque (Spain). - EU_ES = "eu-es" - #: Query language value for Galician (Spain). - GL_ES = "gl-es" - #: Query language value for Gujarati (India). - GU_IN = "gu-in" - #: Query language value for Hebrew (Israel). - HE_IL = "he-il" - #: Query language value for Irish (Ireland). - GA_IE = "ga-ie" - #: Query language value for Kannada (India). - KN_IN = "kn-in" - #: Query language value for Malayalam (India). - ML_IN = "ml-in" - #: Query language value for Marathi (India). - MR_IN = "mr-in" - #: Query language value for Persian (U.A.E.). - FA_AE = "fa-ae" - #: Query language value for Punjabi (India). - PA_IN = "pa-in" - #: Query language value for Telugu (India). - TE_IN = "te-in" - #: Query language value for Urdu (Pakistan). - UR_PK = "ur-pk" - -class QuerySpellerType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Improve search recall by spell-correcting individual search query terms. - """ - - #: Speller not enabled. - NONE = "none" - #: Speller corrects individual query terms using a static lexicon for the language specified by - #: the queryLanguage parameter. - LEXICON = "lexicon" - -class QueryType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class QueryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query - uses the Lucene query syntax and 'semantic' if query syntax is not needed. + uses the Lucene query syntax. """ #: Uses the simple query syntax for searches. Search text is interpreted using a simple query @@ -263,12 +75,8 @@ class QueryType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: query language which allows field-specific and weighted searches, as well as other advanced #: features. FULL = "full" - #: Best suited for queries expressed in natural language as opposed to keywords. Improves - #: precision of search results by re-ranking the top search results using a ranking model trained - #: on the Web corpus. - SEMANTIC = "semantic" -class ScoringStatistics(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class ScoringStatistics(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global @@ -280,7 +88,7 @@ class ScoringStatistics(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: The scoring statistics will be calculated globally for more consistent scoring. GLOBAL_ENUM = "global" -class SearchMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class SearchMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies whether any or all of the search terms must be matched in order to count the document as a match. """ @@ -289,11 +97,3 @@ class SearchMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): ANY = "any" #: All of the search terms must be matched in order to count the document as a match. ALL = "all" - -class Speller(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - #: Speller not enabled. - NONE = "none" - #: Speller corrects individual query terms using a static lexicon for the language specified by - #: the queryLanguage parameter. - LEXICON = "lexicon" diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/operations/_documents_operations.py b/sdk/search/azure-search-documents/azure/search/documents/_generated/operations/_documents_operations.py index 0c735b532998..35e8da2f1ef8 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/operations/_documents_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_generated/operations/_documents_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,453 +6,21 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace +from azure.core.pipeline.transport import HttpRequest, HttpResponse from .. import models as _models -from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, List, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_count_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/docs/$count") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_search_get_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - search_text = kwargs.pop('search_text', None) # type: Optional[str] - include_total_result_count = kwargs.pop('include_total_result_count', None) # type: Optional[bool] - facets = kwargs.pop('facets', None) # type: Optional[List[str]] - filter = kwargs.pop('filter', None) # type: Optional[str] - highlight_fields = kwargs.pop('highlight_fields', None) # type: Optional[List[str]] - highlight_post_tag = kwargs.pop('highlight_post_tag', None) # type: Optional[str] - highlight_pre_tag = kwargs.pop('highlight_pre_tag', None) # type: Optional[str] - minimum_coverage = kwargs.pop('minimum_coverage', None) # type: Optional[float] - order_by = kwargs.pop('order_by', None) # type: Optional[List[str]] - query_type = kwargs.pop('query_type', None) # type: Optional[Union[str, "_models.QueryType"]] - scoring_parameters = kwargs.pop('scoring_parameters', None) # type: Optional[List[str]] - scoring_profile = kwargs.pop('scoring_profile', None) # type: Optional[str] - semantic_configuration = kwargs.pop('semantic_configuration', None) # type: Optional[str] - search_fields = kwargs.pop('search_fields', None) # type: Optional[List[str]] - query_language = kwargs.pop('query_language', None) # type: Optional[Union[str, "_models.QueryLanguage"]] - speller = kwargs.pop('speller', None) # type: Optional[Union[str, "_models.Speller"]] - answers = kwargs.pop('answers', None) # type: Optional[Union[str, "_models.Answers"]] - search_mode = kwargs.pop('search_mode', None) # type: Optional[Union[str, "_models.SearchMode"]] - scoring_statistics = kwargs.pop('scoring_statistics', None) # type: Optional[Union[str, "_models.ScoringStatistics"]] - session_id = kwargs.pop('session_id', None) # type: Optional[str] - select = kwargs.pop('select', None) # type: Optional[List[str]] - skip = kwargs.pop('skip', None) # type: Optional[int] - top = kwargs.pop('top', None) # type: Optional[int] - captions = kwargs.pop('captions', None) # type: Optional[Union[str, "_models.Captions"]] - semantic_fields = kwargs.pop('semantic_fields', None) # type: Optional[List[str]] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/docs") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if search_text is not None: - _query_parameters['search'] = _SERIALIZER.query("search_text", search_text, 'str') - if include_total_result_count is not None: - _query_parameters['$count'] = _SERIALIZER.query("include_total_result_count", include_total_result_count, 'bool') - if facets is not None: - _query_parameters['facet'] = [_SERIALIZER.query("facets", q, 'str') if q is not None else '' for q in facets] - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - if highlight_fields is not None: - _query_parameters['highlight'] = _SERIALIZER.query("highlight_fields", highlight_fields, '[str]', div=',') - if highlight_post_tag is not None: - _query_parameters['highlightPostTag'] = _SERIALIZER.query("highlight_post_tag", highlight_post_tag, 'str') - if highlight_pre_tag is not None: - _query_parameters['highlightPreTag'] = _SERIALIZER.query("highlight_pre_tag", highlight_pre_tag, 'str') - if minimum_coverage is not None: - _query_parameters['minimumCoverage'] = _SERIALIZER.query("minimum_coverage", minimum_coverage, 'float') - if order_by is not None: - _query_parameters['$orderby'] = _SERIALIZER.query("order_by", order_by, '[str]', div=',') - if query_type is not None: - _query_parameters['queryType'] = _SERIALIZER.query("query_type", query_type, 'str') - if scoring_parameters is not None: - _query_parameters['scoringParameter'] = [_SERIALIZER.query("scoring_parameters", q, 'str') if q is not None else '' for q in scoring_parameters] - if scoring_profile is not None: - _query_parameters['scoringProfile'] = _SERIALIZER.query("scoring_profile", scoring_profile, 'str') - if semantic_configuration is not None: - _query_parameters['semanticConfiguration'] = _SERIALIZER.query("semantic_configuration", semantic_configuration, 'str') - if search_fields is not None: - _query_parameters['searchFields'] = _SERIALIZER.query("search_fields", search_fields, '[str]', div=',') - if query_language is not None: - _query_parameters['queryLanguage'] = _SERIALIZER.query("query_language", query_language, 'str') - if speller is not None: - _query_parameters['speller'] = _SERIALIZER.query("speller", speller, 'str') - if answers is not None: - _query_parameters['answers'] = _SERIALIZER.query("answers", answers, 'str') - if search_mode is not None: - _query_parameters['searchMode'] = _SERIALIZER.query("search_mode", search_mode, 'str') - if scoring_statistics is not None: - _query_parameters['scoringStatistics'] = _SERIALIZER.query("scoring_statistics", scoring_statistics, 'str') - if session_id is not None: - _query_parameters['sessionId'] = _SERIALIZER.query("session_id", session_id, 'str') - if select is not None: - _query_parameters['$select'] = _SERIALIZER.query("select", select, '[str]', div=',') - if skip is not None: - _query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'int') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - if captions is not None: - _query_parameters['captions'] = _SERIALIZER.query("captions", captions, 'str') - if semantic_fields is not None: - _query_parameters['semanticFields'] = _SERIALIZER.query("semantic_fields", semantic_fields, '[str]', div=',') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_search_post_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/docs/search.post.search") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - key, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - selected_fields = kwargs.pop('selected_fields', None) # type: Optional[List[str]] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/docs(\'{key}\')") - path_format_arguments = { - "key": _SERIALIZER.url("key", key, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if selected_fields is not None: - _query_parameters['$select'] = _SERIALIZER.query("selected_fields", selected_fields, '[str]', div=',') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_suggest_get_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - search_text = kwargs.pop('search_text') # type: str - suggester_name = kwargs.pop('suggester_name') # type: str - filter = kwargs.pop('filter', None) # type: Optional[str] - use_fuzzy_matching = kwargs.pop('use_fuzzy_matching', None) # type: Optional[bool] - highlight_post_tag = kwargs.pop('highlight_post_tag', None) # type: Optional[str] - highlight_pre_tag = kwargs.pop('highlight_pre_tag', None) # type: Optional[str] - minimum_coverage = kwargs.pop('minimum_coverage', None) # type: Optional[float] - order_by = kwargs.pop('order_by', None) # type: Optional[List[str]] - search_fields = kwargs.pop('search_fields', None) # type: Optional[List[str]] - select = kwargs.pop('select', None) # type: Optional[List[str]] - top = kwargs.pop('top', None) # type: Optional[int] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/docs/search.suggest") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['search'] = _SERIALIZER.query("search_text", search_text, 'str') - _query_parameters['suggesterName'] = _SERIALIZER.query("suggester_name", suggester_name, 'str') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - if use_fuzzy_matching is not None: - _query_parameters['fuzzy'] = _SERIALIZER.query("use_fuzzy_matching", use_fuzzy_matching, 'bool') - if highlight_post_tag is not None: - _query_parameters['highlightPostTag'] = _SERIALIZER.query("highlight_post_tag", highlight_post_tag, 'str') - if highlight_pre_tag is not None: - _query_parameters['highlightPreTag'] = _SERIALIZER.query("highlight_pre_tag", highlight_pre_tag, 'str') - if minimum_coverage is not None: - _query_parameters['minimumCoverage'] = _SERIALIZER.query("minimum_coverage", minimum_coverage, 'float') - if order_by is not None: - _query_parameters['$orderby'] = _SERIALIZER.query("order_by", order_by, '[str]', div=',') - if search_fields is not None: - _query_parameters['searchFields'] = _SERIALIZER.query("search_fields", search_fields, '[str]', div=',') - if select is not None: - _query_parameters['$select'] = _SERIALIZER.query("select", select, '[str]', div=',') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_suggest_post_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/docs/search.post.suggest") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_index_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/docs/search.index") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_autocomplete_get_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - search_text = kwargs.pop('search_text') # type: str - suggester_name = kwargs.pop('suggester_name') # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - autocomplete_mode = kwargs.pop('autocomplete_mode', None) # type: Optional[Union[str, "_models.AutocompleteMode"]] - filter = kwargs.pop('filter', None) # type: Optional[str] - use_fuzzy_matching = kwargs.pop('use_fuzzy_matching', None) # type: Optional[bool] - highlight_post_tag = kwargs.pop('highlight_post_tag', None) # type: Optional[str] - highlight_pre_tag = kwargs.pop('highlight_pre_tag', None) # type: Optional[str] - minimum_coverage = kwargs.pop('minimum_coverage', None) # type: Optional[float] - search_fields = kwargs.pop('search_fields', None) # type: Optional[List[str]] - top = kwargs.pop('top', None) # type: Optional[int] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/docs/search.autocomplete") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - _query_parameters['search'] = _SERIALIZER.query("search_text", search_text, 'str') - _query_parameters['suggesterName'] = _SERIALIZER.query("suggester_name", suggester_name, 'str') - if autocomplete_mode is not None: - _query_parameters['autocompleteMode'] = _SERIALIZER.query("autocomplete_mode", autocomplete_mode, 'str') - if filter is not None: - _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - if use_fuzzy_matching is not None: - _query_parameters['fuzzy'] = _SERIALIZER.query("use_fuzzy_matching", use_fuzzy_matching, 'bool') - if highlight_post_tag is not None: - _query_parameters['highlightPostTag'] = _SERIALIZER.query("highlight_post_tag", highlight_post_tag, 'str') - if highlight_pre_tag is not None: - _query_parameters['highlightPreTag'] = _SERIALIZER.query("highlight_pre_tag", highlight_pre_tag, 'str') - if minimum_coverage is not None: - _query_parameters['minimumCoverage'] = _SERIALIZER.query("minimum_coverage", minimum_coverage, 'float') - if search_fields is not None: - _query_parameters['searchFields'] = _SERIALIZER.query("search_fields", search_fields, '[str]', div=',') - if top is not None: - _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_autocomplete_post_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/docs/search.post.autocomplete") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on class DocumentsOperations(object): """DocumentsOperations operations. @@ -476,7 +43,6 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - @distributed_trace def count( self, request_options=None, # type: Optional["_models.RequestOptions"] @@ -497,35 +63,38 @@ def count( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_count_request( - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.count.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.count.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('long', pipeline_response) @@ -534,11 +103,8 @@ def count( return cls(pipeline_response, deserialized, {}) return deserialized + count.metadata = {'url': '/docs/$count'} # type: ignore - count.metadata = {'url': "/docs/$count"} # type: ignore - - - @distributed_trace def search_get( self, search_text=None, # type: Optional[str] @@ -566,9 +132,7 @@ def search_get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _include_total_result_count = None _facets = None _filter = None @@ -580,20 +144,16 @@ def search_get( _query_type = None _scoring_parameters = None _scoring_profile = None - _semantic_configuration = None _search_fields = None - _query_language = None - _speller = None - _answers = None _search_mode = None _scoring_statistics = None _session_id = None _select = None _skip = None _top = None - _captions = None - _semantic_fields = None _x_ms_client_request_id = None + if request_options is not None: + _x_ms_client_request_id = request_options.x_ms_client_request_id if search_options is not None: _include_total_result_count = search_options.include_total_result_count _facets = search_options.facets @@ -606,69 +166,79 @@ def search_get( _query_type = search_options.query_type _scoring_parameters = search_options.scoring_parameters _scoring_profile = search_options.scoring_profile - _semantic_configuration = search_options.semantic_configuration _search_fields = search_options.search_fields - _query_language = search_options.query_language - _speller = search_options.speller - _answers = search_options.answers _search_mode = search_options.search_mode _scoring_statistics = search_options.scoring_statistics _session_id = search_options.session_id _select = search_options.select _skip = search_options.skip _top = search_options.top - _captions = search_options.captions - _semantic_fields = search_options.semantic_fields - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_search_get_request( - api_version=api_version, - search_text=search_text, - include_total_result_count=_include_total_result_count, - facets=_facets, - filter=_filter, - highlight_fields=_highlight_fields, - highlight_post_tag=_highlight_post_tag, - highlight_pre_tag=_highlight_pre_tag, - minimum_coverage=_minimum_coverage, - order_by=_order_by, - query_type=_query_type, - scoring_parameters=_scoring_parameters, - scoring_profile=_scoring_profile, - semantic_configuration=_semantic_configuration, - search_fields=_search_fields, - query_language=_query_language, - speller=_speller, - answers=_answers, - search_mode=_search_mode, - scoring_statistics=_scoring_statistics, - session_id=_session_id, - select=_select, - skip=_skip, - top=_top, - captions=_captions, - semantic_fields=_semantic_fields, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.search_get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.search_get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if search_text is not None: + query_parameters['search'] = self._serialize.query("search_text", search_text, 'str') + if _include_total_result_count is not None: + query_parameters['$count'] = self._serialize.query("include_total_result_count", _include_total_result_count, 'bool') + if _facets is not None: + query_parameters['facet'] = [self._serialize.query("facets", q, 'str') if q is not None else '' for q in _facets] + if _filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", _filter, 'str') + if _highlight_fields is not None: + query_parameters['highlight'] = self._serialize.query("highlight_fields", _highlight_fields, '[str]', div=',') + if _highlight_post_tag is not None: + query_parameters['highlightPostTag'] = self._serialize.query("highlight_post_tag", _highlight_post_tag, 'str') + if _highlight_pre_tag is not None: + query_parameters['highlightPreTag'] = self._serialize.query("highlight_pre_tag", _highlight_pre_tag, 'str') + if _minimum_coverage is not None: + query_parameters['minimumCoverage'] = self._serialize.query("minimum_coverage", _minimum_coverage, 'float') + if _order_by is not None: + query_parameters['$orderby'] = self._serialize.query("order_by", _order_by, '[str]', div=',') + if _query_type is not None: + query_parameters['queryType'] = self._serialize.query("query_type", _query_type, 'str') + if _scoring_parameters is not None: + query_parameters['scoringParameter'] = [self._serialize.query("scoring_parameters", q, 'str') if q is not None else '' for q in _scoring_parameters] + if _scoring_profile is not None: + query_parameters['scoringProfile'] = self._serialize.query("scoring_profile", _scoring_profile, 'str') + if _search_fields is not None: + query_parameters['searchFields'] = self._serialize.query("search_fields", _search_fields, '[str]', div=',') + if _search_mode is not None: + query_parameters['searchMode'] = self._serialize.query("search_mode", _search_mode, 'str') + if _scoring_statistics is not None: + query_parameters['scoringStatistics'] = self._serialize.query("scoring_statistics", _scoring_statistics, 'str') + if _session_id is not None: + query_parameters['sessionId'] = self._serialize.query("session_id", _session_id, 'str') + if _select is not None: + query_parameters['$select'] = self._serialize.query("select", _select, '[str]', div=',') + if _skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", _skip, 'int') + if _top is not None: + query_parameters['$top'] = self._serialize.query("top", _top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchDocumentsResult', pipeline_response) @@ -677,11 +247,8 @@ def search_get( return cls(pipeline_response, deserialized, {}) return deserialized + search_get.metadata = {'url': '/docs'} # type: ignore - search_get.metadata = {'url': "/docs"} # type: ignore - - - @distributed_trace def search_post( self, search_request, # type: "_models.SearchRequest" @@ -705,39 +272,43 @@ def search_post( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(search_request, 'SearchRequest') - - request = build_search_post_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.search_post.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.search_post.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(search_request, 'SearchRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchDocumentsResult', pipeline_response) @@ -746,11 +317,8 @@ def search_post( return cls(pipeline_response, deserialized, {}) return deserialized + search_post.metadata = {'url': '/docs/search.post.search'} # type: ignore - search_post.metadata = {'url': "/docs/search.post.search"} # type: ignore - - - @distributed_trace def get( self, key, # type: str @@ -778,37 +346,41 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_request( - key=key, - api_version=api_version, - selected_fields=selected_fields, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'key': self._serialize.url("key", key, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if selected_fields is not None: + query_parameters['$select'] = self._serialize.query("selected_fields", selected_fields, '[str]', div=',') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('object', pipeline_response) @@ -817,11 +389,8 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/docs(\'{key}\')'} # type: ignore - get.metadata = {'url': "/docs(\'{key}\')"} # type: ignore - - - @distributed_trace def suggest_get( self, search_text, # type: str @@ -853,9 +422,7 @@ def suggest_get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _filter = None _use_fuzzy_matching = None _highlight_post_tag = None @@ -866,6 +433,8 @@ def suggest_get( _select = None _top = None _x_ms_client_request_id = None + if request_options is not None: + _x_ms_client_request_id = request_options.x_ms_client_request_id if suggest_options is not None: _filter = suggest_options.filter _use_fuzzy_matching = suggest_options.use_fuzzy_matching @@ -876,42 +445,54 @@ def suggest_get( _search_fields = suggest_options.search_fields _select = suggest_options.select _top = suggest_options.top - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_suggest_get_request( - api_version=api_version, - search_text=search_text, - suggester_name=suggester_name, - filter=_filter, - use_fuzzy_matching=_use_fuzzy_matching, - highlight_post_tag=_highlight_post_tag, - highlight_pre_tag=_highlight_pre_tag, - minimum_coverage=_minimum_coverage, - order_by=_order_by, - search_fields=_search_fields, - select=_select, - top=_top, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.suggest_get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.suggest_get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['search'] = self._serialize.query("search_text", search_text, 'str') + query_parameters['suggesterName'] = self._serialize.query("suggester_name", suggester_name, 'str') + if _filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", _filter, 'str') + if _use_fuzzy_matching is not None: + query_parameters['fuzzy'] = self._serialize.query("use_fuzzy_matching", _use_fuzzy_matching, 'bool') + if _highlight_post_tag is not None: + query_parameters['highlightPostTag'] = self._serialize.query("highlight_post_tag", _highlight_post_tag, 'str') + if _highlight_pre_tag is not None: + query_parameters['highlightPreTag'] = self._serialize.query("highlight_pre_tag", _highlight_pre_tag, 'str') + if _minimum_coverage is not None: + query_parameters['minimumCoverage'] = self._serialize.query("minimum_coverage", _minimum_coverage, 'float') + if _order_by is not None: + query_parameters['$orderby'] = self._serialize.query("order_by", _order_by, '[str]', div=',') + if _search_fields is not None: + query_parameters['searchFields'] = self._serialize.query("search_fields", _search_fields, '[str]', div=',') + if _select is not None: + query_parameters['$select'] = self._serialize.query("select", _select, '[str]', div=',') + if _top is not None: + query_parameters['$top'] = self._serialize.query("top", _top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SuggestDocumentsResult', pipeline_response) @@ -920,11 +501,8 @@ def suggest_get( return cls(pipeline_response, deserialized, {}) return deserialized + suggest_get.metadata = {'url': '/docs/search.suggest'} # type: ignore - suggest_get.metadata = {'url': "/docs/search.suggest"} # type: ignore - - - @distributed_trace def suggest_post( self, suggest_request, # type: "_models.SuggestRequest" @@ -948,39 +526,43 @@ def suggest_post( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(suggest_request, 'SuggestRequest') - - request = build_suggest_post_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.suggest_post.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.suggest_post.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(suggest_request, 'SuggestRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SuggestDocumentsResult', pipeline_response) @@ -989,11 +571,8 @@ def suggest_post( return cls(pipeline_response, deserialized, {}) return deserialized + suggest_post.metadata = {'url': '/docs/search.post.suggest'} # type: ignore - suggest_post.metadata = {'url': "/docs/search.post.suggest"} # type: ignore - - - @distributed_trace def index( self, actions, # type: List["_models.IndexAction"] @@ -1017,40 +596,45 @@ def index( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + _batch = _models.IndexBatch(actions=actions) - _json = self._serialize.body(_batch, 'IndexBatch') - - request = build_index_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.index.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.index.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_batch, 'IndexBatch') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 207]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -1063,11 +647,8 @@ def index( return cls(pipeline_response, deserialized, {}) return deserialized + index.metadata = {'url': '/docs/search.index'} # type: ignore - index.metadata = {'url': "/docs/search.index"} # type: ignore - - - @distributed_trace def autocomplete_get( self, search_text, # type: str @@ -1098,9 +679,7 @@ def autocomplete_get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None _autocomplete_mode = None _filter = None @@ -1110,8 +689,6 @@ def autocomplete_get( _minimum_coverage = None _search_fields = None _top = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id if autocomplete_options is not None: _autocomplete_mode = autocomplete_options.autocomplete_mode _filter = autocomplete_options.filter @@ -1121,39 +698,54 @@ def autocomplete_get( _minimum_coverage = autocomplete_options.minimum_coverage _search_fields = autocomplete_options.search_fields _top = autocomplete_options.top + if request_options is not None: + _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_autocomplete_get_request( - api_version=api_version, - search_text=search_text, - suggester_name=suggester_name, - x_ms_client_request_id=_x_ms_client_request_id, - autocomplete_mode=_autocomplete_mode, - filter=_filter, - use_fuzzy_matching=_use_fuzzy_matching, - highlight_post_tag=_highlight_post_tag, - highlight_pre_tag=_highlight_pre_tag, - minimum_coverage=_minimum_coverage, - search_fields=_search_fields, - top=_top, - template_url=self.autocomplete_get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.autocomplete_get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['search'] = self._serialize.query("search_text", search_text, 'str') + query_parameters['suggesterName'] = self._serialize.query("suggester_name", suggester_name, 'str') + if _autocomplete_mode is not None: + query_parameters['autocompleteMode'] = self._serialize.query("autocomplete_mode", _autocomplete_mode, 'str') + if _filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", _filter, 'str') + if _use_fuzzy_matching is not None: + query_parameters['fuzzy'] = self._serialize.query("use_fuzzy_matching", _use_fuzzy_matching, 'bool') + if _highlight_post_tag is not None: + query_parameters['highlightPostTag'] = self._serialize.query("highlight_post_tag", _highlight_post_tag, 'str') + if _highlight_pre_tag is not None: + query_parameters['highlightPreTag'] = self._serialize.query("highlight_pre_tag", _highlight_pre_tag, 'str') + if _minimum_coverage is not None: + query_parameters['minimumCoverage'] = self._serialize.query("minimum_coverage", _minimum_coverage, 'float') + if _search_fields is not None: + query_parameters['searchFields'] = self._serialize.query("search_fields", _search_fields, '[str]', div=',') + if _top is not None: + query_parameters['$top'] = self._serialize.query("top", _top, 'int') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AutocompleteResult', pipeline_response) @@ -1162,11 +754,8 @@ def autocomplete_get( return cls(pipeline_response, deserialized, {}) return deserialized + autocomplete_get.metadata = {'url': '/docs/search.autocomplete'} # type: ignore - autocomplete_get.metadata = {'url': "/docs/search.autocomplete"} # type: ignore - - - @distributed_trace def autocomplete_post( self, autocomplete_request, # type: "_models.AutocompleteRequest" @@ -1190,39 +779,43 @@ def autocomplete_post( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(autocomplete_request, 'AutocompleteRequest') - - request = build_autocomplete_post_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.autocomplete_post.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.autocomplete_post.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - "indexName": self._serialize.url("self._config.index_name", self._config.index_name, 'str'), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("self._config.index_name", self._config.index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(autocomplete_request, 'AutocompleteRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AutocompleteResult', pipeline_response) @@ -1231,6 +824,4 @@ def autocomplete_post( return cls(pipeline_response, deserialized, {}) return deserialized - - autocomplete_post.metadata = {'url': "/docs/search.post.autocomplete"} # type: ignore - + autocomplete_post.metadata = {'url': '/docs/search.post.autocomplete'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/_generated/py.typed b/sdk/search/azure-search-documents/azure/search/documents/_generated/py.typed deleted file mode 100644 index e5aff4f83af8..000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/_generated/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/search/azure-search-documents/azure/search/documents/_paging.py b/sdk/search/azure-search-documents/azure/search/documents/_paging.py index 8d7030c95ebe..5511865e2d82 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_paging.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_paging.py @@ -15,7 +15,6 @@ if TYPE_CHECKING: # pylint:disable=unused-import,ungrouped-imports from typing import Any, Union - from ..documents.models import AnswerResult def convert_search_result(result): @@ -82,11 +81,6 @@ def get_count(self): """ return self._first_iterator_instance().get_count() - def get_answers(self): - # type: () -> Union[list[AnswerResult], None] - """Return answers.""" - return self._first_iterator_instance().get_answers() - # The pylint error silenced below seems spurious, as the inner wrapper does, in # fact, become a method of the class when it is applied. @@ -152,8 +146,3 @@ def get_coverage(self): def get_count(self): self.continuation_token = None return self._response.count - - @_ensure_response - def get_answers(self): - self.continuation_token = None - return self._response.answers diff --git a/sdk/search/azure-search-documents/azure/search/documents/_search_client.py b/sdk/search/azure-search-documents/azure/search/documents/_search_client.py index caf6f90f352b..77827e5348e1 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_search_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_search_client.py @@ -156,10 +156,9 @@ def get_document(self, key, selected_fields=None, **kwargs): return cast(dict, result) @distributed_trace - def search(self, search_text, **kwargs): # pylint:disable=too-many-locals + def search(self, search_text, **kwargs): # type: (str, **Any) -> SearchItemPaged[dict] """Search the Azure search index for documents. - :param str search_text: A full-text search query expression; Use "*" or omit this parameter to match all documents. :keyword bool include_total_count: A value that specifies whether to fetch the total count of @@ -201,35 +200,6 @@ def search(self, search_text, **kwargs): # pylint:disable=too-many-locals :keyword search_mode: A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. Possible values include: 'any', 'all'. :paramtype search_mode: str or ~azure.search.documents.models.SearchMode - :keyword query_language: The language of the search query. Possible values include: "none", "en-us", - "en-gb", "en-in", "en-ca", "en-au", "fr-fr", "fr-ca", "de-de", "es-es", "es-mx", "zh-cn", - "zh-tw", "pt-br", "pt-pt", "it-it", "ja-jp", "ko-kr", "ru-ru", "cs-cz", "nl-be", "nl-nl", - "hu-hu", "pl-pl", "sv-se", "tr-tr", "hi-in", "ar-sa", "ar-eg", "ar-ma", "ar-kw", "ar-jo", - "da-dk", "no-no", "bg-bg", "hr-hr", "hr-ba", "ms-my", "ms-bn", "sl-sl", "ta-in", "vi-vn", - "el-gr", "ro-ro", "is-is", "id-id", "th-th", "lt-lt", "uk-ua", "lv-lv", "et-ee", "ca-es", - "fi-fi", "sr-ba", "sr-me", "sr-rs", "sk-sk", "nb-no", "hy-am", "bn-in", "eu-es", "gl-es", - "gu-in", "he-il", "ga-ie", "kn-in", "ml-in", "mr-in", "fa-ae", "pa-in", "te-in", "ur-pk". - :paramtype query_language: str or ~azure.search.documents.models.QueryLanguage - :keyword query_speller: A value that specified the type of the speller to use to spell-correct - individual search query terms. Possible values include: "none", "lexicon". - :paramtype query_speller: str or ~azure.search.documents.models.QuerySpellerType - :keyword query_answer: This parameter is only valid if the query type is 'semantic'. If set, - the query returns answers extracted from key passages in the highest ranked documents. - Possible values include: "none", "extractive". - :paramtype query_answer: str or ~azure.search.documents.models.QueryAnswerType - :keyword int query_answer_count: This parameter is only valid if the query type is 'semantic' and - query answer is 'extractive'. Configures the number of answers returned. Default count is 1. - :keyword query_caption: This parameter is only valid if the query type is 'semantic'. If set, the - query returns captions extracted from key passages in the highest ranked documents. - Defaults to 'None'. Possible values include: "none", "extractive". - :paramtype query_caption: str or ~azure.search.documents.models.QueryCaptionType - :keyword bool query_caption_highlight: This parameter is only valid if the query type is 'semantic' when - query caption is set to 'extractive'. Determines whether highlighting is enabled. - Defaults to 'true'. - :keyword list[str] semantic_fields: The list of field names used for semantic search. - :keyword semantic_configuration_name: The name of the semantic configuration that will be used when - processing documents for queries of type semantic. - :paramtype semantic_configuration_name: str :keyword list[str] select: The list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included. :keyword int skip: The number of search results to skip. This value cannot be greater than 100,000. @@ -239,18 +209,6 @@ def search(self, search_text, **kwargs): # pylint:disable=too-many-locals $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results. - :keyword scoring_statistics: A value that specifies whether we want to calculate scoring - statistics (such as document frequency) globally for more consistent scoring, or locally, for - lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally - before scoring. Using global scoring statistics can increase latency of search queries. - Possible values include: "local", "global". - :paramtype scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics - :keyword str session_id: A value to be used to create a sticky session, which can help getting more - consistent results. As long as the same sessionId is used, a best-effort attempt will be made - to target the same replica set. Be wary that reusing the same sessionID values repeatedly can - interfere with the load balancing of the requests across replicas and adversely affect the - performance of the search service. The value used as sessionId cannot start with a '_' - character. :rtype: SearchItemPaged[dict] .. admonition:: Example: @@ -294,29 +252,9 @@ def search(self, search_text, **kwargs): # pylint:disable=too-many-locals search_fields = kwargs.pop("search_fields", None) search_fields_str = ",".join(search_fields) if search_fields else None search_mode = kwargs.pop("search_mode", None) - query_language = kwargs.pop("query_language", None) - query_speller = kwargs.pop("query_speller", None) select = kwargs.pop("select", None) skip = kwargs.pop("skip", None) top = kwargs.pop("top", None) - session_id = kwargs.pop("session_id", None) - scoring_statistics = kwargs.pop("scoring_statistics", None) - - query_answer = kwargs.pop("query_answer", None) - query_answer_count = kwargs.pop("query_answer_count", None) - answers = query_answer if not query_answer_count else '{}|count-{}'.format( - query_answer, query_answer_count - ) - - query_caption = kwargs.pop("query_caption", None) - query_caption_highlight = kwargs.pop("query_caption_highlight", None) - captions = query_caption if not query_caption_highlight else '{}|highlight-{}'.format( - query_caption, query_caption_highlight - ) - - semantic_fields = kwargs.pop("semantic_fields", None) - semantic_configuration = kwargs.pop("semantic_configuration_name", None) - query = SearchQuery( search_text=search_text, include_total_result_count=include_total_result_count, @@ -332,17 +270,9 @@ def search(self, search_text, **kwargs): # pylint:disable=too-many-locals scoring_profile=scoring_profile, search_fields=search_fields_str, search_mode=search_mode, - query_language=query_language, - speller=query_speller, - answers=answers, - captions=captions, - semantic_fields=",".join(semantic_fields) if semantic_fields else None, - semantic_configuration=semantic_configuration, select=select if isinstance(select, six.string_types) else None, skip=skip, - top=top, - session_id=session_id, - scoring_statistics=scoring_statistics + top=top ) if isinstance(select, list): query.select(select) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_search_indexing_buffered_sender.py b/sdk/search/azure-search-documents/azure/search/documents/_search_indexing_buffered_sender.py index 8fba34a89ebd..93123a8df039 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_search_indexing_buffered_sender.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_search_indexing_buffered_sender.py @@ -40,15 +40,19 @@ class SearchIndexingBufferedSender(SearchIndexingBufferedSenderBase, HeadersMixi :keyword int initial_batch_action_count: The initial number of actions to group into a batch when tuning the behavior of the sender. The default value is 512. :keyword int max_retries_per_action: The number of times to retry a failed document. The default value is 3. - :keyword callable on_new: If it is set, the client will call corresponding methods when there + :keyword on_new: If it is set, the client will call corresponding methods when there is a new IndexAction added. This may be called from main thread or a worker thread. - :keyword callable on_progress: If it is set, the client will call corresponding methods when there + :paramtype on_new: Callable[[IndexAction], None] + :keyword on_progress: If it is set, the client will call corresponding methods when there is a IndexAction succeeds. This may be called from main thread or a worker thread. - :keyword callable on_error: If it is set, the client will call corresponding methods when there + :paramtype on_progress: Callable[[IndexAction], None] + :keyword on_error: If it is set, the client will call corresponding methods when there is a IndexAction fails. This may be called from main thread or a worker thread. - :keyword callable on_remove: If it is set, the client will call corresponding methods when there + :paramtype on_error: Callable[[IndexAction], None] + :keyword on_remove: If it is set, the client will call corresponding methods when there is a IndexAction removed from the queue (succeeds or fails). This may be called from main thread or a worker thread. + :paramtype on_remove: Callable[[IndexAction], None] :keyword str api_version: The Search API version to use for requests. :keyword str audience: sets the Audience to use for authentication with Azure Active Directory (AAD). The audience is not considered when using a shared key. If audience is not provided, the public cloud audience diff --git a/sdk/search/azure-search-documents/azure/search/documents/_version.py b/sdk/search/azure-search-documents/azure/search/documents/_version.py index 98a4234d7cb4..8fdf6bb71c8d 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_version.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_version.py @@ -3,6 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "11.3.0b9" # type: str +VERSION = "11.3.0" # type: str SDK_MONIKER = "search-documents/{}".format(VERSION) # type: str diff --git a/sdk/search/azure-search-documents/azure/search/documents/aio/_paging.py b/sdk/search/azure-search-documents/azure/search/documents/aio/_paging.py index e9734fba0cc5..f955df939c7d 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/aio/_paging.py +++ b/sdk/search/azure-search-documents/azure/search/documents/aio/_paging.py @@ -3,20 +3,15 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from typing import Union, TYPE_CHECKING +from typing import Union from azure.core.async_paging import AsyncItemPaged, AsyncPageIterator, ReturnType -from .._generated.models import SearchRequest from .._paging import ( convert_search_result, pack_continuation_token, unpack_continuation_token, ) -if TYPE_CHECKING: - # pylint:disable=unused-import,ungrouped-imports - from ...documents.models import AnswerResult - class AsyncSearchItemPaged(AsyncItemPaged[ReturnType]): def __init__(self, *args, **kwargs): @@ -64,11 +59,6 @@ async def get_count(self): """ return await self._first_iterator_instance().get_count() - async def get_answers(self): - # type: () -> Union[list[AnswerResult], None] - """Return answers.""" - return await self._first_iterator_instance().get_answers() - # The pylint error silenced below seems spurious, as the inner wrapper does, in # fact, become a method of the class when it is applied. @@ -134,8 +124,3 @@ async def get_coverage(self): async def get_count(self): self.continuation_token = None return self._response.count - - @_ensure_response - async def get_answers(self): - self.continuation_token = None - return self._response.answers diff --git a/sdk/search/azure-search-documents/azure/search/documents/aio/_search_client_async.py b/sdk/search/azure-search-documents/azure/search/documents/aio/_search_client_async.py index 8f715b576e89..11716c403bd9 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/aio/_search_client_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/aio/_search_client_async.py @@ -137,7 +137,6 @@ async def get_document(self, key, selected_fields=None, **kwargs): async def search(self, search_text, **kwargs): # pylint:disable=too-many-locals # type: (str, **Any) -> AsyncSearchItemPaged[dict] """Search the Azure search index for documents. - :param str search_text: A full-text search query expression; Use "*" or omit this parameter to match all documents. :keyword bool include_total_count: A value that specifies whether to fetch the total count of @@ -179,36 +178,6 @@ async def search(self, search_text, **kwargs): # pylint:disable=too-many-locals :keyword search_mode: A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. Possible values include: 'any', 'all'. :paramtype search_mode: str or ~azure.search.documents.models.SearchMode - :keyword query_language: The language of the search query. Possible values include: "none", "en-us", - "en-gb", "en-in", "en-ca", "en-au", "fr-fr", "fr-ca", "de-de", "es-es", "es-mx", "zh-cn", - "zh-tw", "pt-br", "pt-pt", "it-it", "ja-jp", "ko-kr", "ru-ru", "cs-cz", "nl-be", "nl-nl", - "hu-hu", "pl-pl", "sv-se", "tr-tr", "hi-in", "ar-sa", "ar-eg", "ar-ma", "ar-kw", "ar-jo", - "da-dk", "no-no", "bg-bg", "hr-hr", "hr-ba", "ms-my", "ms-bn", "sl-sl", "ta-in", "vi-vn", - "el-gr", "ro-ro", "is-is", "id-id", "th-th", "lt-lt", "uk-ua", "lv-lv", "et-ee", "ca-es", - "fi-fi", "sr-ba", "sr-me", "sr-rs", "sk-sk", "nb-no", "hy-am", "bn-in", "eu-es", "gl-es", - "gu-in", "he-il", "ga-ie", "kn-in", "ml-in", "mr-in", "fa-ae", "pa-in", "te-in", "ur-pk". - :paramtype query_language: str or ~azure.search.documents.models.QueryLanguage - :keyword query_speller: A value that specified the type of the speller to use to spell-correct - individual search query terms. Possible values include: "none", "lexicon". - :paramtype query_speller: str or ~azure.search.documents.models.QuerySpellerType - :keyword query_answer: This parameter is only valid if the query type is 'semantic'. If set, - the query returns answers extracted from key passages in the highest ranked documents. - Possible values include: "none", "extractive". - :paramtype query_answer: str or ~azure.search.documents.models.QueryAnswerType - :keyword int query_answer_count: This parameter is only valid if the query type is 'semantic' and - query answer is 'extractive'. - Configures the number of answers returned. Default count is 1. - :keyword query_caption: This parameter is only valid if the query type is 'semantic'. If set, the - query returns captions extracted from key passages in the highest ranked documents. - Defaults to 'None'. Possible values include: "none", "extractive". - :paramtype query_caption: str or ~azure.search.documents.models.QueryCaptionType - :keyword bool query_caption_highlight: This parameter is only valid if the query type is 'semantic' when - query caption is set to 'extractive'. Determines whether highlighting is enabled. - Defaults to 'true'. - :keyword list[str] semantic_fields: The list of field names used for semantic search. - :keyword semantic_configuration_name: The name of the semantic configuration that will be used when - processing documents for queries of type semantic. - :paramtype semantic_configuration_name: str :keyword list[str] select: The list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included. :keyword int skip: The number of search results to skip. This value cannot be greater than 100,000. @@ -218,19 +187,6 @@ async def search(self, search_text, **kwargs): # pylint:disable=too-many-locals $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results. - :keyword scoring_statistics: A value that specifies whether we want to calculate scoring - statistics (such as document frequency) globally for more consistent scoring, or locally, for - lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally - before scoring. Using global scoring statistics can increase latency of search queries. - Possible values include: "local", "global". - :paramtype scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics - :keyword session_id: A value to be used to create a sticky session, which can help getting more - consistent results. As long as the same sessionId is used, a best-effort attempt will be made - to target the same replica set. Be wary that reusing the same sessionID values repeatedly can - interfere with the load balancing of the requests across replicas and adversely affect the - performance of the search service. The value used as sessionId cannot start with a '_' - character. - :paramtype session_id: str :rtype: AsyncSearchItemPaged[dict] .. admonition:: Example: @@ -274,29 +230,9 @@ async def search(self, search_text, **kwargs): # pylint:disable=too-many-locals search_fields = kwargs.pop("search_fields", None) search_fields_str = ",".join(search_fields) if search_fields else None search_mode = kwargs.pop("search_mode", None) - query_language = kwargs.pop("query_language", None) - query_speller = kwargs.pop("query_speller", None) select = kwargs.pop("select", None) skip = kwargs.pop("skip", None) top = kwargs.pop("top", None) - session_id = kwargs.pop("session_id", None) - scoring_statistics = kwargs.pop("scoring_statistics", None) - - query_answer = kwargs.pop("query_answer", None) - query_answer_count = kwargs.pop("query_answer_count", None) - answers = query_answer if not query_answer_count else '{}|count-{}'.format( - query_answer, query_answer_count - ) - - query_caption = kwargs.pop("query_caption", None) - query_caption_highlight = kwargs.pop("query_caption_highlight", None) - captions = query_caption if not query_caption_highlight else '{}|highlight-{}'.format( - query_caption, query_caption_highlight - ) - - semantic_fields = kwargs.pop("semantic_fields", None) - semantic_configuration = kwargs.pop("semantic_configuration_name", None) - query = SearchQuery( search_text=search_text, include_total_result_count=include_total_result_count, @@ -312,17 +248,9 @@ async def search(self, search_text, **kwargs): # pylint:disable=too-many-locals scoring_profile=scoring_profile, search_fields=search_fields_str, search_mode=search_mode, - query_language=query_language, - speller=query_speller, - answers=answers, - captions=captions, - semantic_fields=",".join(semantic_fields) if semantic_fields else None, - semantic_configuration=semantic_configuration, select=select if isinstance(select, six.string_types) else None, skip=skip, - top=top, - session_id=session_id, - scoring_statistics=scoring_statistics + top=top ) if isinstance(select, list): query.select(select) diff --git a/sdk/search/azure-search-documents/azure/search/documents/aio/_search_indexing_buffered_sender_async.py b/sdk/search/azure-search-documents/azure/search/documents/aio/_search_indexing_buffered_sender_async.py index ab434a8709c4..c53141626475 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/aio/_search_indexing_buffered_sender_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/aio/_search_indexing_buffered_sender_async.py @@ -39,14 +39,19 @@ class SearchIndexingBufferedSender(SearchIndexingBufferedSenderBase, HeadersMixi :keyword int initial_batch_action_count: The initial number of actions to group into a batch when tuning the behavior of the sender. The default value is 512. :keyword int max_retries_per_action: The number of times to retry a failed document. The default value is 3. - :keyword callable on_new: If it is set, the client will call corresponding methods when there - is a new IndexAction added. - :keyword callable on_progress: If it is set, the client will call corresponding methods when there - is a IndexAction succeeds. - :keyword callable on_error: If it is set, the client will call corresponding methods when there - is a IndexAction fails. - :keyword callable on_remove: If it is set, the client will call corresponding methods when there - is a IndexAction removed from the queue (succeeds or fails). + :keyword on_new: If it is set, the client will call corresponding methods when there + is a new IndexAction added. This may be called from main thread or a worker thread. + :paramtype on_new: Callable[[IndexAction], None] + :keyword on_progress: If it is set, the client will call corresponding methods when there + is a IndexAction succeeds. This may be called from main thread or a worker thread. + :paramtype on_progress: Callable[[IndexAction], None] + :keyword on_error: If it is set, the client will call corresponding methods when there + is a IndexAction fails. This may be called from main thread or a worker thread. + :paramtype on_error: Callable[[IndexAction], None] + :keyword on_remove: If it is set, the client will call corresponding methods when there + is a IndexAction removed from the queue (succeeds or fails). This may be called from main + thread or a worker thread. + :paramtype on_remove: Callable[[IndexAction], None] :keyword str api_version: The Search API version to use for requests. :keyword str audience: sets the Audience to use for authentication with Azure Active Directory (AAD). The audience is not considered when using a shared key. If audience is not provided, the public cloud audience diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/__init__.py index f7a9a21f5fab..d58f5fc3b7f8 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/__init__.py @@ -9,7 +9,8 @@ from ._search_client import SearchClient __all__ = ['SearchClient'] -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_configuration.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_configuration.py index b023c529c861..1719ffce1702 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_configuration.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_configuration.py @@ -17,7 +17,7 @@ VERSION = "unknown" -class SearchClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes +class SearchClientConfiguration(Configuration): """Configuration for SearchClient. Note that all parameters used to create this instance are saved as instance @@ -25,9 +25,6 @@ class SearchClientConfiguration(Configuration): # pylint: disable=too-many-inst :param endpoint: The endpoint URL of the search service. :type endpoint: str - :keyword api_version: Api Version. The default value is "2021-04-30-Preview". Note that - overriding this default value may result in unsupported behavior. - :paramtype api_version: str """ def __init__( @@ -36,14 +33,12 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - super(SearchClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") + super(SearchClientConfiguration, self).__init__(**kwargs) self.endpoint = endpoint - self.api_version = api_version + self.api_version = "2020-06-30" kwargs.setdefault('sdk_moniker', 'search-documents/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_patch.py deleted file mode 100644 index 74e48ecd07cf..000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_patch.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- - -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -def patch_sdk(): - pass \ No newline at end of file diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_search_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_search_client.py index fc8963723caa..63cfd315c9e9 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_search_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_search_client.py @@ -6,26 +6,29 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from copy import deepcopy from typing import TYPE_CHECKING -from msrest import Deserializer, Serializer - from azure.core import PipelineClient - -from . import models -from ._configuration import SearchClientConfiguration -from .operations import AliasesOperations, DataSourcesOperations, IndexersOperations, IndexesOperations, SearchClientOperationsMixin, SkillsetsOperations, SynonymMapsOperations +from msrest import Deserializer, Serializer if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any - from azure.core.rest import HttpRequest, HttpResponse + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import SearchClientConfiguration +from .operations import DataSourcesOperations +from .operations import IndexersOperations +from .operations import SkillsetsOperations +from .operations import SynonymMapsOperations +from .operations import IndexesOperations +from .operations import SearchClientOperationsMixin +from . import models + -class SearchClient(SearchClientOperationsMixin): # pylint: disable=too-many-instance-attributes - """Client that can be used to manage and query indexes and documents, as well as manage other - resources, on a search service. +class SearchClient(SearchClientOperationsMixin): + """Client that can be used to manage and query indexes and documents, as well as manage other resources, on a search service. :ivar data_sources: DataSourcesOperations operations :vartype data_sources: azure.search.documents.indexes.operations.DataSourcesOperations @@ -37,13 +40,8 @@ class SearchClient(SearchClientOperationsMixin): # pylint: disable=too-many-i :vartype synonym_maps: azure.search.documents.indexes.operations.SynonymMapsOperations :ivar indexes: IndexesOperations operations :vartype indexes: azure.search.documents.indexes.operations.IndexesOperations - :ivar aliases: AliasesOperations operations - :vartype aliases: azure.search.documents.indexes.operations.AliasesOperations :param endpoint: The endpoint URL of the search service. :type endpoint: str - :keyword api_version: Api Version. The default value is "2021-04-30-Preview". Note that - overriding this default value may result in unsupported behavior. - :paramtype api_version: str """ def __init__( @@ -52,52 +50,43 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - _base_url = '{endpoint}' - self._config = SearchClientConfiguration(endpoint=endpoint, **kwargs) - self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs) + base_url = '{endpoint}' + self._config = SearchClientConfiguration(endpoint, **kwargs) + self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - self.data_sources = DataSourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.indexers = IndexersOperations(self._client, self._config, self._serialize, self._deserialize) - self.skillsets = SkillsetsOperations(self._client, self._config, self._serialize, self._deserialize) - self.synonym_maps = SynonymMapsOperations(self._client, self._config, self._serialize, self._deserialize) - self.indexes = IndexesOperations(self._client, self._config, self._serialize, self._deserialize) - self.aliases = AliasesOperations(self._client, self._config, self._serialize, self._deserialize) - + self._deserialize = Deserializer(client_models) - def _send_request( - self, - request, # type: HttpRequest - **kwargs # type: Any - ): - # type: (...) -> HttpResponse + self.data_sources = DataSourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.indexers = IndexersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.skillsets = SkillsetsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.synonym_maps = SynonymMapsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.indexes = IndexesOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse """Runs the network request through the client's chained policies. - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = client._send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.HttpResponse + :rtype: ~azure.core.pipeline.transport.HttpResponse """ - - request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - - request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) - return self._client.send_request(request_copy, **kwargs) + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response def close(self): # type: () -> None diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_vendor.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_vendor.py deleted file mode 100644 index 138f663c53a4..000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/_vendor.py +++ /dev/null @@ -1,27 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.core.pipeline.transport import HttpRequest - -def _convert_request(request, files=None): - data = request.content if not files else None - request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) - if files: - request.set_formdata_body(files) - return request - -def _format_url_section(template, **kwargs): - components = template.split("/") - while components: - try: - return template.format(**kwargs) - except KeyError as key: - formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] - template = "/".join(components) diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/__init__.py index f7a9a21f5fab..ec41d54fc046 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/__init__.py @@ -8,8 +8,3 @@ from ._search_client import SearchClient __all__ = ['SearchClient'] - -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/_configuration.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/_configuration.py index 5373cdebe253..8b5a47f57f16 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/_configuration.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/_configuration.py @@ -13,7 +13,7 @@ VERSION = "unknown" -class SearchClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes +class SearchClientConfiguration(Configuration): """Configuration for SearchClient. Note that all parameters used to create this instance are saved as instance @@ -21,9 +21,6 @@ class SearchClientConfiguration(Configuration): # pylint: disable=too-many-inst :param endpoint: The endpoint URL of the search service. :type endpoint: str - :keyword api_version: Api Version. The default value is "2021-04-30-Preview". Note that - overriding this default value may result in unsupported behavior. - :paramtype api_version: str """ def __init__( @@ -31,14 +28,12 @@ def __init__( endpoint: str, **kwargs: Any ) -> None: - super(SearchClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") + super(SearchClientConfiguration, self).__init__(**kwargs) self.endpoint = endpoint - self.api_version = api_version + self.api_version = "2020-06-30" kwargs.setdefault('sdk_moniker', 'search-documents/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/_patch.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/_patch.py deleted file mode 100644 index 74e48ecd07cf..000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/_patch.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- - -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -def patch_sdk(): - pass \ No newline at end of file diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/_search_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/_search_client.py index ed8c5c7f1583..b8dfb1e0acc0 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/_search_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/_search_client.py @@ -6,21 +6,24 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from copy import deepcopy -from typing import Any, Awaitable - -from msrest import Deserializer, Serializer +from typing import Any from azure.core import AsyncPipelineClient -from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from msrest import Deserializer, Serializer -from .. import models from ._configuration import SearchClientConfiguration -from .operations import AliasesOperations, DataSourcesOperations, IndexersOperations, IndexesOperations, SearchClientOperationsMixin, SkillsetsOperations, SynonymMapsOperations +from .operations import DataSourcesOperations +from .operations import IndexersOperations +from .operations import SkillsetsOperations +from .operations import SynonymMapsOperations +from .operations import IndexesOperations +from .operations import SearchClientOperationsMixin +from .. import models + -class SearchClient(SearchClientOperationsMixin): # pylint: disable=too-many-instance-attributes - """Client that can be used to manage and query indexes and documents, as well as manage other - resources, on a search service. +class SearchClient(SearchClientOperationsMixin): + """Client that can be used to manage and query indexes and documents, as well as manage other resources, on a search service. :ivar data_sources: DataSourcesOperations operations :vartype data_sources: azure.search.documents.indexes.aio.operations.DataSourcesOperations @@ -32,13 +35,8 @@ class SearchClient(SearchClientOperationsMixin): # pylint: disable=too-many-i :vartype synonym_maps: azure.search.documents.indexes.aio.operations.SynonymMapsOperations :ivar indexes: IndexesOperations operations :vartype indexes: azure.search.documents.indexes.aio.operations.IndexesOperations - :ivar aliases: AliasesOperations operations - :vartype aliases: azure.search.documents.indexes.aio.operations.AliasesOperations :param endpoint: The endpoint URL of the search service. :type endpoint: str - :keyword api_version: Api Version. The default value is "2021-04-30-Preview". Note that - overriding this default value may result in unsupported behavior. - :paramtype api_version: str """ def __init__( @@ -46,51 +44,42 @@ def __init__( endpoint: str, **kwargs: Any ) -> None: - _base_url = '{endpoint}' - self._config = SearchClientConfiguration(endpoint=endpoint, **kwargs) - self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs) + base_url = '{endpoint}' + self._config = SearchClientConfiguration(endpoint, **kwargs) + self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False - self.data_sources = DataSourcesOperations(self._client, self._config, self._serialize, self._deserialize) - self.indexers = IndexersOperations(self._client, self._config, self._serialize, self._deserialize) - self.skillsets = SkillsetsOperations(self._client, self._config, self._serialize, self._deserialize) - self.synonym_maps = SynonymMapsOperations(self._client, self._config, self._serialize, self._deserialize) - self.indexes = IndexesOperations(self._client, self._config, self._serialize, self._deserialize) - self.aliases = AliasesOperations(self._client, self._config, self._serialize, self._deserialize) - + self._deserialize = Deserializer(client_models) - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: + self.data_sources = DataSourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.indexers = IndexersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.skillsets = SkillsetsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.synonym_maps = SynonymMapsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.indexes = IndexesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = await client._send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.AsyncHttpResponse + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse """ - - request_copy = deepcopy(request) path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - - request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) - return self._client.send_request(request_copy, **kwargs) + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response async def close(self) -> None: await self._client.close() diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/__init__.py index 55362b2a834a..4ab9e775b13d 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/__init__.py @@ -11,7 +11,6 @@ from ._skillsets_operations import SkillsetsOperations from ._synonym_maps_operations import SynonymMapsOperations from ._indexes_operations import IndexesOperations -from ._aliases_operations import AliasesOperations from ._search_client_operations import SearchClientOperationsMixin __all__ = [ @@ -20,6 +19,5 @@ 'SkillsetsOperations', 'SynonymMapsOperations', 'IndexesOperations', - 'AliasesOperations', 'SearchClientOperationsMixin', ] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_aliases_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_aliases_operations.py deleted file mode 100644 index 127d6b5bc765..000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_aliases_operations.py +++ /dev/null @@ -1,430 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._aliases_operations import build_create_or_update_request, build_create_request, build_delete_request, build_get_request, build_list_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class AliasesOperations: - """AliasesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.indexes.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace_async - async def create( - self, - alias: "_models.SearchAlias", - request_options: Optional["_models.RequestOptions"] = None, - **kwargs: Any - ) -> "_models.SearchAlias": - """Creates a new search alias. - - :param alias: The definition of the alias to create. - :type alias: ~azure.search.documents.indexes.models.SearchAlias - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SearchAlias, or the result of cls(response) - :rtype: ~azure.search.documents.indexes.models.SearchAlias - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SearchAlias"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(alias, 'SearchAlias') - - request = build_create_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.create.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('SearchAlias', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create.metadata = {'url': "/aliases"} # type: ignore - - - @distributed_trace - def list( - self, - request_options: Optional["_models.RequestOptions"] = None, - **kwargs: Any - ) -> AsyncIterable["_models.ListAliasesResult"]: - """Lists all aliases available for a search service. - - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListAliasesResult or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.search.documents.indexes.models.ListAliasesResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListAliasesResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - - request = build_list_request( - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - else: - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - - request = build_list_request( - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=next_link, - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.method = "GET" - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ListAliasesResult", pipeline_response) - list_of_elem = deserialized.aliases - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/aliases"} # type: ignore - - @distributed_trace_async - async def create_or_update( - self, - alias_name: str, - alias: "_models.SearchAlias", - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - request_options: Optional["_models.RequestOptions"] = None, - **kwargs: Any - ) -> "_models.SearchAlias": - """Creates a new search alias or updates an alias if it already exists. - - :param alias_name: The definition of the alias to create or update. - :type alias_name: str - :param alias: The definition of the alias to create or update. - :type alias: ~azure.search.documents.indexes.models.SearchAlias - :param if_match: Defines the If-Match condition. The operation will be performed only if the - ETag on the server matches this value. - :type if_match: str - :param if_none_match: Defines the If-None-Match condition. The operation will be performed only - if the ETag on the server does not match this value. - :type if_none_match: str - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword prefer: For HTTP PUT requests, instructs the service to return the created/updated - resource on success. The default value is "return=representation". Note that overriding this - default value may result in unsupported behavior. - :paramtype prefer: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SearchAlias, or the result of cls(response) - :rtype: ~azure.search.documents.indexes.models.SearchAlias - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SearchAlias"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(alias, 'SearchAlias') - - request = build_create_or_update_request( - alias_name=alias_name, - prefer=prefer, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - if response.status_code == 200: - deserialized = self._deserialize('SearchAlias', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('SearchAlias', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/aliases(\'{aliasName}\')"} # type: ignore - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements - self, - alias_name: str, - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - request_options: Optional["_models.RequestOptions"] = None, - **kwargs: Any - ) -> None: - """Deletes a search alias and its associated mapping to an index. This operation is permanent, - with no recovery option. The mapped index is untouched by this operation. - - :param alias_name: The name of the alias to delete. - :type alias_name: str - :param if_match: Defines the If-Match condition. The operation will be performed only if the - ETag on the server matches this value. - :type if_match: str - :param if_none_match: Defines the If-None-Match condition. The operation will be performed only - if the ETag on the server does not match this value. - :type if_none_match: str - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - - request = build_delete_request( - alias_name=alias_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/aliases(\'{aliasName}\')"} # type: ignore - - - @distributed_trace_async - async def get( - self, - alias_name: str, - request_options: Optional["_models.RequestOptions"] = None, - **kwargs: Any - ) -> "_models.SearchAlias": - """Retrieves an alias definition. - - :param alias_name: The name of the alias to retrieve. - :type alias_name: str - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SearchAlias, or the result of cls(response) - :rtype: ~azure.search.documents.indexes.models.SearchAlias - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SearchAlias"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - - request = build_get_request( - alias_name=alias_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('SearchAlias', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/aliases(\'{aliasName}\')"} # type: ignore - diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_data_sources_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_data_sources_operations.py index 84823791bd27..2f015bb8bf39 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_data_sources_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_data_sources_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,17 +5,15 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -from ..._vendor import _convert_request -from ...operations._data_sources_operations import build_create_or_update_request, build_create_request, build_delete_request, build_get_request, build_list_request + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,14 +39,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - @distributed_trace_async async def create_or_update( self, data_source_name: str, data_source: "_models.SearchIndexerDataSource", if_match: Optional[str] = None, if_none_match: Optional[str] = None, - skip_indexer_reset_requirement_for_cache: Optional[bool] = None, request_options: Optional["_models.RequestOptions"] = None, **kwargs: Any ) -> "_models.SearchIndexerDataSource": @@ -65,14 +60,8 @@ async def create_or_update( :param if_none_match: Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. :type if_none_match: str - :param skip_indexer_reset_requirement_for_cache: Ignores cache reset requirements. - :type skip_indexer_reset_requirement_for_cache: bool :param request_options: Parameter group. :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword prefer: For HTTP PUT requests, instructs the service to return the created/updated - resource on success. The default value is "return=representation". Note that overriding this - default value may result in unsupported behavior. - :paramtype prefer: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SearchIndexerDataSource, or the result of cls(response) :rtype: ~azure.search.documents.indexes.models.SearchIndexerDataSource @@ -83,44 +72,49 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(data_source, 'SearchIndexerDataSource') - - request = build_create_or_update_request( - data_source_name=data_source_name, - prefer=prefer, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - skip_indexer_reset_requirement_for_cache=skip_indexer_reset_requirement_for_cache, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) + prefer = "return=representation" + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'dataSourceName': self._serialize.url("data_source_name", data_source_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Prefer'] = self._serialize.header("prefer", prefer, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(data_source, 'SearchIndexerDataSource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -133,12 +127,9 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/datasources(\'{dataSourceName}\')'} # type: ignore - create_or_update.metadata = {'url': "/datasources(\'{dataSourceName}\')"} # type: ignore - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements + async def delete( self, data_source_name: str, if_match: Optional[str] = None, @@ -168,46 +159,49 @@ async def delete( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_delete_request( - data_source_name=data_source_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'dataSourceName': self._serialize.url("data_source_name", data_source_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/datasources(\'{dataSourceName}\')"} # type: ignore - + delete.metadata = {'url': '/datasources(\'{dataSourceName}\')'} # type: ignore - @distributed_trace_async async def get( self, data_source_name: str, @@ -230,35 +224,38 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_request( - data_source_name=data_source_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'dataSourceName': self._serialize.url("data_source_name", data_source_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexerDataSource', pipeline_response) @@ -267,11 +264,8 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/datasources(\'{dataSourceName}\')'} # type: ignore - get.metadata = {'url': "/datasources(\'{dataSourceName}\')"} # type: ignore - - - @distributed_trace_async async def list( self, select: Optional[str] = None, @@ -296,35 +290,39 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_list_request( - api_version=api_version, - select=select, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ListDataSourcesResult', pipeline_response) @@ -333,11 +331,8 @@ async def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/datasources'} # type: ignore - list.metadata = {'url': "/datasources"} # type: ignore - - - @distributed_trace_async async def create( self, data_source: "_models.SearchIndexerDataSource", @@ -360,38 +355,42 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(data_source, 'SearchIndexerDataSource') - - request = build_create_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.create.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(data_source, 'SearchIndexerDataSource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexerDataSource', pipeline_response) @@ -400,6 +399,4 @@ async def create( return cls(pipeline_response, deserialized, {}) return deserialized - - create.metadata = {'url': "/datasources"} # type: ignore - + create.metadata = {'url': '/datasources'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_indexers_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_indexers_operations.py index 45a5f26d14b7..f7dfdd284b56 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_indexers_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_indexers_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,17 +5,15 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -from ..._vendor import _convert_request -from ...operations._indexers_operations import build_create_or_update_request, build_create_request, build_delete_request, build_get_request, build_get_status_request, build_list_request, build_reset_docs_request, build_reset_request, build_run_request + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,8 +39,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - @distributed_trace_async - async def reset( # pylint: disable=inconsistent-return-statements + async def reset( self, indexer_name: str, request_options: Optional["_models.RequestOptions"] = None, @@ -65,120 +61,46 @@ async def reset( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_reset_request( - indexer_name=indexer_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.reset.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.reset.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - reset.metadata = {'url': "/indexers(\'{indexerName}\')/search.reset"} # type: ignore + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - @distributed_trace_async - async def reset_docs( # pylint: disable=inconsistent-return-statements - self, - indexer_name: str, - overwrite: Optional[bool] = False, - keys_or_ids: Optional["_models.DocumentKeysOrIds"] = None, - request_options: Optional["_models.RequestOptions"] = None, - **kwargs: Any - ) -> None: - """Resets specific documents in the datasource to be selectively re-ingested by the indexer. - - :param indexer_name: The name of the indexer to reset documents for. - :type indexer_name: str - :param overwrite: If false, keys or ids will be appended to existing ones. If true, only the - keys or ids in this payload will be queued to be re-ingested. - :type overwrite: bool - :param keys_or_ids: - :type keys_or_ids: ~azure.search.documents.indexes.models.DocumentKeysOrIds - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - if keys_or_ids is not None: - _json = self._serialize.body(keys_or_ids, 'DocumentKeysOrIds') - else: - _json = None - - request = build_reset_docs_request( - indexer_name=indexer_name, - api_version=api_version, - content_type=content_type, - json=_json, - overwrite=overwrite, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.reset_docs.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - reset_docs.metadata = {'url': "/indexers(\'{indexerName}\')/search.resetdocs"} # type: ignore + reset.metadata = {'url': '/indexers(\'{indexerName}\')/search.reset'} # type: ignore - - @distributed_trace_async - async def run( # pylint: disable=inconsistent-return-statements + async def run( self, indexer_name: str, request_options: Optional["_models.RequestOptions"] = None, @@ -200,52 +122,51 @@ async def run( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_run_request( - indexer_name=indexer_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.run.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.run.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - run.metadata = {'url': "/indexers(\'{indexerName}\')/search.run"} # type: ignore + run.metadata = {'url': '/indexers(\'{indexerName}\')/search.run'} # type: ignore - - @distributed_trace_async async def create_or_update( self, indexer_name: str, indexer: "_models.SearchIndexer", if_match: Optional[str] = None, if_none_match: Optional[str] = None, - skip_indexer_reset_requirement_for_cache: Optional[bool] = None, - disable_cache_reprocessing_change_detection: Optional[bool] = None, request_options: Optional["_models.RequestOptions"] = None, **kwargs: Any ) -> "_models.SearchIndexer": @@ -261,17 +182,8 @@ async def create_or_update( :param if_none_match: Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. :type if_none_match: str - :param skip_indexer_reset_requirement_for_cache: Ignores cache reset requirements. - :type skip_indexer_reset_requirement_for_cache: bool - :param disable_cache_reprocessing_change_detection: Disables cache reprocessing change - detection. - :type disable_cache_reprocessing_change_detection: bool :param request_options: Parameter group. :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword prefer: For HTTP PUT requests, instructs the service to return the created/updated - resource on success. The default value is "return=representation". Note that overriding this - default value may result in unsupported behavior. - :paramtype prefer: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SearchIndexer, or the result of cls(response) :rtype: ~azure.search.documents.indexes.models.SearchIndexer @@ -282,45 +194,49 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(indexer, 'SearchIndexer') - - request = build_create_or_update_request( - indexer_name=indexer_name, - prefer=prefer, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - skip_indexer_reset_requirement_for_cache=skip_indexer_reset_requirement_for_cache, - disable_cache_reprocessing_change_detection=disable_cache_reprocessing_change_detection, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) + prefer = "return=representation" + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Prefer'] = self._serialize.header("prefer", prefer, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(indexer, 'SearchIndexer') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -333,12 +249,9 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/indexers(\'{indexerName}\')'} # type: ignore - create_or_update.metadata = {'url': "/indexers(\'{indexerName}\')"} # type: ignore - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements + async def delete( self, indexer_name: str, if_match: Optional[str] = None, @@ -368,46 +281,49 @@ async def delete( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_delete_request( - indexer_name=indexer_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/indexers(\'{indexerName}\')"} # type: ignore + delete.metadata = {'url': '/indexers(\'{indexerName}\')'} # type: ignore - - @distributed_trace_async async def get( self, indexer_name: str, @@ -430,35 +346,38 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_request( - indexer_name=indexer_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexer', pipeline_response) @@ -467,11 +386,8 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/indexers(\'{indexerName}\')'} # type: ignore - get.metadata = {'url': "/indexers(\'{indexerName}\')"} # type: ignore - - - @distributed_trace_async async def list( self, select: Optional[str] = None, @@ -496,35 +412,39 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_list_request( - api_version=api_version, - select=select, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ListIndexersResult', pipeline_response) @@ -533,11 +453,8 @@ async def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/indexers'} # type: ignore - list.metadata = {'url': "/indexers"} # type: ignore - - - @distributed_trace_async async def create( self, indexer: "_models.SearchIndexer", @@ -560,38 +477,42 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(indexer, 'SearchIndexer') - - request = build_create_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.create.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(indexer, 'SearchIndexer') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexer', pipeline_response) @@ -600,11 +521,8 @@ async def create( return cls(pipeline_response, deserialized, {}) return deserialized + create.metadata = {'url': '/indexers'} # type: ignore - create.metadata = {'url': "/indexers"} # type: ignore - - - @distributed_trace_async async def get_status( self, indexer_name: str, @@ -627,35 +545,38 @@ async def get_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_status_request( - indexer_name=indexer_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get_status.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get_status.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexerStatus', pipeline_response) @@ -664,6 +585,4 @@ async def get_status( return cls(pipeline_response, deserialized, {}) return deserialized - - get_status.metadata = {'url': "/indexers(\'{indexerName}\')/search.status"} # type: ignore - + get_status.metadata = {'url': '/indexers(\'{indexerName}\')/search.status'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_indexes_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_indexes_operations.py index 4219a29c356a..86e12fa3e2c7 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_indexes_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_indexes_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,19 +5,16 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -from ..._vendor import _convert_request -from ...operations._indexes_operations import build_analyze_request, build_create_or_update_request, build_create_request, build_delete_request, build_get_request, build_get_statistics_request, build_list_request + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +40,6 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - @distributed_trace_async async def create( self, index: "_models.SearchIndex", @@ -67,38 +62,42 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(index, 'SearchIndex') - - request = build_create_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.create.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(index, 'SearchIndex') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndex', pipeline_response) @@ -107,11 +106,8 @@ async def create( return cls(pipeline_response, deserialized, {}) return deserialized + create.metadata = {'url': '/indexes'} # type: ignore - create.metadata = {'url': "/indexes"} # type: ignore - - - @distributed_trace def list( self, select: Optional[str] = None, @@ -128,60 +124,54 @@ def list( :type request_options: ~azure.search.documents.indexes.models.RequestOptions :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ListIndexesResult or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.search.documents.indexes.models.ListIndexesResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.search.documents.indexes.models.ListIndexesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListIndexesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _x_ms_client_request_id = None + if request_options is not None: + _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - - request = build_list_request( - api_version=api_version, - select=select, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - - request = build_list_request( - api_version=api_version, - select=select, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=next_link, - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - + url = next_link + query_parameters = {} # type: Dict[str, Any] path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.method = "GET" + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) return request async def extract_data(pipeline_response): - deserialized = self._deserialize("ListIndexesResult", pipeline_response) + deserialized = self._deserialize('ListIndexesResult', pipeline_response) list_of_elem = deserialized.indexes if cls: list_of_elem = cls(list_of_elem) @@ -190,27 +180,21 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) raise HttpResponseError(response=response, model=error) return pipeline_response - return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': "/indexes"} # type: ignore + list.metadata = {'url': '/indexes'} # type: ignore - @distributed_trace_async async def create_or_update( self, index_name: str, @@ -241,10 +225,6 @@ async def create_or_update( :type if_none_match: str :param request_options: Parameter group. :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword prefer: For HTTP PUT requests, instructs the service to return the created/updated - resource on success. The default value is "return=representation". Note that overriding this - default value may result in unsupported behavior. - :paramtype prefer: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SearchIndex, or the result of cls(response) :rtype: ~azure.search.documents.indexes.models.SearchIndex @@ -255,44 +235,51 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(index, 'SearchIndex') - - request = build_create_or_update_request( - index_name=index_name, - prefer=prefer, - api_version=api_version, - content_type=content_type, - json=_json, - allow_index_downtime=allow_index_downtime, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) + prefer = "return=representation" + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("index_name", index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if allow_index_downtime is not None: + query_parameters['allowIndexDowntime'] = self._serialize.query("allow_index_downtime", allow_index_downtime, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Prefer'] = self._serialize.header("prefer", prefer, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(index, 'SearchIndex') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -305,12 +292,9 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore - create_or_update.metadata = {'url': "/indexes(\'{indexName}\')"} # type: ignore - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements + async def delete( self, index_name: str, if_match: Optional[str] = None, @@ -342,46 +326,49 @@ async def delete( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_delete_request( - index_name=index_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("index_name", index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/indexes(\'{indexName}\')"} # type: ignore + delete.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore - - @distributed_trace_async async def get( self, index_name: str, @@ -404,35 +391,38 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_request( - index_name=index_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("index_name", index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndex', pipeline_response) @@ -441,11 +431,8 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore - get.metadata = {'url': "/indexes(\'{indexName}\')"} # type: ignore - - - @distributed_trace_async async def get_statistics( self, index_name: str, @@ -468,35 +455,38 @@ async def get_statistics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_statistics_request( - index_name=index_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get_statistics.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get_statistics.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("index_name", index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('GetIndexStatisticsResult', pipeline_response) @@ -505,11 +495,8 @@ async def get_statistics( return cls(pipeline_response, deserialized, {}) return deserialized + get_statistics.metadata = {'url': '/indexes(\'{indexName}\')/search.stats'} # type: ignore - get_statistics.metadata = {'url': "/indexes(\'{indexName}\')/search.stats"} # type: ignore - - - @distributed_trace_async async def analyze( self, index_name: str, @@ -535,39 +522,43 @@ async def analyze( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(request, 'AnalyzeRequest') - - request = build_analyze_request( - index_name=index_name, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.analyze.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.analyze.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("index_name", index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'AnalyzeRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AnalyzeResult', pipeline_response) @@ -576,6 +567,4 @@ async def analyze( return cls(pipeline_response, deserialized, {}) return deserialized - - analyze.metadata = {'url': "/indexes(\'{indexName}\')/search.analyze"} # type: ignore - + analyze.metadata = {'url': '/indexes(\'{indexName}\')/search.analyze'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_search_client_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_search_client_operations.py index ab9533aaf2a7..55af1549c4a8 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_search_client_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_search_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,23 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -from ..._vendor import _convert_request -from ...operations._search_client_operations import build_get_service_statistics_request + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class SearchClientOperationsMixin: - @distributed_trace_async async def get_service_statistics( self, request_options: Optional["_models.RequestOptions"] = None, @@ -42,34 +38,37 @@ async def get_service_statistics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_service_statistics_request( - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get_service_statistics.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get_service_statistics.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ServiceStatistics', pipeline_response) @@ -78,6 +77,4 @@ async def get_service_statistics( return cls(pipeline_response, deserialized, {}) return deserialized - - get_service_statistics.metadata = {'url': "/servicestats"} # type: ignore - + get_service_statistics.metadata = {'url': '/servicestats'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_skillsets_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_skillsets_operations.py index 96f3d511d035..35b08acf5669 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_skillsets_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_skillsets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,17 +5,15 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, List, Optional, TypeVar +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -from ..._vendor import _convert_request -from ...operations._skillsets_operations import build_create_or_update_request, build_create_request, build_delete_request, build_get_request, build_list_request, build_reset_skills_request + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,15 +39,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - @distributed_trace_async async def create_or_update( self, skillset_name: str, skillset: "_models.SearchIndexerSkillset", if_match: Optional[str] = None, if_none_match: Optional[str] = None, - skip_indexer_reset_requirement_for_cache: Optional[bool] = None, - disable_cache_reprocessing_change_detection: Optional[bool] = None, request_options: Optional["_models.RequestOptions"] = None, **kwargs: Any ) -> "_models.SearchIndexerSkillset": @@ -67,17 +61,8 @@ async def create_or_update( :param if_none_match: Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. :type if_none_match: str - :param skip_indexer_reset_requirement_for_cache: Ignores cache reset requirements. - :type skip_indexer_reset_requirement_for_cache: bool - :param disable_cache_reprocessing_change_detection: Disables cache reprocessing change - detection. - :type disable_cache_reprocessing_change_detection: bool :param request_options: Parameter group. :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword prefer: For HTTP PUT requests, instructs the service to return the created/updated - resource on success. The default value is "return=representation". Note that overriding this - default value may result in unsupported behavior. - :paramtype prefer: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SearchIndexerSkillset, or the result of cls(response) :rtype: ~azure.search.documents.indexes.models.SearchIndexerSkillset @@ -88,45 +73,49 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(skillset, 'SearchIndexerSkillset') - - request = build_create_or_update_request( - skillset_name=skillset_name, - prefer=prefer, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - skip_indexer_reset_requirement_for_cache=skip_indexer_reset_requirement_for_cache, - disable_cache_reprocessing_change_detection=disable_cache_reprocessing_change_detection, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) + prefer = "return=representation" + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'skillsetName': self._serialize.url("skillset_name", skillset_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Prefer'] = self._serialize.header("prefer", prefer, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(skillset, 'SearchIndexerSkillset') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -139,12 +128,9 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/skillsets(\'{skillsetName}\')'} # type: ignore - create_or_update.metadata = {'url': "/skillsets(\'{skillsetName}\')"} # type: ignore - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements + async def delete( self, skillset_name: str, if_match: Optional[str] = None, @@ -174,46 +160,49 @@ async def delete( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_delete_request( - skillset_name=skillset_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'skillsetName': self._serialize.url("skillset_name", skillset_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/skillsets(\'{skillsetName}\')"} # type: ignore - + delete.metadata = {'url': '/skillsets(\'{skillsetName}\')'} # type: ignore - @distributed_trace_async async def get( self, skillset_name: str, @@ -236,35 +225,38 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_request( - skillset_name=skillset_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'skillsetName': self._serialize.url("skillset_name", skillset_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexerSkillset', pipeline_response) @@ -273,11 +265,8 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/skillsets(\'{skillsetName}\')'} # type: ignore - get.metadata = {'url': "/skillsets(\'{skillsetName}\')"} # type: ignore - - - @distributed_trace_async async def list( self, select: Optional[str] = None, @@ -302,35 +291,39 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_list_request( - api_version=api_version, - select=select, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ListSkillsetsResult', pipeline_response) @@ -339,11 +332,8 @@ async def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/skillsets'} # type: ignore - list.metadata = {'url': "/skillsets"} # type: ignore - - - @distributed_trace_async async def create( self, skillset: "_models.SearchIndexerSkillset", @@ -366,38 +356,42 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(skillset, 'SearchIndexerSkillset') - - request = build_create_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.create.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(skillset, 'SearchIndexerSkillset') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexerSkillset', pipeline_response) @@ -406,74 +400,4 @@ async def create( return cls(pipeline_response, deserialized, {}) return deserialized - - create.metadata = {'url': "/skillsets"} # type: ignore - - - @distributed_trace_async - async def reset_skills( # pylint: disable=inconsistent-return-statements - self, - skillset_name: str, - skill_names: Optional[List[str]] = None, - request_options: Optional["_models.RequestOptions"] = None, - **kwargs: Any - ) -> None: - """Reset an existing skillset in a search service. - - :param skillset_name: The name of the skillset to reset. - :type skillset_name: str - :param skill_names: the names of skills to be reset. - :type skill_names: list[str] - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - _skill_names = _models.SkillNames(skill_names=skill_names) - _json = self._serialize.body(_skill_names, 'SkillNames') - - request = build_reset_skills_request( - skillset_name=skillset_name, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.reset_skills.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - reset_skills.metadata = {'url': "/skillsets(\'{skillsetName}\')/search.resetskills"} # type: ignore - + create.metadata = {'url': '/skillsets'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_synonym_maps_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_synonym_maps_operations.py index 3822eb499b33..caf01053f79d 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_synonym_maps_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/aio/operations/_synonym_maps_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,17 +5,15 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Optional, TypeVar +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from ... import models as _models -from ..._vendor import _convert_request -from ...operations._synonym_maps_operations import build_create_or_update_request, build_create_request, build_delete_request, build_get_request, build_list_request + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +39,6 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - @distributed_trace_async async def create_or_update( self, synonym_map_name: str, @@ -66,10 +62,6 @@ async def create_or_update( :type if_none_match: str :param request_options: Parameter group. :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword prefer: For HTTP PUT requests, instructs the service to return the created/updated - resource on success. The default value is "return=representation". Note that overriding this - default value may result in unsupported behavior. - :paramtype prefer: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SynonymMap, or the result of cls(response) :rtype: ~azure.search.documents.indexes.models.SynonymMap @@ -80,43 +72,49 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(synonym_map, 'SynonymMap') - - request = build_create_or_update_request( - synonym_map_name=synonym_map_name, - prefer=prefer, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) + prefer = "return=representation" + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'synonymMapName': self._serialize.url("synonym_map_name", synonym_map_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Prefer'] = self._serialize.header("prefer", prefer, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(synonym_map, 'SynonymMap') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -129,12 +127,9 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/synonymmaps(\'{synonymMapName}\')'} # type: ignore - create_or_update.metadata = {'url': "/synonymmaps(\'{synonymMapName}\')"} # type: ignore - - - @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements + async def delete( self, synonym_map_name: str, if_match: Optional[str] = None, @@ -164,46 +159,49 @@ async def delete( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_delete_request( - synonym_map_name=synonym_map_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'synonymMapName': self._serialize.url("synonym_map_name", synonym_map_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/synonymmaps(\'{synonymMapName}\')"} # type: ignore - + delete.metadata = {'url': '/synonymmaps(\'{synonymMapName}\')'} # type: ignore - @distributed_trace_async async def get( self, synonym_map_name: str, @@ -226,35 +224,38 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_request( - synonym_map_name=synonym_map_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'synonymMapName': self._serialize.url("synonym_map_name", synonym_map_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SynonymMap', pipeline_response) @@ -263,11 +264,8 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/synonymmaps(\'{synonymMapName}\')'} # type: ignore - get.metadata = {'url': "/synonymmaps(\'{synonymMapName}\')"} # type: ignore - - - @distributed_trace_async async def list( self, select: Optional[str] = None, @@ -292,35 +290,39 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_list_request( - api_version=api_version, - select=select, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ListSynonymMapsResult', pipeline_response) @@ -329,11 +331,8 @@ async def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/synonymmaps'} # type: ignore - list.metadata = {'url': "/synonymmaps"} # type: ignore - - - @distributed_trace_async async def create( self, synonym_map: "_models.SynonymMap", @@ -356,38 +355,42 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(synonym_map, 'SynonymMap') - - request = build_create_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.create.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(synonym_map, 'SynonymMap') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SynonymMap', pipeline_response) @@ -396,6 +399,4 @@ async def create( return cls(pipeline_response, deserialized, {}) return deserialized - - create.metadata = {'url': "/synonymmaps"} # type: ignore - + create.metadata = {'url': '/synonymmaps'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/__init__.py index 8e9ce52ac34e..87a2192b4d80 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/__init__.py @@ -12,7 +12,6 @@ from ._models_py3 import AnalyzedTokenInfo from ._models_py3 import AsciiFoldingTokenFilter from ._models_py3 import AzureActiveDirectoryApplicationCredentials - from ._models_py3 import AzureMachineLearningSkill from ._models_py3 import BM25Similarity from ._models_py3 import CharFilter from ._models_py3 import CjkBigramTokenFilter @@ -27,7 +26,6 @@ from ._models_py3 import CustomEntity from ._models_py3 import CustomEntityAlias from ._models_py3 import CustomEntityLookupSkill - from ._models_py3 import CustomNormalizer from ._models_py3 import DataChangeDetectionPolicy from ._models_py3 import DataDeletionDetectionPolicy from ._models_py3 import DataSourceCredentials @@ -36,14 +34,11 @@ from ._models_py3 import DistanceScoringFunction from ._models_py3 import DistanceScoringParameters from ._models_py3 import DocumentExtractionSkill - from ._models_py3 import DocumentKeysOrIds from ._models_py3 import EdgeNGramTokenFilter from ._models_py3 import EdgeNGramTokenFilterV2 from ._models_py3 import EdgeNGramTokenizer from ._models_py3 import ElisionTokenFilter - from ._models_py3 import EntityLinkingSkill from ._models_py3 import EntityRecognitionSkill - from ._models_py3 import EntityRecognitionSkillV3 from ._models_py3 import FieldMapping from ._models_py3 import FieldMappingFunction from ._models_py3 import FreshnessScoringFunction @@ -51,7 +46,6 @@ from ._models_py3 import GetIndexStatisticsResult from ._models_py3 import HighWaterMarkChangeDetectionPolicy from ._models_py3 import ImageAnalysisSkill - from ._models_py3 import IndexerCurrentState from ._models_py3 import IndexerExecutionResult from ._models_py3 import IndexingParameters from ._models_py3 import IndexingParametersConfiguration @@ -65,10 +59,8 @@ from ._models_py3 import LanguageDetectionSkill from ._models_py3 import LengthTokenFilter from ._models_py3 import LexicalAnalyzer - from ._models_py3 import LexicalNormalizer from ._models_py3 import LexicalTokenizer from ._models_py3 import LimitTokenFilter - from ._models_py3 import ListAliasesResult from ._models_py3 import ListDataSourcesResult from ._models_py3 import ListIndexersResult from ._models_py3 import ListIndexesResult @@ -88,7 +80,6 @@ from ._models_py3 import NGramTokenizer from ._models_py3 import OcrSkill from ._models_py3 import OutputFieldMappingEntry - from ._models_py3 import PIIDetectionSkill from ._models_py3 import PathHierarchyTokenizerV2 from ._models_py3 import PatternAnalyzer from ._models_py3 import PatternCaptureTokenFilter @@ -96,22 +87,16 @@ from ._models_py3 import PatternReplaceTokenFilter from ._models_py3 import PatternTokenizer from ._models_py3 import PhoneticTokenFilter - from ._models_py3 import PrioritizedFields from ._models_py3 import RequestOptions from ._models_py3 import ResourceCounter from ._models_py3 import ScoringFunction from ._models_py3 import ScoringProfile - from ._models_py3 import SearchAlias from ._models_py3 import SearchError from ._models_py3 import SearchField from ._models_py3 import SearchIndex from ._models_py3 import SearchIndexer - from ._models_py3 import SearchIndexerCache from ._models_py3 import SearchIndexerDataContainer - from ._models_py3 import SearchIndexerDataIdentity - from ._models_py3 import SearchIndexerDataNoneIdentity from ._models_py3 import SearchIndexerDataSource - from ._models_py3 import SearchIndexerDataUserAssignedIdentity from ._models_py3 import SearchIndexerError from ._models_py3 import SearchIndexerKnowledgeStore from ._models_py3 import SearchIndexerKnowledgeStoreBlobProjectionSelector @@ -126,18 +111,13 @@ from ._models_py3 import SearchIndexerStatus from ._models_py3 import SearchIndexerWarning from ._models_py3 import SearchResourceEncryptionKey - from ._models_py3 import SemanticConfiguration - from ._models_py3 import SemanticField - from ._models_py3 import SemanticSettings from ._models_py3 import SentimentSkill - from ._models_py3 import SentimentSkillV3 from ._models_py3 import ServiceCounters from ._models_py3 import ServiceLimits from ._models_py3 import ServiceStatistics from ._models_py3 import ShaperSkill from ._models_py3 import ShingleTokenFilter from ._models_py3 import Similarity - from ._models_py3 import SkillNames from ._models_py3 import SnowballTokenFilter from ._models_py3 import SoftDeleteColumnDeletionDetectionPolicy from ._models_py3 import SplitSkill @@ -165,7 +145,6 @@ from ._models import AnalyzedTokenInfo # type: ignore from ._models import AsciiFoldingTokenFilter # type: ignore from ._models import AzureActiveDirectoryApplicationCredentials # type: ignore - from ._models import AzureMachineLearningSkill # type: ignore from ._models import BM25Similarity # type: ignore from ._models import CharFilter # type: ignore from ._models import CjkBigramTokenFilter # type: ignore @@ -180,7 +159,6 @@ from ._models import CustomEntity # type: ignore from ._models import CustomEntityAlias # type: ignore from ._models import CustomEntityLookupSkill # type: ignore - from ._models import CustomNormalizer # type: ignore from ._models import DataChangeDetectionPolicy # type: ignore from ._models import DataDeletionDetectionPolicy # type: ignore from ._models import DataSourceCredentials # type: ignore @@ -189,14 +167,11 @@ from ._models import DistanceScoringFunction # type: ignore from ._models import DistanceScoringParameters # type: ignore from ._models import DocumentExtractionSkill # type: ignore - from ._models import DocumentKeysOrIds # type: ignore from ._models import EdgeNGramTokenFilter # type: ignore from ._models import EdgeNGramTokenFilterV2 # type: ignore from ._models import EdgeNGramTokenizer # type: ignore from ._models import ElisionTokenFilter # type: ignore - from ._models import EntityLinkingSkill # type: ignore from ._models import EntityRecognitionSkill # type: ignore - from ._models import EntityRecognitionSkillV3 # type: ignore from ._models import FieldMapping # type: ignore from ._models import FieldMappingFunction # type: ignore from ._models import FreshnessScoringFunction # type: ignore @@ -204,7 +179,6 @@ from ._models import GetIndexStatisticsResult # type: ignore from ._models import HighWaterMarkChangeDetectionPolicy # type: ignore from ._models import ImageAnalysisSkill # type: ignore - from ._models import IndexerCurrentState # type: ignore from ._models import IndexerExecutionResult # type: ignore from ._models import IndexingParameters # type: ignore from ._models import IndexingParametersConfiguration # type: ignore @@ -218,10 +192,8 @@ from ._models import LanguageDetectionSkill # type: ignore from ._models import LengthTokenFilter # type: ignore from ._models import LexicalAnalyzer # type: ignore - from ._models import LexicalNormalizer # type: ignore from ._models import LexicalTokenizer # type: ignore from ._models import LimitTokenFilter # type: ignore - from ._models import ListAliasesResult # type: ignore from ._models import ListDataSourcesResult # type: ignore from ._models import ListIndexersResult # type: ignore from ._models import ListIndexesResult # type: ignore @@ -241,7 +213,6 @@ from ._models import NGramTokenizer # type: ignore from ._models import OcrSkill # type: ignore from ._models import OutputFieldMappingEntry # type: ignore - from ._models import PIIDetectionSkill # type: ignore from ._models import PathHierarchyTokenizerV2 # type: ignore from ._models import PatternAnalyzer # type: ignore from ._models import PatternCaptureTokenFilter # type: ignore @@ -249,22 +220,16 @@ from ._models import PatternReplaceTokenFilter # type: ignore from ._models import PatternTokenizer # type: ignore from ._models import PhoneticTokenFilter # type: ignore - from ._models import PrioritizedFields # type: ignore from ._models import RequestOptions # type: ignore from ._models import ResourceCounter # type: ignore from ._models import ScoringFunction # type: ignore from ._models import ScoringProfile # type: ignore - from ._models import SearchAlias # type: ignore from ._models import SearchError # type: ignore from ._models import SearchField # type: ignore from ._models import SearchIndex # type: ignore from ._models import SearchIndexer # type: ignore - from ._models import SearchIndexerCache # type: ignore from ._models import SearchIndexerDataContainer # type: ignore - from ._models import SearchIndexerDataIdentity # type: ignore - from ._models import SearchIndexerDataNoneIdentity # type: ignore from ._models import SearchIndexerDataSource # type: ignore - from ._models import SearchIndexerDataUserAssignedIdentity # type: ignore from ._models import SearchIndexerError # type: ignore from ._models import SearchIndexerKnowledgeStore # type: ignore from ._models import SearchIndexerKnowledgeStoreBlobProjectionSelector # type: ignore @@ -279,18 +244,13 @@ from ._models import SearchIndexerStatus # type: ignore from ._models import SearchIndexerWarning # type: ignore from ._models import SearchResourceEncryptionKey # type: ignore - from ._models import SemanticConfiguration # type: ignore - from ._models import SemanticField # type: ignore - from ._models import SemanticSettings # type: ignore from ._models import SentimentSkill # type: ignore - from ._models import SentimentSkillV3 # type: ignore from ._models import ServiceCounters # type: ignore from ._models import ServiceLimits # type: ignore from ._models import ServiceStatistics # type: ignore from ._models import ShaperSkill # type: ignore from ._models import ShingleTokenFilter # type: ignore from ._models import Similarity # type: ignore - from ._models import SkillNames # type: ignore from ._models import SnowballTokenFilter # type: ignore from ._models import SoftDeleteColumnDeletionDetectionPolicy # type: ignore from ._models import SplitSkill # type: ignore @@ -328,18 +288,13 @@ ImageDetail, IndexerExecutionEnvironment, IndexerExecutionStatus, - IndexerExecutionStatusDetail, IndexerStatus, - IndexingMode, KeyPhraseExtractionSkillLanguage, LexicalAnalyzerName, - LexicalNormalizerName, LexicalTokenizerName, - LineEnding, MicrosoftStemmingTokenizerLanguage, MicrosoftTokenizerLanguage, OcrSkillLanguage, - PIIDetectionSkillMaskingMode, PhoneticEncoder, RegexFlags, ScoringFunctionAggregation, @@ -364,7 +319,6 @@ 'AnalyzedTokenInfo', 'AsciiFoldingTokenFilter', 'AzureActiveDirectoryApplicationCredentials', - 'AzureMachineLearningSkill', 'BM25Similarity', 'CharFilter', 'CjkBigramTokenFilter', @@ -379,7 +333,6 @@ 'CustomEntity', 'CustomEntityAlias', 'CustomEntityLookupSkill', - 'CustomNormalizer', 'DataChangeDetectionPolicy', 'DataDeletionDetectionPolicy', 'DataSourceCredentials', @@ -388,14 +341,11 @@ 'DistanceScoringFunction', 'DistanceScoringParameters', 'DocumentExtractionSkill', - 'DocumentKeysOrIds', 'EdgeNGramTokenFilter', 'EdgeNGramTokenFilterV2', 'EdgeNGramTokenizer', 'ElisionTokenFilter', - 'EntityLinkingSkill', 'EntityRecognitionSkill', - 'EntityRecognitionSkillV3', 'FieldMapping', 'FieldMappingFunction', 'FreshnessScoringFunction', @@ -403,7 +353,6 @@ 'GetIndexStatisticsResult', 'HighWaterMarkChangeDetectionPolicy', 'ImageAnalysisSkill', - 'IndexerCurrentState', 'IndexerExecutionResult', 'IndexingParameters', 'IndexingParametersConfiguration', @@ -417,10 +366,8 @@ 'LanguageDetectionSkill', 'LengthTokenFilter', 'LexicalAnalyzer', - 'LexicalNormalizer', 'LexicalTokenizer', 'LimitTokenFilter', - 'ListAliasesResult', 'ListDataSourcesResult', 'ListIndexersResult', 'ListIndexesResult', @@ -440,7 +387,6 @@ 'NGramTokenizer', 'OcrSkill', 'OutputFieldMappingEntry', - 'PIIDetectionSkill', 'PathHierarchyTokenizerV2', 'PatternAnalyzer', 'PatternCaptureTokenFilter', @@ -448,22 +394,16 @@ 'PatternReplaceTokenFilter', 'PatternTokenizer', 'PhoneticTokenFilter', - 'PrioritizedFields', 'RequestOptions', 'ResourceCounter', 'ScoringFunction', 'ScoringProfile', - 'SearchAlias', 'SearchError', 'SearchField', 'SearchIndex', 'SearchIndexer', - 'SearchIndexerCache', 'SearchIndexerDataContainer', - 'SearchIndexerDataIdentity', - 'SearchIndexerDataNoneIdentity', 'SearchIndexerDataSource', - 'SearchIndexerDataUserAssignedIdentity', 'SearchIndexerError', 'SearchIndexerKnowledgeStore', 'SearchIndexerKnowledgeStoreBlobProjectionSelector', @@ -478,18 +418,13 @@ 'SearchIndexerStatus', 'SearchIndexerWarning', 'SearchResourceEncryptionKey', - 'SemanticConfiguration', - 'SemanticField', - 'SemanticSettings', 'SentimentSkill', - 'SentimentSkillV3', 'ServiceCounters', 'ServiceLimits', 'ServiceStatistics', 'ShaperSkill', 'ShingleTokenFilter', 'Similarity', - 'SkillNames', 'SnowballTokenFilter', 'SoftDeleteColumnDeletionDetectionPolicy', 'SplitSkill', @@ -525,18 +460,13 @@ 'ImageDetail', 'IndexerExecutionEnvironment', 'IndexerExecutionStatus', - 'IndexerExecutionStatusDetail', 'IndexerStatus', - 'IndexingMode', 'KeyPhraseExtractionSkillLanguage', 'LexicalAnalyzerName', - 'LexicalNormalizerName', 'LexicalTokenizerName', - 'LineEnding', 'MicrosoftStemmingTokenizerLanguage', 'MicrosoftTokenizerLanguage', 'OcrSkillLanguage', - 'PIIDetectionSkillMaskingMode', 'PhoneticEncoder', 'RegexFlags', 'ScoringFunctionAggregation', diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_models.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_models.py index 5370322dacda..0237fa37a0af 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_models.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_models.py @@ -48,8 +48,6 @@ def __init__( self, **kwargs ): - """ - """ super(AnalyzedTokenInfo, self).__init__(**kwargs) self.token = None self.start_offset = None @@ -62,39 +60,40 @@ class AnalyzeRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar text: Required. The text to break into tokens. - :vartype text: str - :ivar analyzer: The name of the analyzer to use to break the given text. Possible values - include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft", - "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh-Hans.lucene", - "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", "cs.lucene", - "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", "en.lucene", - "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", "gl.lucene", - "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", "he.microsoft", - "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", "id.microsoft", - "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", "ja.lucene", - "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", "lt.microsoft", - "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", "fa.lucene", - "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft", - "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene", - "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft", - "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft", - "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", - "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", - "whitespace". - :vartype analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :ivar tokenizer: The name of the tokenizer to use to break the given text. Possible values - include: "classic", "edgeNGram", "keyword_v2", "letter", "lowercase", - "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", "nGram", - "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", "whitespace". - :vartype tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName - :ivar normalizer: The name of the normalizer to use to normalize the given text. Possible - values include: "asciifolding", "elision", "lowercase", "standard", "uppercase". - :vartype normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :ivar token_filters: An optional list of token filters to use when breaking the given text. - :vartype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :ivar char_filters: An optional list of character filters to use when breaking the given text. - :vartype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] + :param text: Required. The text to break into tokens. + :type text: str + :param analyzer: The name of the analyzer to use to break the given text. If this parameter is + not specified, you must specify a tokenizer instead. The tokenizer and analyzer parameters are + mutually exclusive. Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", + "bn.microsoft", "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", + "zh-Hans.microsoft", "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", + "cs.microsoft", "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", + "en.microsoft", "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", + "fr.lucene", "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", + "gu.microsoft", "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", + "is.microsoft", "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", + "ja.microsoft", "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", + "lv.lucene", "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", + "no.lucene", "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", + "pt-PT.microsoft", "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", + "ru.lucene", "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", + "es.microsoft", "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", + "th.microsoft", "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", + "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", + "simple", "stop", "whitespace". + :type analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName + :param tokenizer: The name of the tokenizer to use to break the given text. If this parameter + is not specified, you must specify an analyzer instead. The tokenizer and analyzer parameters + are mutually exclusive. Possible values include: "classic", "edgeNGram", "keyword_v2", + "letter", "lowercase", "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", + "nGram", "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", "whitespace". + :type tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName + :param token_filters: An optional list of token filters to use when breaking the given text. + This parameter can only be set when using the tokenizer parameter. + :type token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] + :param char_filters: An optional list of character filters to use when breaking the given text. + This parameter can only be set when using the tokenizer parameter. + :type char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] """ _validation = { @@ -105,7 +104,6 @@ class AnalyzeRequest(msrest.serialization.Model): 'text': {'key': 'text', 'type': 'str'}, 'analyzer': {'key': 'analyzer', 'type': 'str'}, 'tokenizer': {'key': 'tokenizer', 'type': 'str'}, - 'normalizer': {'key': 'normalizer', 'type': 'str'}, 'token_filters': {'key': 'tokenFilters', 'type': '[str]'}, 'char_filters': {'key': 'charFilters', 'type': '[str]'}, } @@ -114,47 +112,10 @@ def __init__( self, **kwargs ): - """ - :keyword text: Required. The text to break into tokens. - :paramtype text: str - :keyword analyzer: The name of the analyzer to use to break the given text. Possible values - include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft", - "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh-Hans.lucene", - "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", "cs.lucene", - "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", "en.lucene", - "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", "gl.lucene", - "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", "he.microsoft", - "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", "id.microsoft", - "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", "ja.lucene", - "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", "lt.microsoft", - "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", "fa.lucene", - "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft", - "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene", - "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft", - "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft", - "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", - "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", - "whitespace". - :paramtype analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :keyword tokenizer: The name of the tokenizer to use to break the given text. Possible values - include: "classic", "edgeNGram", "keyword_v2", "letter", "lowercase", - "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", "nGram", - "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", "whitespace". - :paramtype tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName - :keyword normalizer: The name of the normalizer to use to normalize the given text. Possible - values include: "asciifolding", "elision", "lowercase", "standard", "uppercase". - :paramtype normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :keyword token_filters: An optional list of token filters to use when breaking the given text. - :paramtype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :keyword char_filters: An optional list of character filters to use when breaking the given - text. - :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] - """ super(AnalyzeRequest, self).__init__(**kwargs) self.text = kwargs['text'] self.analyzer = kwargs.get('analyzer', None) self.tokenizer = kwargs.get('tokenizer', None) - self.normalizer = kwargs.get('normalizer', None) self.token_filters = kwargs.get('token_filters', None) self.char_filters = kwargs.get('char_filters', None) @@ -164,8 +125,8 @@ class AnalyzeResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar tokens: Required. The list of tokens returned by the analyzer specified in the request. - :vartype tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo] + :param tokens: Required. The list of tokens returned by the analyzer specified in the request. + :type tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo] """ _validation = { @@ -180,11 +141,6 @@ def __init__( self, **kwargs ): - """ - :keyword tokens: Required. The list of tokens returned by the analyzer specified in the - request. - :paramtype tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo] - """ super(AnalyzeResult, self).__init__(**kwargs) self.tokens = kwargs['tokens'] @@ -197,13 +153,13 @@ class TokenFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str + :type name: str """ _validation = { @@ -224,12 +180,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - """ super(TokenFilter, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] self.name = kwargs['name'] @@ -240,16 +190,16 @@ class AsciiFoldingTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar preserve_original: A value indicating whether the original token will be kept. Default is - false. - :vartype preserve_original: bool + :type name: str + :param preserve_original: A value indicating whether the original token will be kept. Default + is false. + :type preserve_original: bool """ _validation = { @@ -267,15 +217,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword preserve_original: A value indicating whether the original token will be kept. Default - is false. - :paramtype preserve_original: bool - """ super(AsciiFoldingTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.AsciiFoldingTokenFilter' # type: str self.preserve_original = kwargs.get('preserve_original', False) @@ -286,12 +227,12 @@ class AzureActiveDirectoryApplicationCredentials(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar application_id: Required. An AAD Application ID that was granted the required access + :param application_id: Required. An AAD Application ID that was granted the required access permissions to the Azure Key Vault that is to be used when encrypting your data at rest. The Application ID should not be confused with the Object ID for your AAD Application. - :vartype application_id: str - :ivar application_secret: The authentication key of the specified AAD application. - :vartype application_secret: str + :type application_id: str + :param application_secret: The authentication key of the specified AAD application. + :type application_secret: str """ _validation = { @@ -307,222 +248,11 @@ def __init__( self, **kwargs ): - """ - :keyword application_id: Required. An AAD Application ID that was granted the required access - permissions to the Azure Key Vault that is to be used when encrypting your data at rest. The - Application ID should not be confused with the Object ID for your AAD Application. - :paramtype application_id: str - :keyword application_secret: The authentication key of the specified AAD application. - :paramtype application_secret: str - """ super(AzureActiveDirectoryApplicationCredentials, self).__init__(**kwargs) self.application_id = kwargs['application_id'] self.application_secret = kwargs.get('application_secret', None) -class SearchIndexerSkill(msrest.serialization.Model): - """Base type for skills. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureMachineLearningSkill, WebApiSkill, CustomEntityLookupSkill, EntityRecognitionSkill, KeyPhraseExtractionSkill, LanguageDetectionSkill, MergeSkill, PIIDetectionSkill, SentimentSkill, SplitSkill, TextTranslationSkill, EntityLinkingSkill, EntityRecognitionSkillV3, SentimentSkillV3, ConditionalSkill, DocumentExtractionSkill, ShaperSkill, ImageAnalysisSkill, OcrSkill. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - } - - _subtype_map = { - 'odata_type': {'#Microsoft.Skills.Custom.AmlSkill': 'AzureMachineLearningSkill', '#Microsoft.Skills.Custom.WebApiSkill': 'WebApiSkill', '#Microsoft.Skills.Text.CustomEntityLookupSkill': 'CustomEntityLookupSkill', '#Microsoft.Skills.Text.EntityRecognitionSkill': 'EntityRecognitionSkill', '#Microsoft.Skills.Text.KeyPhraseExtractionSkill': 'KeyPhraseExtractionSkill', '#Microsoft.Skills.Text.LanguageDetectionSkill': 'LanguageDetectionSkill', '#Microsoft.Skills.Text.MergeSkill': 'MergeSkill', '#Microsoft.Skills.Text.PIIDetectionSkill': 'PIIDetectionSkill', '#Microsoft.Skills.Text.SentimentSkill': 'SentimentSkill', '#Microsoft.Skills.Text.SplitSkill': 'SplitSkill', '#Microsoft.Skills.Text.TranslationSkill': 'TextTranslationSkill', '#Microsoft.Skills.Text.V3.EntityLinkingSkill': 'EntityLinkingSkill', '#Microsoft.Skills.Text.V3.EntityRecognitionSkill': 'EntityRecognitionSkillV3', '#Microsoft.Skills.Text.V3.SentimentSkill': 'SentimentSkillV3', '#Microsoft.Skills.Util.ConditionalSkill': 'ConditionalSkill', '#Microsoft.Skills.Util.DocumentExtractionSkill': 'DocumentExtractionSkill', '#Microsoft.Skills.Util.ShaperSkill': 'ShaperSkill', '#Microsoft.Skills.Vision.ImageAnalysisSkill': 'ImageAnalysisSkill', '#Microsoft.Skills.Vision.OcrSkill': 'OcrSkill'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - """ - super(SearchIndexerSkill, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - self.name = kwargs.get('name', None) - self.description = kwargs.get('description', None) - self.context = kwargs.get('context', None) - self.inputs = kwargs['inputs'] - self.outputs = kwargs['outputs'] - - -class AzureMachineLearningSkill(SearchIndexerSkill): - """The AML skill allows you to extend AI enrichment with a custom Azure Machine Learning (AML) model. Once an AML model is trained and deployed, an AML skill integrates it into AI enrichment. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar scoring_uri: (Required for no authentication or key authentication) The scoring URI of - the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. - :vartype scoring_uri: str - :ivar authentication_key: (Required for key authentication) The key for the AML service. - :vartype authentication_key: str - :ivar resource_id: (Required for token authentication). The Azure Resource Manager resource ID - of the AML service. It should be in the format - subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. - :vartype resource_id: str - :ivar timeout: (Optional) When specified, indicates the timeout for the http client making the - API call. - :vartype timeout: ~datetime.timedelta - :ivar region: (Optional for token authentication). The region the AML service is deployed in. - :vartype region: str - :ivar degree_of_parallelism: (Optional) When specified, indicates the number of calls the - indexer will make in parallel to the endpoint you have provided. You can decrease this value if - your endpoint is failing under too high of a request load, or raise it if your endpoint is able - to accept more requests and you would like an increase in the performance of the indexer. If - not set, a default value of 5 is used. The degreeOfParallelism can be set to a maximum of 10 - and a minimum of 1. - :vartype degree_of_parallelism: int - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - 'scoring_uri': {'key': 'uri', 'type': 'str'}, - 'authentication_key': {'key': 'key', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'timeout': {'key': 'timeout', 'type': 'duration'}, - 'region': {'key': 'region', 'type': 'str'}, - 'degree_of_parallelism': {'key': 'degreeOfParallelism', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword scoring_uri: (Required for no authentication or key authentication) The scoring URI of - the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. - :paramtype scoring_uri: str - :keyword authentication_key: (Required for key authentication) The key for the AML service. - :paramtype authentication_key: str - :keyword resource_id: (Required for token authentication). The Azure Resource Manager resource - ID of the AML service. It should be in the format - subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. - :paramtype resource_id: str - :keyword timeout: (Optional) When specified, indicates the timeout for the http client making - the API call. - :paramtype timeout: ~datetime.timedelta - :keyword region: (Optional for token authentication). The region the AML service is deployed - in. - :paramtype region: str - :keyword degree_of_parallelism: (Optional) When specified, indicates the number of calls the - indexer will make in parallel to the endpoint you have provided. You can decrease this value if - your endpoint is failing under too high of a request load, or raise it if your endpoint is able - to accept more requests and you would like an increase in the performance of the indexer. If - not set, a default value of 5 is used. The degreeOfParallelism can be set to a maximum of 10 - and a minimum of 1. - :paramtype degree_of_parallelism: int - """ - super(AzureMachineLearningSkill, self).__init__(**kwargs) - self.odata_type = '#Microsoft.Skills.Custom.AmlSkill' # type: str - self.scoring_uri = kwargs.get('scoring_uri', None) - self.authentication_key = kwargs.get('authentication_key', None) - self.resource_id = kwargs.get('resource_id', None) - self.timeout = kwargs.get('timeout', None) - self.region = kwargs.get('region', None) - self.degree_of_parallelism = kwargs.get('degree_of_parallelism', None) - - class Similarity(msrest.serialization.Model): """Base type for similarity algorithms. Similarity algorithms are used to calculate scores that tie queries to documents. The higher the score, the more relevant the document is to that specific query. Those scores are used to rank the search results. @@ -531,8 +261,8 @@ class Similarity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Constant filled by server. - :vartype odata_type: str + :param odata_type: Required. Constant filled by server. + :type odata_type: str """ _validation = { @@ -551,8 +281,6 @@ def __init__( self, **kwargs ): - """ - """ super(Similarity, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] @@ -562,16 +290,16 @@ class BM25Similarity(Similarity): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Constant filled by server. - :vartype odata_type: str - :ivar k1: This property controls the scaling function between the term frequency of each + :param odata_type: Required. Constant filled by server. + :type odata_type: str + :param k1: This property controls the scaling function between the term frequency of each matching terms and the final relevance score of a document-query pair. By default, a value of 1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency. - :vartype k1: float - :ivar b: This property controls how the length of a document affects the relevance score. By + :type k1: float + :param b: This property controls how the length of a document affects the relevance score. By default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied, while a value of 1.0 means the score is fully normalized by the length of the document. - :vartype b: float + :type b: float """ _validation = { @@ -588,16 +316,6 @@ def __init__( self, **kwargs ): - """ - :keyword k1: This property controls the scaling function between the term frequency of each - matching terms and the final relevance score of a document-query pair. By default, a value of - 1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency. - :paramtype k1: float - :keyword b: This property controls how the length of a document affects the relevance score. By - default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied, - while a value of 1.0 means the score is fully normalized by the length of the document. - :paramtype b: float - """ super(BM25Similarity, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.BM25Similarity' # type: str self.k1 = kwargs.get('k1', None) @@ -612,13 +330,13 @@ class CharFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the char filter.Constant filled by + :param odata_type: Required. Identifies the concrete type of the char filter.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the char filter. It must only contain letters, digits, + :type odata_type: str + :param name: Required. The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str + :type name: str """ _validation = { @@ -639,12 +357,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the char filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - """ super(CharFilter, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] self.name = kwargs['name'] @@ -655,19 +367,19 @@ class CjkBigramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar ignore_scripts: The scripts to ignore. - :vartype ignore_scripts: list[str or + :type name: str + :param ignore_scripts: The scripts to ignore. + :type ignore_scripts: list[str or ~azure.search.documents.indexes.models.CjkBigramTokenFilterScripts] - :ivar output_unigrams: A value indicating whether to output both unigrams and bigrams (if + :param output_unigrams: A value indicating whether to output both unigrams and bigrams (if true), or just bigrams (if false). Default is false. - :vartype output_unigrams: bool + :type output_unigrams: bool """ _validation = { @@ -686,18 +398,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword ignore_scripts: The scripts to ignore. - :paramtype ignore_scripts: list[str or - ~azure.search.documents.indexes.models.CjkBigramTokenFilterScripts] - :keyword output_unigrams: A value indicating whether to output both unigrams and bigrams (if - true), or just bigrams (if false). Default is false. - :paramtype output_unigrams: bool - """ super(CjkBigramTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.CjkBigramTokenFilter' # type: str self.ignore_scripts = kwargs.get('ignore_scripts', None) @@ -709,8 +409,8 @@ class ClassicSimilarity(Similarity): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Constant filled by server. - :vartype odata_type: str + :param odata_type: Required. Constant filled by server. + :type odata_type: str """ _validation = { @@ -725,8 +425,6 @@ def __init__( self, **kwargs ): - """ - """ super(ClassicSimilarity, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.ClassicSimilarity' # type: str @@ -739,13 +437,13 @@ class LexicalTokenizer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str + :type name: str """ _validation = { @@ -766,12 +464,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - """ super(LexicalTokenizer, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] self.name = kwargs['name'] @@ -782,16 +474,16 @@ class ClassicTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the + :type name: str + :param max_token_length: The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters. - :vartype max_token_length: int + :type max_token_length: int """ _validation = { @@ -810,15 +502,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the - maximum length are split. The maximum token length that can be used is 300 characters. - :paramtype max_token_length: int - """ super(ClassicTokenizer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.ClassicTokenizer' # type: str self.max_token_length = kwargs.get('max_token_length', 255) @@ -832,11 +515,11 @@ class CognitiveServicesAccount(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the cognitive service resource + :param odata_type: Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server. - :vartype odata_type: str - :ivar description: Description of the cognitive service resource attached to a skillset. - :vartype description: str + :type odata_type: str + :param description: Description of the cognitive service resource attached to a skillset. + :type description: str """ _validation = { @@ -856,10 +539,6 @@ def __init__( self, **kwargs ): - """ - :keyword description: Description of the cognitive service resource attached to a skillset. - :paramtype description: str - """ super(CognitiveServicesAccount, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] self.description = kwargs.get('description', None) @@ -870,14 +549,14 @@ class CognitiveServicesAccountKey(CognitiveServicesAccount): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the cognitive service resource + :param odata_type: Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server. - :vartype odata_type: str - :ivar description: Description of the cognitive service resource attached to a skillset. - :vartype description: str - :ivar key: Required. The key used to provision the cognitive service resource attached to a + :type odata_type: str + :param description: Description of the cognitive service resource attached to a skillset. + :type description: str + :param key: Required. The key used to provision the cognitive service resource attached to a skillset. - :vartype key: str + :type key: str """ _validation = { @@ -895,13 +574,6 @@ def __init__( self, **kwargs ): - """ - :keyword description: Description of the cognitive service resource attached to a skillset. - :paramtype description: str - :keyword key: Required. The key used to provision the cognitive service resource attached to a - skillset. - :paramtype key: str - """ super(CognitiveServicesAccountKey, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.CognitiveServicesByKey' # type: str self.key = kwargs['key'] @@ -912,22 +584,22 @@ class CommonGramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar common_words: Required. The set of common words. - :vartype common_words: list[str] - :ivar ignore_case: A value indicating whether common words matching will be case insensitive. + :type name: str + :param common_words: Required. The set of common words. + :type common_words: list[str] + :param ignore_case: A value indicating whether common words matching will be case insensitive. Default is false. - :vartype ignore_case: bool - :ivar use_query_mode: A value that indicates whether the token filter is in query mode. When in - query mode, the token filter generates bigrams and then removes common words and single terms - followed by a common word. Default is false. - :vartype use_query_mode: bool + :type ignore_case: bool + :param use_query_mode: A value that indicates whether the token filter is in query mode. When + in query mode, the token filter generates bigrams and then removes common words and single + terms followed by a common word. Default is false. + :type use_query_mode: bool """ _validation = { @@ -948,21 +620,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword common_words: Required. The set of common words. - :paramtype common_words: list[str] - :keyword ignore_case: A value indicating whether common words matching will be case - insensitive. Default is false. - :paramtype ignore_case: bool - :keyword use_query_mode: A value that indicates whether the token filter is in query mode. When - in query mode, the token filter generates bigrams and then removes common words and single - terms followed by a common word. Default is false. - :paramtype use_query_mode: bool - """ super(CommonGramTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.CommonGramTokenFilter' # type: str self.common_words = kwargs['common_words'] @@ -970,30 +627,91 @@ def __init__( self.use_query_mode = kwargs.get('use_query_mode', False) +class SearchIndexerSkill(msrest.serialization.Model): + """Base type for skills. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: WebApiSkill, CustomEntityLookupSkill, EntityRecognitionSkill, KeyPhraseExtractionSkill, LanguageDetectionSkill, MergeSkill, SentimentSkill, SplitSkill, TextTranslationSkill, ConditionalSkill, DocumentExtractionSkill, ShaperSkill, ImageAnalysisSkill, OcrSkill. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by + server. + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill + with no name defined will be given a default name of its 1-based index in the skills array, + prefixed with the character '#'. + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage + of the skill. + :type description: str + :param context: Represents the level at which operations take place, such as the document root + or document content (for example, /document or /document/content). The default is /document. + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the + output of an upstream skill. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value + that can be consumed as an input by another skill. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + """ + + _validation = { + 'odata_type': {'required': True}, + 'inputs': {'required': True}, + 'outputs': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'context': {'key': 'context', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, + 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, + } + + _subtype_map = { + 'odata_type': {'#Microsoft.Skills.Custom.WebApiSkill': 'WebApiSkill', '#Microsoft.Skills.Text.CustomEntityLookupSkill': 'CustomEntityLookupSkill', '#Microsoft.Skills.Text.EntityRecognitionSkill': 'EntityRecognitionSkill', '#Microsoft.Skills.Text.KeyPhraseExtractionSkill': 'KeyPhraseExtractionSkill', '#Microsoft.Skills.Text.LanguageDetectionSkill': 'LanguageDetectionSkill', '#Microsoft.Skills.Text.MergeSkill': 'MergeSkill', '#Microsoft.Skills.Text.SentimentSkill': 'SentimentSkill', '#Microsoft.Skills.Text.SplitSkill': 'SplitSkill', '#Microsoft.Skills.Text.TranslationSkill': 'TextTranslationSkill', '#Microsoft.Skills.Util.ConditionalSkill': 'ConditionalSkill', '#Microsoft.Skills.Util.DocumentExtractionSkill': 'DocumentExtractionSkill', '#Microsoft.Skills.Util.ShaperSkill': 'ShaperSkill', '#Microsoft.Skills.Vision.ImageAnalysisSkill': 'ImageAnalysisSkill', '#Microsoft.Skills.Vision.OcrSkill': 'OcrSkill'} + } + + def __init__( + self, + **kwargs + ): + super(SearchIndexerSkill, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.context = kwargs.get('context', None) + self.inputs = kwargs['inputs'] + self.outputs = kwargs['outputs'] + + class ConditionalSkill(SearchIndexerSkill): """A skill that enables scenarios that require a Boolean operation to determine the data to assign to an output. All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] """ _validation = { @@ -1015,25 +733,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - """ super(ConditionalSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Util.ConditionalSkill' # type: str @@ -1043,14 +742,14 @@ class CorsOptions(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar allowed_origins: Required. The list of origins from which JavaScript code will be granted - access to your index. Can contain a list of hosts of the form + :param allowed_origins: Required. The list of origins from which JavaScript code will be + granted access to your index. Can contain a list of hosts of the form {protocol}://{fully-qualified-domain-name}[:{port#}], or a single '*' to allow all origins (not recommended). - :vartype allowed_origins: list[str] - :ivar max_age_in_seconds: The duration for which browsers should cache CORS preflight + :type allowed_origins: list[str] + :param max_age_in_seconds: The duration for which browsers should cache CORS preflight responses. Defaults to 5 minutes. - :vartype max_age_in_seconds: long + :type max_age_in_seconds: long """ _validation = { @@ -1066,16 +765,6 @@ def __init__( self, **kwargs ): - """ - :keyword allowed_origins: Required. The list of origins from which JavaScript code will be - granted access to your index. Can contain a list of hosts of the form - {protocol}://{fully-qualified-domain-name}[:{port#}], or a single '*' to allow all origins (not - recommended). - :paramtype allowed_origins: list[str] - :keyword max_age_in_seconds: The duration for which browsers should cache CORS preflight - responses. Defaults to 5 minutes. - :paramtype max_age_in_seconds: long - """ super(CorsOptions, self).__init__(**kwargs) self.allowed_origins = kwargs['allowed_origins'] self.max_age_in_seconds = kwargs.get('max_age_in_seconds', None) @@ -1089,13 +778,13 @@ class LexicalAnalyzer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the analyzer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str + :type name: str """ _validation = { @@ -1116,12 +805,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the analyzer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - """ super(LexicalAnalyzer, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] self.name = kwargs['name'] @@ -1132,27 +815,27 @@ class CustomAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the analyzer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar tokenizer: Required. The name of the tokenizer to use to divide continuous text into a + :type name: str + :param tokenizer: Required. The name of the tokenizer to use to divide continuous text into a sequence of tokens, such as breaking a sentence into words. Possible values include: "classic", "edgeNGram", "keyword_v2", "letter", "lowercase", "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", "nGram", "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", "whitespace". - :vartype tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName - :ivar token_filters: A list of token filters used to filter out or modify the tokens generated + :type tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName + :param token_filters: A list of token filters used to filter out or modify the tokens generated by a tokenizer. For example, you can specify a lowercase filter that converts all characters to lowercase. The filters are run in the order in which they are listed. - :vartype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :ivar char_filters: A list of character filters used to prepare input text before it is + :type token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] + :param char_filters: A list of character filters used to prepare input text before it is processed by the tokenizer. For instance, they can replace certain characters or symbols. The filters are run in the order in which they are listed. - :vartype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] + :type char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] """ _validation = { @@ -1173,26 +856,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the analyzer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword tokenizer: Required. The name of the tokenizer to use to divide continuous text into a - sequence of tokens, such as breaking a sentence into words. Possible values include: "classic", - "edgeNGram", "keyword_v2", "letter", "lowercase", "microsoft_language_tokenizer", - "microsoft_language_stemming_tokenizer", "nGram", "path_hierarchy_v2", "pattern", - "standard_v2", "uax_url_email", "whitespace". - :paramtype tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName - :keyword token_filters: A list of token filters used to filter out or modify the tokens - generated by a tokenizer. For example, you can specify a lowercase filter that converts all - characters to lowercase. The filters are run in the order in which they are listed. - :paramtype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :keyword char_filters: A list of character filters used to prepare input text before it is - processed by the tokenizer. For instance, they can replace certain characters or symbols. The - filters are run in the order in which they are listed. - :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] - """ super(CustomAnalyzer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.CustomAnalyzer' # type: str self.tokenizer = kwargs['tokenizer'] @@ -1205,51 +868,51 @@ class CustomEntity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The top-level entity descriptor. Matches in the skill output will be + :param name: Required. The top-level entity descriptor. Matches in the skill output will be grouped by this name, and it should represent the "normalized" form of the text being found. - :vartype name: str - :ivar description: This field can be used as a passthrough for custom metadata about the + :type name: str + :param description: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. - :vartype description: str - :ivar type: This field can be used as a passthrough for custom metadata about the matched + :type description: str + :param type: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. - :vartype type: str - :ivar subtype: This field can be used as a passthrough for custom metadata about the matched + :type type: str + :param subtype: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. - :vartype subtype: str - :ivar id: This field can be used as a passthrough for custom metadata about the matched + :type subtype: str + :param id: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. - :vartype id: str - :ivar case_sensitive: Defaults to false. Boolean value denoting whether comparisons with the + :type id: str + :param case_sensitive: Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to character casing. Sample case insensitive matches of "Microsoft" could be: microsoft, microSoft, MICROSOFT. - :vartype case_sensitive: bool - :ivar accent_sensitive: Defaults to false. Boolean value denoting whether comparisons with the + :type case_sensitive: bool + :param accent_sensitive: Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to accent. - :vartype accent_sensitive: bool - :ivar fuzzy_edit_distance: Defaults to 0. Maximum value of 5. Denotes the acceptable number of + :type accent_sensitive: bool + :param fuzzy_edit_distance: Defaults to 0. Maximum value of 5. Denotes the acceptable number of divergent characters that would still constitute a match with the entity name. The smallest possible fuzziness for any given match is returned. For instance, if the edit distance is set to 3, "Windows10" would still match "Windows", "Windows10" and "Windows 7". When case sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but otherwise do. - :vartype fuzzy_edit_distance: int - :ivar default_case_sensitive: Changes the default case sensitivity value for this entity. It be - used to change the default value of all aliases caseSensitive values. - :vartype default_case_sensitive: bool - :ivar default_accent_sensitive: Changes the default accent sensitivity value for this entity. + :type fuzzy_edit_distance: int + :param default_case_sensitive: Changes the default case sensitivity value for this entity. It + be used to change the default value of all aliases caseSensitive values. + :type default_case_sensitive: bool + :param default_accent_sensitive: Changes the default accent sensitivity value for this entity. It be used to change the default value of all aliases accentSensitive values. - :vartype default_accent_sensitive: bool - :ivar default_fuzzy_edit_distance: Changes the default fuzzy edit distance value for this + :type default_accent_sensitive: bool + :param default_fuzzy_edit_distance: Changes the default fuzzy edit distance value for this entity. It can be used to change the default value of all aliases fuzzyEditDistance values. - :vartype default_fuzzy_edit_distance: int - :ivar aliases: An array of complex objects that can be used to specify alternative spellings or - synonyms to the root entity name. - :vartype aliases: list[~azure.search.documents.indexes.models.CustomEntityAlias] + :type default_fuzzy_edit_distance: int + :param aliases: An array of complex objects that can be used to specify alternative spellings + or synonyms to the root entity name. + :type aliases: list[~azure.search.documents.indexes.models.CustomEntityAlias] """ _validation = { @@ -1275,53 +938,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The top-level entity descriptor. Matches in the skill output will be - grouped by this name, and it should represent the "normalized" form of the text being found. - :paramtype name: str - :keyword description: This field can be used as a passthrough for custom metadata about the - matched text(s). The value of this field will appear with every match of its entity in the - skill output. - :paramtype description: str - :keyword type: This field can be used as a passthrough for custom metadata about the matched - text(s). The value of this field will appear with every match of its entity in the skill - output. - :paramtype type: str - :keyword subtype: This field can be used as a passthrough for custom metadata about the matched - text(s). The value of this field will appear with every match of its entity in the skill - output. - :paramtype subtype: str - :keyword id: This field can be used as a passthrough for custom metadata about the matched - text(s). The value of this field will appear with every match of its entity in the skill - output. - :paramtype id: str - :keyword case_sensitive: Defaults to false. Boolean value denoting whether comparisons with the - entity name should be sensitive to character casing. Sample case insensitive matches of - "Microsoft" could be: microsoft, microSoft, MICROSOFT. - :paramtype case_sensitive: bool - :keyword accent_sensitive: Defaults to false. Boolean value denoting whether comparisons with - the entity name should be sensitive to accent. - :paramtype accent_sensitive: bool - :keyword fuzzy_edit_distance: Defaults to 0. Maximum value of 5. Denotes the acceptable number - of divergent characters that would still constitute a match with the entity name. The smallest - possible fuzziness for any given match is returned. For instance, if the edit distance is set - to 3, "Windows10" would still match "Windows", "Windows10" and "Windows 7". When case - sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but - otherwise do. - :paramtype fuzzy_edit_distance: int - :keyword default_case_sensitive: Changes the default case sensitivity value for this entity. It - be used to change the default value of all aliases caseSensitive values. - :paramtype default_case_sensitive: bool - :keyword default_accent_sensitive: Changes the default accent sensitivity value for this - entity. It be used to change the default value of all aliases accentSensitive values. - :paramtype default_accent_sensitive: bool - :keyword default_fuzzy_edit_distance: Changes the default fuzzy edit distance value for this - entity. It can be used to change the default value of all aliases fuzzyEditDistance values. - :paramtype default_fuzzy_edit_distance: int - :keyword aliases: An array of complex objects that can be used to specify alternative spellings - or synonyms to the root entity name. - :paramtype aliases: list[~azure.search.documents.indexes.models.CustomEntityAlias] - """ super(CustomEntity, self).__init__(**kwargs) self.name = kwargs['name'] self.description = kwargs.get('description', None) @@ -1342,14 +958,14 @@ class CustomEntityAlias(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar text: Required. The text of the alias. - :vartype text: str - :ivar case_sensitive: Determine if the alias is case sensitive. - :vartype case_sensitive: bool - :ivar accent_sensitive: Determine if the alias is accent sensitive. - :vartype accent_sensitive: bool - :ivar fuzzy_edit_distance: Determine the fuzzy edit distance of the alias. - :vartype fuzzy_edit_distance: int + :param text: Required. The text of the alias. + :type text: str + :param case_sensitive: Determine if the alias is case sensitive. + :type case_sensitive: bool + :param accent_sensitive: Determine if the alias is accent sensitive. + :type accent_sensitive: bool + :param fuzzy_edit_distance: Determine the fuzzy edit distance of the alias. + :type fuzzy_edit_distance: int """ _validation = { @@ -1367,16 +983,6 @@ def __init__( self, **kwargs ): - """ - :keyword text: Required. The text of the alias. - :paramtype text: str - :keyword case_sensitive: Determine if the alias is case sensitive. - :paramtype case_sensitive: bool - :keyword accent_sensitive: Determine if the alias is accent sensitive. - :paramtype accent_sensitive: bool - :keyword fuzzy_edit_distance: Determine the fuzzy edit distance of the alias. - :paramtype fuzzy_edit_distance: int - """ super(CustomEntityAlias, self).__init__(**kwargs) self.text = kwargs['text'] self.case_sensitive = kwargs.get('case_sensitive', None) @@ -1389,45 +995,45 @@ class CustomEntityLookupSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "de", "en", "es", "fi", "fr", "it", "ko", "pt". - :vartype default_language_code: str or + :type default_language_code: str or ~azure.search.documents.indexes.models.CustomEntityLookupSkillLanguage - :ivar entities_definition_uri: Path to a JSON or CSV file containing all the target text to + :param entities_definition_uri: Path to a JSON or CSV file containing all the target text to match against. This entity definition is read at the beginning of an indexer run. Any updates to this file during an indexer run will not take effect until subsequent runs. This config must be accessible over HTTPS. - :vartype entities_definition_uri: str - :ivar inline_entities_definition: The inline CustomEntity definition. - :vartype inline_entities_definition: list[~azure.search.documents.indexes.models.CustomEntity] - :ivar global_default_case_sensitive: A global flag for CaseSensitive. If CaseSensitive is not + :type entities_definition_uri: str + :param inline_entities_definition: The inline CustomEntity definition. + :type inline_entities_definition: list[~azure.search.documents.indexes.models.CustomEntity] + :param global_default_case_sensitive: A global flag for CaseSensitive. If CaseSensitive is not set in CustomEntity, this value will be the default value. - :vartype global_default_case_sensitive: bool - :ivar global_default_accent_sensitive: A global flag for AccentSensitive. If AccentSensitive is - not set in CustomEntity, this value will be the default value. - :vartype global_default_accent_sensitive: bool - :ivar global_default_fuzzy_edit_distance: A global flag for FuzzyEditDistance. If + :type global_default_case_sensitive: bool + :param global_default_accent_sensitive: A global flag for AccentSensitive. If AccentSensitive + is not set in CustomEntity, this value will be the default value. + :type global_default_accent_sensitive: bool + :param global_default_fuzzy_edit_distance: A global flag for FuzzyEditDistance. If FuzzyEditDistance is not set in CustomEntity, this value will be the default value. - :vartype global_default_fuzzy_edit_distance: int + :type global_default_fuzzy_edit_distance: int """ _validation = { @@ -1455,46 +1061,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "da", "de", "en", "es", "fi", "fr", "it", "ko", "pt". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.CustomEntityLookupSkillLanguage - :keyword entities_definition_uri: Path to a JSON or CSV file containing all the target text to - match against. This entity definition is read at the beginning of an indexer run. Any updates - to this file during an indexer run will not take effect until subsequent runs. This config must - be accessible over HTTPS. - :paramtype entities_definition_uri: str - :keyword inline_entities_definition: The inline CustomEntity definition. - :paramtype inline_entities_definition: - list[~azure.search.documents.indexes.models.CustomEntity] - :keyword global_default_case_sensitive: A global flag for CaseSensitive. If CaseSensitive is - not set in CustomEntity, this value will be the default value. - :paramtype global_default_case_sensitive: bool - :keyword global_default_accent_sensitive: A global flag for AccentSensitive. If AccentSensitive - is not set in CustomEntity, this value will be the default value. - :paramtype global_default_accent_sensitive: bool - :keyword global_default_fuzzy_edit_distance: A global flag for FuzzyEditDistance. If - FuzzyEditDistance is not set in CustomEntity, this value will be the default value. - :paramtype global_default_fuzzy_edit_distance: int - """ super(CustomEntityLookupSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Text.CustomEntityLookupSkill' # type: str self.default_language_code = kwargs.get('default_language_code', None) @@ -1505,114 +1071,6 @@ def __init__( self.global_default_fuzzy_edit_distance = kwargs.get('global_default_fuzzy_edit_distance', None) -class LexicalNormalizer(msrest.serialization.Model): - """Base type for normalizers. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CustomNormalizer. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the normalizer.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the normalizer. It must only contain letters, digits, spaces, - dashes or underscores, can only start and end with alphanumeric characters, and is limited to - 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', - 'standard', 'lowercase', 'uppercase', or 'elision'. - :vartype name: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - _subtype_map = { - 'odata_type': {'#Microsoft.Azure.Search.CustomNormalizer': 'CustomNormalizer'} - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the normalizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named - 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - :paramtype name: str - """ - super(LexicalNormalizer, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - self.name = kwargs['name'] - - -class CustomNormalizer(LexicalNormalizer): - """Allows you to configure normalization for filterable, sortable, and facetable fields, which by default operate with strict matching. This is a user-defined configuration consisting of at least one or more filters, which modify the token that is stored. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the normalizer.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the normalizer. It must only contain letters, digits, spaces, - dashes or underscores, can only start and end with alphanumeric characters, and is limited to - 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', - 'standard', 'lowercase', 'uppercase', or 'elision'. - :vartype name: str - :ivar token_filters: A list of token filters used to filter out or modify the input token. For - example, you can specify a lowercase filter that converts all characters to lowercase. The - filters are run in the order in which they are listed. - :vartype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :ivar char_filters: A list of character filters used to prepare input text before it is - processed. For instance, they can replace certain characters or symbols. The filters are run in - the order in which they are listed. - :vartype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] - """ - - _validation = { - 'odata_type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'token_filters': {'key': 'tokenFilters', 'type': '[str]'}, - 'char_filters': {'key': 'charFilters', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the normalizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named - 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - :paramtype name: str - :keyword token_filters: A list of token filters used to filter out or modify the input token. - For example, you can specify a lowercase filter that converts all characters to lowercase. The - filters are run in the order in which they are listed. - :paramtype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :keyword char_filters: A list of character filters used to prepare input text before it is - processed. For instance, they can replace certain characters or symbols. The filters are run in - the order in which they are listed. - :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] - """ - super(CustomNormalizer, self).__init__(**kwargs) - self.odata_type = '#Microsoft.Azure.Search.CustomNormalizer' # type: str - self.token_filters = kwargs.get('token_filters', None) - self.char_filters = kwargs.get('char_filters', None) - - class DataChangeDetectionPolicy(msrest.serialization.Model): """Base type for data change detection policies. @@ -1621,9 +1079,9 @@ class DataChangeDetectionPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the data change detection + :param odata_type: Required. Identifies the concrete type of the data change detection policy.Constant filled by server. - :vartype odata_type: str + :type odata_type: str """ _validation = { @@ -1642,8 +1100,6 @@ def __init__( self, **kwargs ): - """ - """ super(DataChangeDetectionPolicy, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] @@ -1656,9 +1112,9 @@ class DataDeletionDetectionPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the data deletion detection + :param odata_type: Required. Identifies the concrete type of the data deletion detection policy.Constant filled by server. - :vartype odata_type: str + :type odata_type: str """ _validation = { @@ -1677,8 +1133,6 @@ def __init__( self, **kwargs ): - """ - """ super(DataDeletionDetectionPolicy, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] @@ -1686,9 +1140,9 @@ def __init__( class DataSourceCredentials(msrest.serialization.Model): """Represents credentials that can be used to connect to a datasource. - :ivar connection_string: The connection string for the datasource. Set to ':code:``' - if you do not want the connection string updated. - :vartype connection_string: str + :param connection_string: The connection string for the datasource. Set to + ':code:``' if you do not want the connection string updated. + :type connection_string: str """ _attribute_map = { @@ -1699,11 +1153,6 @@ def __init__( self, **kwargs ): - """ - :keyword connection_string: The connection string for the datasource. Set to - ':code:``' if you do not want the connection string updated. - :paramtype connection_string: str - """ super(DataSourceCredentials, self).__init__(**kwargs) self.connection_string = kwargs.get('connection_string', None) @@ -1713,11 +1162,11 @@ class DefaultCognitiveServicesAccount(CognitiveServicesAccount): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the cognitive service resource + :param odata_type: Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server. - :vartype odata_type: str - :ivar description: Description of the cognitive service resource attached to a skillset. - :vartype description: str + :type odata_type: str + :param description: Description of the cognitive service resource attached to a skillset. + :type description: str """ _validation = { @@ -1733,10 +1182,6 @@ def __init__( self, **kwargs ): - """ - :keyword description: Description of the cognitive service resource attached to a skillset. - :paramtype description: str - """ super(DefaultCognitiveServicesAccount, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.DefaultCognitiveServices' # type: str @@ -1746,27 +1191,27 @@ class DictionaryDecompounderTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar word_list: Required. The list of words to match against. - :vartype word_list: list[str] - :ivar min_word_size: The minimum word size. Only words longer than this get processed. Default + :type name: str + :param word_list: Required. The list of words to match against. + :type word_list: list[str] + :param min_word_size: The minimum word size. Only words longer than this get processed. Default is 5. Maximum is 300. - :vartype min_word_size: int - :ivar min_subword_size: The minimum subword size. Only subwords longer than this are outputted. - Default is 2. Maximum is 300. - :vartype min_subword_size: int - :ivar max_subword_size: The maximum subword size. Only subwords shorter than this are + :type min_word_size: int + :param min_subword_size: The minimum subword size. Only subwords longer than this are + outputted. Default is 2. Maximum is 300. + :type min_subword_size: int + :param max_subword_size: The maximum subword size. Only subwords shorter than this are outputted. Default is 15. Maximum is 300. - :vartype max_subword_size: int - :ivar only_longest_match: A value indicating whether to add only the longest matching subword + :type max_subword_size: int + :param only_longest_match: A value indicating whether to add only the longest matching subword to the output. Default is false. - :vartype only_longest_match: bool + :type only_longest_match: bool """ _validation = { @@ -1792,26 +1237,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword word_list: Required. The list of words to match against. - :paramtype word_list: list[str] - :keyword min_word_size: The minimum word size. Only words longer than this get processed. - Default is 5. Maximum is 300. - :paramtype min_word_size: int - :keyword min_subword_size: The minimum subword size. Only subwords longer than this are - outputted. Default is 2. Maximum is 300. - :paramtype min_subword_size: int - :keyword max_subword_size: The maximum subword size. Only subwords shorter than this are - outputted. Default is 15. Maximum is 300. - :paramtype max_subword_size: int - :keyword only_longest_match: A value indicating whether to add only the longest matching - subword to the output. Default is false. - :paramtype only_longest_match: bool - """ super(DictionaryDecompounderTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter' # type: str self.word_list = kwargs['word_list'] @@ -1829,19 +1254,18 @@ class ScoringFunction(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Indicates the type of function to use. Valid values include magnitude, + :param type: Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server. - :vartype type: str - :ivar field_name: Required. The name of the field used as input to the scoring function. - :vartype field_name: str - :ivar boost: Required. A multiplier for the raw score. Must be a positive number not equal to + :type type: str + :param field_name: Required. The name of the field used as input to the scoring function. + :type field_name: str + :param boost: Required. A multiplier for the raw score. Must be a positive number not equal to 1.0. - :vartype boost: float - :ivar interpolation: A value indicating how boosting will be interpolated across document + :type boost: float + :param interpolation: A value indicating how boosting will be interpolated across document scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", "logarithmic". - :vartype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation + :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation """ _validation = { @@ -1865,18 +1289,6 @@ def __init__( self, **kwargs ): - """ - :keyword field_name: Required. The name of the field used as input to the scoring function. - :paramtype field_name: str - :keyword boost: Required. A multiplier for the raw score. Must be a positive number not equal - to 1.0. - :paramtype boost: float - :keyword interpolation: A value indicating how boosting will be interpolated across document - scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", - "logarithmic". - :paramtype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - """ super(ScoringFunction, self).__init__(**kwargs) self.type = None # type: Optional[str] self.field_name = kwargs['field_name'] @@ -1889,21 +1301,20 @@ class DistanceScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Indicates the type of function to use. Valid values include magnitude, + :param type: Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server. - :vartype type: str - :ivar field_name: Required. The name of the field used as input to the scoring function. - :vartype field_name: str - :ivar boost: Required. A multiplier for the raw score. Must be a positive number not equal to + :type type: str + :param field_name: Required. The name of the field used as input to the scoring function. + :type field_name: str + :param boost: Required. A multiplier for the raw score. Must be a positive number not equal to 1.0. - :vartype boost: float - :ivar interpolation: A value indicating how boosting will be interpolated across document + :type boost: float + :param interpolation: A value indicating how boosting will be interpolated across document scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", "logarithmic". - :vartype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :ivar parameters: Required. Parameter values for the distance scoring function. - :vartype parameters: ~azure.search.documents.indexes.models.DistanceScoringParameters + :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation + :param parameters: Required. Parameter values for the distance scoring function. + :type parameters: ~azure.search.documents.indexes.models.DistanceScoringParameters """ _validation = { @@ -1925,20 +1336,6 @@ def __init__( self, **kwargs ): - """ - :keyword field_name: Required. The name of the field used as input to the scoring function. - :paramtype field_name: str - :keyword boost: Required. A multiplier for the raw score. Must be a positive number not equal - to 1.0. - :paramtype boost: float - :keyword interpolation: A value indicating how boosting will be interpolated across document - scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", - "logarithmic". - :paramtype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :keyword parameters: Required. Parameter values for the distance scoring function. - :paramtype parameters: ~azure.search.documents.indexes.models.DistanceScoringParameters - """ super(DistanceScoringFunction, self).__init__(**kwargs) self.type = 'distance' # type: str self.parameters = kwargs['parameters'] @@ -1949,12 +1346,12 @@ class DistanceScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar reference_point_parameter: Required. The name of the parameter passed in search queries + :param reference_point_parameter: Required. The name of the parameter passed in search queries to specify the reference location. - :vartype reference_point_parameter: str - :ivar boosting_distance: Required. The distance in kilometers from the reference location where - the boosting range ends. - :vartype boosting_distance: float + :type reference_point_parameter: str + :param boosting_distance: Required. The distance in kilometers from the reference location + where the boosting range ends. + :type boosting_distance: float """ _validation = { @@ -1971,14 +1368,6 @@ def __init__( self, **kwargs ): - """ - :keyword reference_point_parameter: Required. The name of the parameter passed in search - queries to specify the reference location. - :paramtype reference_point_parameter: str - :keyword boosting_distance: Required. The distance in kilometers from the reference location - where the boosting range ends. - :paramtype boosting_distance: float - """ super(DistanceScoringParameters, self).__init__(**kwargs) self.reference_point_parameter = kwargs['reference_point_parameter'] self.boosting_distance = kwargs['boosting_distance'] @@ -1989,32 +1378,32 @@ class DocumentExtractionSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar parsing_mode: The parsingMode for the skill. Will be set to 'default' if not defined. - :vartype parsing_mode: str - :ivar data_to_extract: The type of data to be extracted for the skill. Will be set to + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param parsing_mode: The parsingMode for the skill. Will be set to 'default' if not defined. + :type parsing_mode: str + :param data_to_extract: The type of data to be extracted for the skill. Will be set to 'contentAndMetadata' if not defined. - :vartype data_to_extract: str - :ivar configuration: A dictionary of configurations for the skill. - :vartype configuration: dict[str, any] + :type data_to_extract: str + :param configuration: A dictionary of configurations for the skill. + :type configuration: dict[str, any] """ _validation = { @@ -2039,32 +1428,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword parsing_mode: The parsingMode for the skill. Will be set to 'default' if not defined. - :paramtype parsing_mode: str - :keyword data_to_extract: The type of data to be extracted for the skill. Will be set to - 'contentAndMetadata' if not defined. - :paramtype data_to_extract: str - :keyword configuration: A dictionary of configurations for the skill. - :paramtype configuration: dict[str, any] - """ super(DocumentExtractionSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Util.DocumentExtractionSkill' # type: str self.parsing_mode = kwargs.get('parsing_mode', None) @@ -2072,55 +1435,26 @@ def __init__( self.configuration = kwargs.get('configuration', None) -class DocumentKeysOrIds(msrest.serialization.Model): - """DocumentKeysOrIds. - - :ivar document_keys: document keys to be reset. - :vartype document_keys: list[str] - :ivar datasource_document_ids: datasource document identifiers to be reset. - :vartype datasource_document_ids: list[str] - """ - - _attribute_map = { - 'document_keys': {'key': 'documentKeys', 'type': '[str]'}, - 'datasource_document_ids': {'key': 'datasourceDocumentIds', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword document_keys: document keys to be reset. - :paramtype document_keys: list[str] - :keyword datasource_document_ids: datasource document identifiers to be reset. - :paramtype datasource_document_ids: list[str] - """ - super(DocumentKeysOrIds, self).__init__(**kwargs) - self.document_keys = kwargs.get('document_keys', None) - self.datasource_document_ids = kwargs.get('datasource_document_ids', None) - - class EdgeNGramTokenFilter(TokenFilter): """Generates n-grams of the given size(s) starting from the front or the back of an input token. This token filter is implemented using Apache Lucene. All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_gram: The minimum n-gram length. Default is 1. Must be less than the value of + :type name: str + :param min_gram: The minimum n-gram length. Default is 1. Must be less than the value of maxGram. - :vartype min_gram: int - :ivar max_gram: The maximum n-gram length. Default is 2. - :vartype max_gram: int - :ivar side: Specifies which side of the input the n-gram should be generated from. Default is + :type min_gram: int + :param max_gram: The maximum n-gram length. Default is 2. + :type max_gram: int + :param side: Specifies which side of the input the n-gram should be generated from. Default is "front". Possible values include: "front", "back". - :vartype side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide + :type side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide """ _validation = { @@ -2140,20 +1474,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_gram: The minimum n-gram length. Default is 1. Must be less than the value of - maxGram. - :paramtype min_gram: int - :keyword max_gram: The maximum n-gram length. Default is 2. - :paramtype max_gram: int - :keyword side: Specifies which side of the input the n-gram should be generated from. Default - is "front". Possible values include: "front", "back". - :paramtype side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide - """ super(EdgeNGramTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.EdgeNGramTokenFilter' # type: str self.min_gram = kwargs.get('min_gram', 1) @@ -2166,21 +1486,21 @@ class EdgeNGramTokenFilterV2(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the + :type name: str + :param min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram. - :vartype min_gram: int - :ivar max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :vartype max_gram: int - :ivar side: Specifies which side of the input the n-gram should be generated from. Default is + :type min_gram: int + :param max_gram: The maximum n-gram length. Default is 2. Maximum is 300. + :type max_gram: int + :param side: Specifies which side of the input the n-gram should be generated from. Default is "front". Possible values include: "front", "back". - :vartype side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide + :type side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide """ _validation = { @@ -2202,20 +1522,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than - the value of maxGram. - :paramtype min_gram: int - :keyword max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :paramtype max_gram: int - :keyword side: Specifies which side of the input the n-gram should be generated from. Default - is "front". Possible values include: "front", "back". - :paramtype side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide - """ super(EdgeNGramTokenFilterV2, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.EdgeNGramTokenFilterV2' # type: str self.min_gram = kwargs.get('min_gram', 1) @@ -2228,20 +1534,20 @@ class EdgeNGramTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the + :type name: str + :param min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram. - :vartype min_gram: int - :ivar max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :vartype max_gram: int - :ivar token_chars: Character classes to keep in the tokens. - :vartype token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] + :type min_gram: int + :param max_gram: The maximum n-gram length. Default is 2. Maximum is 300. + :type max_gram: int + :param token_chars: Character classes to keep in the tokens. + :type token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] """ _validation = { @@ -2263,19 +1569,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than - the value of maxGram. - :paramtype min_gram: int - :keyword max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :paramtype max_gram: int - :keyword token_chars: Character classes to keep in the tokens. - :paramtype token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] - """ super(EdgeNGramTokenizer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.EdgeNGramTokenizer' # type: str self.min_gram = kwargs.get('min_gram', 1) @@ -2288,15 +1581,15 @@ class ElisionTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar articles: The set of articles to remove. - :vartype articles: list[str] + :type name: str + :param articles: The set of articles to remove. + :type articles: list[str] """ _validation = { @@ -2314,154 +1607,51 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword articles: The set of articles to remove. - :paramtype articles: list[str] - """ super(ElisionTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.ElisionTokenFilter' # type: str self.articles = kwargs.get('articles', None) -class EntityLinkingSkill(SearchIndexerSkill): - """Using the Text Analytics API, extracts linked entities from text. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. - :vartype default_language_code: str - :ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :vartype minimum_precision: float - :ivar model_version: The version of the model to use when calling the Text Analytics service. - It will default to the latest available when not specified. We recommend you do not specify - this value unless absolutely necessary. - :vartype model_version: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - 'minimum_precision': {'maximum': 1, 'minimum': 0}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - 'default_language_code': {'key': 'defaultLanguageCode', 'type': 'str'}, - 'minimum_precision': {'key': 'minimumPrecision', 'type': 'float'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - :paramtype default_language_code: str - :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :paramtype minimum_precision: float - :keyword model_version: The version of the model to use when calling the Text Analytics - service. It will default to the latest available when not specified. We recommend you do not - specify this value unless absolutely necessary. - :paramtype model_version: str - """ - super(EntityLinkingSkill, self).__init__(**kwargs) - self.odata_type = '#Microsoft.Skills.Text.V3.EntityLinkingSkill' # type: str - self.default_language_code = kwargs.get('default_language_code', None) - self.minimum_precision = kwargs.get('minimum_precision', None) - self.model_version = kwargs.get('model_version', None) - - class EntityRecognitionSkill(SearchIndexerSkill): """Text analytics entity recognition. All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar categories: A list of entity categories that should be extracted. - :vartype categories: list[str or ~azure.search.documents.indexes.models.EntityCategory] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param categories: A list of entity categories that should be extracted. + :type categories: list[str or ~azure.search.documents.indexes.models.EntityCategory] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "ar", "cs", "zh-Hans", "zh-Hant", "da", "nl", "en", "fi", "fr", "de", "el", "hu", "it", "ja", "ko", "no", "pl", "pt-PT", "pt-BR", "ru", "es", "sv", "tr". - :vartype default_language_code: str or + :type default_language_code: str or ~azure.search.documents.indexes.models.EntityRecognitionSkillLanguage - :ivar include_typeless_entities: Determines whether or not to include entities which are well + :param include_typeless_entities: Determines whether or not to include entities which are well known but don't conform to a pre-defined type. If this configuration is not set (default), set to null or set to false, entities which don't conform to one of the pre-defined types will not be surfaced. - :vartype include_typeless_entities: bool - :ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose + :type include_typeless_entities: bool + :param minimum_precision: A value between 0 and 1 that be used to only include entities whose confidence score is greater than the value specified. If not set (default), or if explicitly set to null, all entities will be included. - :vartype minimum_precision: float + :type minimum_precision: float """ _validation = { @@ -2487,41 +1677,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword categories: A list of entity categories that should be extracted. - :paramtype categories: list[str or ~azure.search.documents.indexes.models.EntityCategory] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "ar", "cs", "zh-Hans", "zh-Hant", "da", "nl", "en", "fi", "fr", "de", - "el", "hu", "it", "ja", "ko", "no", "pl", "pt-PT", "pt-BR", "ru", "es", "sv", "tr". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.EntityRecognitionSkillLanguage - :keyword include_typeless_entities: Determines whether or not to include entities which are - well known but don't conform to a pre-defined type. If this configuration is not set (default), - set to null or set to false, entities which don't conform to one of the pre-defined types will - not be surfaced. - :paramtype include_typeless_entities: bool - :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :paramtype minimum_precision: float - """ super(EntityRecognitionSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Text.EntityRecognitionSkill' # type: str self.categories = kwargs.get('categories', None) @@ -2530,119 +1685,18 @@ def __init__( self.minimum_precision = kwargs.get('minimum_precision', None) -class EntityRecognitionSkillV3(SearchIndexerSkill): - """Using the Text Analytics API, extracts entities of different types from text. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar categories: A list of entity categories that should be extracted. - :vartype categories: list[str] - :ivar default_language_code: A value indicating which language code to use. Default is en. - :vartype default_language_code: str - :ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :vartype minimum_precision: float - :ivar model_version: The version of the model to use when calling the Text Analytics service. - It will default to the latest available when not specified. We recommend you do not specify - this value unless absolutely necessary. - :vartype model_version: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - 'minimum_precision': {'maximum': 1, 'minimum': 0}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - 'categories': {'key': 'categories', 'type': '[str]'}, - 'default_language_code': {'key': 'defaultLanguageCode', 'type': 'str'}, - 'minimum_precision': {'key': 'minimumPrecision', 'type': 'float'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword categories: A list of entity categories that should be extracted. - :paramtype categories: list[str] - :keyword default_language_code: A value indicating which language code to use. Default is en. - :paramtype default_language_code: str - :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :paramtype minimum_precision: float - :keyword model_version: The version of the model to use when calling the Text Analytics - service. It will default to the latest available when not specified. We recommend you do not - specify this value unless absolutely necessary. - :paramtype model_version: str - """ - super(EntityRecognitionSkillV3, self).__init__(**kwargs) - self.odata_type = '#Microsoft.Skills.Text.V3.EntityRecognitionSkill' # type: str - self.categories = kwargs.get('categories', None) - self.default_language_code = kwargs.get('default_language_code', None) - self.minimum_precision = kwargs.get('minimum_precision', None) - self.model_version = kwargs.get('model_version', None) - - class FieldMapping(msrest.serialization.Model): """Defines a mapping between a field in a data source and a target field in an index. All required parameters must be populated in order to send to Azure. - :ivar source_field_name: Required. The name of the field in the data source. - :vartype source_field_name: str - :ivar target_field_name: The name of the target field in the index. Same as the source field + :param source_field_name: Required. The name of the field in the data source. + :type source_field_name: str + :param target_field_name: The name of the target field in the index. Same as the source field name by default. - :vartype target_field_name: str - :ivar mapping_function: A function to apply to each source field value before indexing. - :vartype mapping_function: ~azure.search.documents.indexes.models.FieldMappingFunction + :type target_field_name: str + :param mapping_function: A function to apply to each source field value before indexing. + :type mapping_function: ~azure.search.documents.indexes.models.FieldMappingFunction """ _validation = { @@ -2659,15 +1713,6 @@ def __init__( self, **kwargs ): - """ - :keyword source_field_name: Required. The name of the field in the data source. - :paramtype source_field_name: str - :keyword target_field_name: The name of the target field in the index. Same as the source field - name by default. - :paramtype target_field_name: str - :keyword mapping_function: A function to apply to each source field value before indexing. - :paramtype mapping_function: ~azure.search.documents.indexes.models.FieldMappingFunction - """ super(FieldMapping, self).__init__(**kwargs) self.source_field_name = kwargs['source_field_name'] self.target_field_name = kwargs.get('target_field_name', None) @@ -2679,11 +1724,11 @@ class FieldMappingFunction(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the field mapping function. - :vartype name: str - :ivar parameters: A dictionary of parameter name/value pairs to pass to the function. Each + :param name: Required. The name of the field mapping function. + :type name: str + :param parameters: A dictionary of parameter name/value pairs to pass to the function. Each value must be of a primitive type. - :vartype parameters: dict[str, any] + :type parameters: dict[str, any] """ _validation = { @@ -2699,13 +1744,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the field mapping function. - :paramtype name: str - :keyword parameters: A dictionary of parameter name/value pairs to pass to the function. Each - value must be of a primitive type. - :paramtype parameters: dict[str, any] - """ super(FieldMappingFunction, self).__init__(**kwargs) self.name = kwargs['name'] self.parameters = kwargs.get('parameters', None) @@ -2716,21 +1754,20 @@ class FreshnessScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Indicates the type of function to use. Valid values include magnitude, + :param type: Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server. - :vartype type: str - :ivar field_name: Required. The name of the field used as input to the scoring function. - :vartype field_name: str - :ivar boost: Required. A multiplier for the raw score. Must be a positive number not equal to + :type type: str + :param field_name: Required. The name of the field used as input to the scoring function. + :type field_name: str + :param boost: Required. A multiplier for the raw score. Must be a positive number not equal to 1.0. - :vartype boost: float - :ivar interpolation: A value indicating how boosting will be interpolated across document + :type boost: float + :param interpolation: A value indicating how boosting will be interpolated across document scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", "logarithmic". - :vartype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :ivar parameters: Required. Parameter values for the freshness scoring function. - :vartype parameters: ~azure.search.documents.indexes.models.FreshnessScoringParameters + :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation + :param parameters: Required. Parameter values for the freshness scoring function. + :type parameters: ~azure.search.documents.indexes.models.FreshnessScoringParameters """ _validation = { @@ -2752,20 +1789,6 @@ def __init__( self, **kwargs ): - """ - :keyword field_name: Required. The name of the field used as input to the scoring function. - :paramtype field_name: str - :keyword boost: Required. A multiplier for the raw score. Must be a positive number not equal - to 1.0. - :paramtype boost: float - :keyword interpolation: A value indicating how boosting will be interpolated across document - scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", - "logarithmic". - :paramtype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :keyword parameters: Required. Parameter values for the freshness scoring function. - :paramtype parameters: ~azure.search.documents.indexes.models.FreshnessScoringParameters - """ super(FreshnessScoringFunction, self).__init__(**kwargs) self.type = 'freshness' # type: str self.parameters = kwargs['parameters'] @@ -2776,9 +1799,9 @@ class FreshnessScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar boosting_duration: Required. The expiration period after which boosting will stop for a + :param boosting_duration: Required. The expiration period after which boosting will stop for a particular document. - :vartype boosting_duration: ~datetime.timedelta + :type boosting_duration: ~datetime.timedelta """ _validation = { @@ -2793,11 +1816,6 @@ def __init__( self, **kwargs ): - """ - :keyword boosting_duration: Required. The expiration period after which boosting will stop for - a particular document. - :paramtype boosting_duration: ~datetime.timedelta - """ super(FreshnessScoringParameters, self).__init__(**kwargs) self.boosting_duration = kwargs['boosting_duration'] @@ -2829,8 +1847,6 @@ def __init__( self, **kwargs ): - """ - """ super(GetIndexStatisticsResult, self).__init__(**kwargs) self.document_count = None self.storage_size = None @@ -2841,11 +1857,11 @@ class HighWaterMarkChangeDetectionPolicy(DataChangeDetectionPolicy): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the data change detection + :param odata_type: Required. Identifies the concrete type of the data change detection policy.Constant filled by server. - :vartype odata_type: str - :ivar high_water_mark_column_name: Required. The name of the high water mark column. - :vartype high_water_mark_column_name: str + :type odata_type: str + :param high_water_mark_column_name: Required. The name of the high water mark column. + :type high_water_mark_column_name: str """ _validation = { @@ -2862,10 +1878,6 @@ def __init__( self, **kwargs ): - """ - :keyword high_water_mark_column_name: Required. The name of the high water mark column. - :paramtype high_water_mark_column_name: str - """ super(HighWaterMarkChangeDetectionPolicy, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy' # type: str self.high_water_mark_column_name = kwargs['high_water_mark_column_name'] @@ -2876,33 +1888,33 @@ class ImageAnalysisSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "en", "es", "ja", "pt", "zh". - :vartype default_language_code: str or + :type default_language_code: str or ~azure.search.documents.indexes.models.ImageAnalysisSkillLanguage - :ivar visual_features: A list of visual features. - :vartype visual_features: list[str or ~azure.search.documents.indexes.models.VisualFeature] - :ivar details: A string indicating which domain-specific details to return. - :vartype details: list[str or ~azure.search.documents.indexes.models.ImageDetail] + :param visual_features: A list of visual features. + :type visual_features: list[str or ~azure.search.documents.indexes.models.VisualFeature] + :param details: A string indicating which domain-specific details to return. + :type details: list[str or ~azure.search.documents.indexes.models.ImageDetail] """ _validation = { @@ -2927,33 +1939,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "en", "es", "ja", "pt", "zh". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.ImageAnalysisSkillLanguage - :keyword visual_features: A list of visual features. - :paramtype visual_features: list[str or ~azure.search.documents.indexes.models.VisualFeature] - :keyword details: A string indicating which domain-specific details to return. - :paramtype details: list[str or ~azure.search.documents.indexes.models.ImageDetail] - """ super(ImageAnalysisSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Vision.ImageAnalysisSkill' # type: str self.default_language_code = kwargs.get('default_language_code', None) @@ -2961,72 +1946,6 @@ def __init__( self.details = kwargs.get('details', None) -class IndexerCurrentState(msrest.serialization.Model): - """Represents all of the state that defines and dictates the indexer's current execution. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar mode: The mode the indexer is running in. Possible values include: "indexingAllDocs", - "indexingResetDocs". - :vartype mode: str or ~azure.search.documents.indexes.models.IndexingMode - :ivar all_docs_initial_change_tracking_state: Change tracking state used when indexing starts - on all documents in the datasource. - :vartype all_docs_initial_change_tracking_state: str - :ivar all_docs_final_change_tracking_state: Change tracking state value when indexing finishes - on all documents in the datasource. - :vartype all_docs_final_change_tracking_state: str - :ivar reset_docs_initial_change_tracking_state: Change tracking state used when indexing starts - on select, reset documents in the datasource. - :vartype reset_docs_initial_change_tracking_state: str - :ivar reset_docs_final_change_tracking_state: Change tracking state value when indexing - finishes on select, reset documents in the datasource. - :vartype reset_docs_final_change_tracking_state: str - :ivar reset_document_keys: The list of document keys that have been reset. The document key is - the document's unique identifier for the data in the search index. The indexer will prioritize - selectively re-ingesting these keys. - :vartype reset_document_keys: list[str] - :ivar reset_datasource_document_ids: The list of datasource document ids that have been reset. - The datasource document id is the unique identifier for the data in the datasource. The indexer - will prioritize selectively re-ingesting these ids. - :vartype reset_datasource_document_ids: list[str] - """ - - _validation = { - 'mode': {'readonly': True}, - 'all_docs_initial_change_tracking_state': {'readonly': True}, - 'all_docs_final_change_tracking_state': {'readonly': True}, - 'reset_docs_initial_change_tracking_state': {'readonly': True}, - 'reset_docs_final_change_tracking_state': {'readonly': True}, - 'reset_document_keys': {'readonly': True}, - 'reset_datasource_document_ids': {'readonly': True}, - } - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'all_docs_initial_change_tracking_state': {'key': 'allDocsInitialChangeTrackingState', 'type': 'str'}, - 'all_docs_final_change_tracking_state': {'key': 'allDocsFinalChangeTrackingState', 'type': 'str'}, - 'reset_docs_initial_change_tracking_state': {'key': 'resetDocsInitialChangeTrackingState', 'type': 'str'}, - 'reset_docs_final_change_tracking_state': {'key': 'resetDocsFinalChangeTrackingState', 'type': 'str'}, - 'reset_document_keys': {'key': 'resetDocumentKeys', 'type': '[str]'}, - 'reset_datasource_document_ids': {'key': 'resetDatasourceDocumentIds', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(IndexerCurrentState, self).__init__(**kwargs) - self.mode = None - self.all_docs_initial_change_tracking_state = None - self.all_docs_final_change_tracking_state = None - self.reset_docs_initial_change_tracking_state = None - self.reset_docs_final_change_tracking_state = None - self.reset_document_keys = None - self.reset_datasource_document_ids = None - - class IndexerExecutionResult(msrest.serialization.Model): """Represents the result of an individual indexer execution. @@ -3037,13 +1956,6 @@ class IndexerExecutionResult(msrest.serialization.Model): :ivar status: Required. The outcome of this indexer execution. Possible values include: "transientFailure", "success", "inProgress", "reset". :vartype status: str or ~azure.search.documents.indexes.models.IndexerExecutionStatus - :ivar status_detail: The outcome of this indexer execution. Possible values include: - "resetDocs". - :vartype status_detail: str or - ~azure.search.documents.indexes.models.IndexerExecutionStatusDetail - :ivar current_state: All of the state that defines and dictates the indexer's current - execution. - :vartype current_state: ~azure.search.documents.indexes.models.IndexerCurrentState :ivar error_message: The error message indicating the top-level error, if any. :vartype error_message: str :ivar start_time: The start time of this indexer execution. @@ -3069,8 +1981,6 @@ class IndexerExecutionResult(msrest.serialization.Model): _validation = { 'status': {'required': True, 'readonly': True}, - 'status_detail': {'readonly': True}, - 'current_state': {'readonly': True}, 'error_message': {'readonly': True}, 'start_time': {'readonly': True}, 'end_time': {'readonly': True}, @@ -3084,8 +1994,6 @@ class IndexerExecutionResult(msrest.serialization.Model): _attribute_map = { 'status': {'key': 'status', 'type': 'str'}, - 'status_detail': {'key': 'statusDetail', 'type': 'str'}, - 'current_state': {'key': 'currentState', 'type': 'IndexerCurrentState'}, 'error_message': {'key': 'errorMessage', 'type': 'str'}, 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, @@ -3101,12 +2009,8 @@ def __init__( self, **kwargs ): - """ - """ super(IndexerExecutionResult, self).__init__(**kwargs) self.status = None - self.status_detail = None - self.current_state = None self.error_message = None self.start_time = None self.end_time = None @@ -3121,18 +2025,18 @@ def __init__( class IndexingParameters(msrest.serialization.Model): """Represents parameters for indexer execution. - :ivar batch_size: The number of items that are read from the data source and indexed as a + :param batch_size: The number of items that are read from the data source and indexed as a single batch in order to improve performance. The default depends on the data source type. - :vartype batch_size: int - :ivar max_failed_items: The maximum number of items that can fail indexing for indexer + :type batch_size: int + :param max_failed_items: The maximum number of items that can fail indexing for indexer execution to still be considered successful. -1 means no limit. Default is 0. - :vartype max_failed_items: int - :ivar max_failed_items_per_batch: The maximum number of items in a single batch that can fail + :type max_failed_items: int + :param max_failed_items_per_batch: The maximum number of items in a single batch that can fail indexing for the batch to still be considered successful. -1 means no limit. Default is 0. - :vartype max_failed_items_per_batch: int - :ivar configuration: A dictionary of indexer-specific configuration properties. Each name is + :type max_failed_items_per_batch: int + :param configuration: A dictionary of indexer-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. - :vartype configuration: ~azure.search.documents.indexes.models.IndexingParametersConfiguration + :type configuration: ~azure.search.documents.indexes.models.IndexingParametersConfiguration """ _attribute_map = { @@ -3146,21 +2050,6 @@ def __init__( self, **kwargs ): - """ - :keyword batch_size: The number of items that are read from the data source and indexed as a - single batch in order to improve performance. The default depends on the data source type. - :paramtype batch_size: int - :keyword max_failed_items: The maximum number of items that can fail indexing for indexer - execution to still be considered successful. -1 means no limit. Default is 0. - :paramtype max_failed_items: int - :keyword max_failed_items_per_batch: The maximum number of items in a single batch that can - fail indexing for the batch to still be considered successful. -1 means no limit. Default is 0. - :paramtype max_failed_items_per_batch: int - :keyword configuration: A dictionary of indexer-specific configuration properties. Each name is - the name of a specific property. Each value must be of a primitive type. - :paramtype configuration: - ~azure.search.documents.indexes.models.IndexingParametersConfiguration - """ super(IndexingParameters, self).__init__(**kwargs) self.batch_size = kwargs.get('batch_size', None) self.max_failed_items = kwargs.get('max_failed_items', 0) @@ -3171,73 +2060,72 @@ def __init__( class IndexingParametersConfiguration(msrest.serialization.Model): """A dictionary of indexer-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. - :ivar additional_properties: Unmatched properties from the message are deserialized to this + :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] - :ivar parsing_mode: Represents the parsing mode for indexing from an Azure blob data source. + :type additional_properties: dict[str, any] + :param parsing_mode: Represents the parsing mode for indexing from an Azure blob data source. Possible values include: "default", "text", "delimitedText", "json", "jsonArray", "jsonLines". Default value: "default". - :vartype parsing_mode: str or ~azure.search.documents.indexes.models.BlobIndexerParsingMode - :ivar excluded_file_name_extensions: Comma-delimited list of filename extensions to ignore when - processing from Azure blob storage. For example, you could exclude ".png, .mp4" to skip over - those files during indexing. - :vartype excluded_file_name_extensions: str - :ivar indexed_file_name_extensions: Comma-delimited list of filename extensions to select when + :type parsing_mode: str or ~azure.search.documents.indexes.models.BlobIndexerParsingMode + :param excluded_file_name_extensions: Comma-delimited list of filename extensions to ignore + when processing from Azure blob storage. For example, you could exclude ".png, .mp4" to skip + over those files during indexing. + :type excluded_file_name_extensions: str + :param indexed_file_name_extensions: Comma-delimited list of filename extensions to select when processing from Azure blob storage. For example, you could focus indexing on specific application files ".docx, .pptx, .msg" to specifically include those file types. - :vartype indexed_file_name_extensions: str - :ivar fail_on_unsupported_content_type: For Azure blobs, set to false if you want to continue + :type indexed_file_name_extensions: str + :param fail_on_unsupported_content_type: For Azure blobs, set to false if you want to continue indexing when an unsupported content type is encountered, and you don't know all the content types (file extensions) in advance. - :vartype fail_on_unsupported_content_type: bool - :ivar fail_on_unprocessable_document: For Azure blobs, set to false if you want to continue + :type fail_on_unsupported_content_type: bool + :param fail_on_unprocessable_document: For Azure blobs, set to false if you want to continue indexing if a document fails indexing. - :vartype fail_on_unprocessable_document: bool - :ivar index_storage_metadata_only_for_oversized_documents: For Azure blobs, set this property + :type fail_on_unprocessable_document: bool + :param index_storage_metadata_only_for_oversized_documents: For Azure blobs, set this property to true to still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors by default. For limits on blob size, see https://docs.microsoft.com/azure/search/search-limits-quotas-capacity. - :vartype index_storage_metadata_only_for_oversized_documents: bool - :ivar delimited_text_headers: For CSV blobs, specifies a comma-delimited list of column + :type index_storage_metadata_only_for_oversized_documents: bool + :param delimited_text_headers: For CSV blobs, specifies a comma-delimited list of column headers, useful for mapping source fields to destination fields in an index. - :vartype delimited_text_headers: str - :ivar delimited_text_delimiter: For CSV blobs, specifies the end-of-line single-character + :type delimited_text_headers: str + :param delimited_text_delimiter: For CSV blobs, specifies the end-of-line single-character delimiter for CSV files where each line starts a new document (for example, "|"). - :vartype delimited_text_delimiter: str - :ivar first_line_contains_headers: For CSV blobs, indicates that the first (non-blank) line of + :type delimited_text_delimiter: str + :param first_line_contains_headers: For CSV blobs, indicates that the first (non-blank) line of each blob contains headers. - :vartype first_line_contains_headers: bool - :ivar document_root: For JSON arrays, given a structured or semi-structured document, you can + :type first_line_contains_headers: bool + :param document_root: For JSON arrays, given a structured or semi-structured document, you can specify a path to the array using this property. - :vartype document_root: str - :ivar data_to_extract: Specifies the data to extract from Azure blob storage and tells the + :type document_root: str + :param data_to_extract: Specifies the data to extract from Azure blob storage and tells the indexer which data to extract from image content when "imageAction" is set to a value other than "none". This applies to embedded image content in a .PDF or other application, or image files such as .jpg and .png, in Azure blobs. Possible values include: "storageMetadata", "allMetadata", "contentAndMetadata". Default value: "contentAndMetadata". - :vartype data_to_extract: str or - ~azure.search.documents.indexes.models.BlobIndexerDataToExtract - :ivar image_action: Determines how to process embedded images and image files in Azure blob + :type data_to_extract: str or ~azure.search.documents.indexes.models.BlobIndexerDataToExtract + :param image_action: Determines how to process embedded images and image files in Azure blob storage. Setting the "imageAction" configuration to any value other than "none" requires that a skillset also be attached to that indexer. Possible values include: "none", "generateNormalizedImages", "generateNormalizedImagePerPage". Default value: "none". - :vartype image_action: str or ~azure.search.documents.indexes.models.BlobIndexerImageAction - :ivar allow_skillset_to_read_file_data: If true, will create a path //document//file_data that + :type image_action: str or ~azure.search.documents.indexes.models.BlobIndexerImageAction + :param allow_skillset_to_read_file_data: If true, will create a path //document//file_data that is an object representing the original file data downloaded from your blob data source. This allows you to pass the original file data to a custom skill for processing within the enrichment pipeline, or to the Document Extraction skill. - :vartype allow_skillset_to_read_file_data: bool - :ivar pdf_text_rotation_algorithm: Determines algorithm for text extraction from PDF files in + :type allow_skillset_to_read_file_data: bool + :param pdf_text_rotation_algorithm: Determines algorithm for text extraction from PDF files in Azure blob storage. Possible values include: "none", "detectAngles". Default value: "none". - :vartype pdf_text_rotation_algorithm: str or + :type pdf_text_rotation_algorithm: str or ~azure.search.documents.indexes.models.BlobIndexerPDFTextRotationAlgorithm - :ivar execution_environment: Specifies the environment in which the indexer should execute. + :param execution_environment: Specifies the environment in which the indexer should execute. Possible values include: "standard", "private". Default value: "standard". - :vartype execution_environment: str or + :type execution_environment: str or ~azure.search.documents.indexes.models.IndexerExecutionEnvironment - :ivar query_timeout: Increases the timeout beyond the 5-minute default for Azure SQL database + :param query_timeout: Increases the timeout beyond the 5-minute default for Azure SQL database data sources, specified in the format "hh:mm:ss". - :vartype query_timeout: str + :type query_timeout: str """ _attribute_map = { @@ -3264,75 +2152,6 @@ def __init__( self, **kwargs ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - :keyword parsing_mode: Represents the parsing mode for indexing from an Azure blob data source. - Possible values include: "default", "text", "delimitedText", "json", "jsonArray", "jsonLines". - Default value: "default". - :paramtype parsing_mode: str or ~azure.search.documents.indexes.models.BlobIndexerParsingMode - :keyword excluded_file_name_extensions: Comma-delimited list of filename extensions to ignore - when processing from Azure blob storage. For example, you could exclude ".png, .mp4" to skip - over those files during indexing. - :paramtype excluded_file_name_extensions: str - :keyword indexed_file_name_extensions: Comma-delimited list of filename extensions to select - when processing from Azure blob storage. For example, you could focus indexing on specific - application files ".docx, .pptx, .msg" to specifically include those file types. - :paramtype indexed_file_name_extensions: str - :keyword fail_on_unsupported_content_type: For Azure blobs, set to false if you want to - continue indexing when an unsupported content type is encountered, and you don't know all the - content types (file extensions) in advance. - :paramtype fail_on_unsupported_content_type: bool - :keyword fail_on_unprocessable_document: For Azure blobs, set to false if you want to continue - indexing if a document fails indexing. - :paramtype fail_on_unprocessable_document: bool - :keyword index_storage_metadata_only_for_oversized_documents: For Azure blobs, set this - property to true to still index storage metadata for blob content that is too large to process. - Oversized blobs are treated as errors by default. For limits on blob size, see - https://docs.microsoft.com/azure/search/search-limits-quotas-capacity. - :paramtype index_storage_metadata_only_for_oversized_documents: bool - :keyword delimited_text_headers: For CSV blobs, specifies a comma-delimited list of column - headers, useful for mapping source fields to destination fields in an index. - :paramtype delimited_text_headers: str - :keyword delimited_text_delimiter: For CSV blobs, specifies the end-of-line single-character - delimiter for CSV files where each line starts a new document (for example, "|"). - :paramtype delimited_text_delimiter: str - :keyword first_line_contains_headers: For CSV blobs, indicates that the first (non-blank) line - of each blob contains headers. - :paramtype first_line_contains_headers: bool - :keyword document_root: For JSON arrays, given a structured or semi-structured document, you - can specify a path to the array using this property. - :paramtype document_root: str - :keyword data_to_extract: Specifies the data to extract from Azure blob storage and tells the - indexer which data to extract from image content when "imageAction" is set to a value other - than "none". This applies to embedded image content in a .PDF or other application, or image - files such as .jpg and .png, in Azure blobs. Possible values include: "storageMetadata", - "allMetadata", "contentAndMetadata". Default value: "contentAndMetadata". - :paramtype data_to_extract: str or - ~azure.search.documents.indexes.models.BlobIndexerDataToExtract - :keyword image_action: Determines how to process embedded images and image files in Azure blob - storage. Setting the "imageAction" configuration to any value other than "none" requires that - a skillset also be attached to that indexer. Possible values include: "none", - "generateNormalizedImages", "generateNormalizedImagePerPage". Default value: "none". - :paramtype image_action: str or ~azure.search.documents.indexes.models.BlobIndexerImageAction - :keyword allow_skillset_to_read_file_data: If true, will create a path //document//file_data - that is an object representing the original file data downloaded from your blob data source. - This allows you to pass the original file data to a custom skill for processing within the - enrichment pipeline, or to the Document Extraction skill. - :paramtype allow_skillset_to_read_file_data: bool - :keyword pdf_text_rotation_algorithm: Determines algorithm for text extraction from PDF files - in Azure blob storage. Possible values include: "none", "detectAngles". Default value: "none". - :paramtype pdf_text_rotation_algorithm: str or - ~azure.search.documents.indexes.models.BlobIndexerPDFTextRotationAlgorithm - :keyword execution_environment: Specifies the environment in which the indexer should execute. - Possible values include: "standard", "private". Default value: "standard". - :paramtype execution_environment: str or - ~azure.search.documents.indexes.models.IndexerExecutionEnvironment - :keyword query_timeout: Increases the timeout beyond the 5-minute default for Azure SQL - database data sources, specified in the format "hh:mm:ss". - :paramtype query_timeout: str - """ super(IndexingParametersConfiguration, self).__init__(**kwargs) self.additional_properties = kwargs.get('additional_properties', None) self.parsing_mode = kwargs.get('parsing_mode', "default") @@ -3358,10 +2177,10 @@ class IndexingSchedule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar interval: Required. The interval of time between indexer executions. - :vartype interval: ~datetime.timedelta - :ivar start_time: The time when an indexer should start running. - :vartype start_time: ~datetime.datetime + :param interval: Required. The interval of time between indexer executions. + :type interval: ~datetime.timedelta + :param start_time: The time when an indexer should start running. + :type start_time: ~datetime.datetime """ _validation = { @@ -3377,12 +2196,6 @@ def __init__( self, **kwargs ): - """ - :keyword interval: Required. The interval of time between indexer executions. - :paramtype interval: ~datetime.timedelta - :keyword start_time: The time when an indexer should start running. - :paramtype start_time: ~datetime.datetime - """ super(IndexingSchedule, self).__init__(**kwargs) self.interval = kwargs['interval'] self.start_time = kwargs.get('start_time', None) @@ -3393,14 +2206,14 @@ class InputFieldMappingEntry(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the input. - :vartype name: str - :ivar source: The source of the input. - :vartype source: str - :ivar source_context: The source context used for selecting recursive inputs. - :vartype source_context: str - :ivar inputs: The recursive inputs used when creating a complex type. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param name: Required. The name of the input. + :type name: str + :param source: The source of the input. + :type source: str + :param source_context: The source context used for selecting recursive inputs. + :type source_context: str + :param inputs: The recursive inputs used when creating a complex type. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] """ _validation = { @@ -3418,16 +2231,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the input. - :paramtype name: str - :keyword source: The source of the input. - :paramtype source: str - :keyword source_context: The source context used for selecting recursive inputs. - :paramtype source_context: str - :keyword inputs: The recursive inputs used when creating a complex type. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - """ super(InputFieldMappingEntry, self).__init__(**kwargs) self.name = kwargs['name'] self.source = kwargs.get('source', None) @@ -3440,18 +2243,18 @@ class KeepTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar keep_words: Required. The list of words to keep. - :vartype keep_words: list[str] - :ivar lower_case_keep_words: A value indicating whether to lower case all words first. Default + :type name: str + :param keep_words: Required. The list of words to keep. + :type keep_words: list[str] + :param lower_case_keep_words: A value indicating whether to lower case all words first. Default is false. - :vartype lower_case_keep_words: bool + :type lower_case_keep_words: bool """ _validation = { @@ -3471,17 +2274,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword keep_words: Required. The list of words to keep. - :paramtype keep_words: list[str] - :keyword lower_case_keep_words: A value indicating whether to lower case all words first. - Default is false. - :paramtype lower_case_keep_words: bool - """ super(KeepTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.KeepTokenFilter' # type: str self.keep_words = kwargs['keep_words'] @@ -3493,37 +2285,37 @@ class KeyPhraseExtractionSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "nl", "en", "fi", "fr", "de", "it", "ja", "ko", "no", "pl", "pt-PT", "pt-BR", "ru", "es", "sv". - :vartype default_language_code: str or + :type default_language_code: str or ~azure.search.documents.indexes.models.KeyPhraseExtractionSkillLanguage - :ivar max_key_phrase_count: A number indicating how many key phrases to return. If absent, all + :param max_key_phrase_count: A number indicating how many key phrases to return. If absent, all identified key phrases will be returned. - :vartype max_key_phrase_count: int - :ivar model_version: The version of the model to use when calling the Text Analytics service. + :type max_key_phrase_count: int + :param model_version: The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary. - :vartype model_version: str + :type model_version: str """ _validation = { @@ -3548,37 +2340,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "da", "nl", "en", "fi", "fr", "de", "it", "ja", "ko", "no", "pl", - "pt-PT", "pt-BR", "ru", "es", "sv". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.KeyPhraseExtractionSkillLanguage - :keyword max_key_phrase_count: A number indicating how many key phrases to return. If absent, - all identified key phrases will be returned. - :paramtype max_key_phrase_count: int - :keyword model_version: The version of the model to use when calling the Text Analytics - service. It will default to the latest available when not specified. We recommend you do not - specify this value unless absolutely necessary. - :paramtype model_version: str - """ super(KeyPhraseExtractionSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Text.KeyPhraseExtractionSkill' # type: str self.default_language_code = kwargs.get('default_language_code', None) @@ -3591,18 +2352,18 @@ class KeywordMarkerTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar keywords: Required. A list of words to mark as keywords. - :vartype keywords: list[str] - :ivar ignore_case: A value indicating whether to ignore case. If true, all words are converted + :type name: str + :param keywords: Required. A list of words to mark as keywords. + :type keywords: list[str] + :param ignore_case: A value indicating whether to ignore case. If true, all words are converted to lower case first. Default is false. - :vartype ignore_case: bool + :type ignore_case: bool """ _validation = { @@ -3622,17 +2383,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword keywords: Required. A list of words to mark as keywords. - :paramtype keywords: list[str] - :keyword ignore_case: A value indicating whether to ignore case. If true, all words are - converted to lower case first. Default is false. - :paramtype ignore_case: bool - """ super(KeywordMarkerTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.KeywordMarkerTokenFilter' # type: str self.keywords = kwargs['keywords'] @@ -3644,15 +2394,15 @@ class KeywordTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar buffer_size: The read buffer size in bytes. Default is 256. - :vartype buffer_size: int + :type name: str + :param buffer_size: The read buffer size in bytes. Default is 256. + :type buffer_size: int """ _validation = { @@ -3670,14 +2420,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword buffer_size: The read buffer size in bytes. Default is 256. - :paramtype buffer_size: int - """ super(KeywordTokenizer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.KeywordTokenizer' # type: str self.buffer_size = kwargs.get('buffer_size', 256) @@ -3688,16 +2430,16 @@ class KeywordTokenizerV2(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Default is 256. Tokens longer than the + :type name: str + :param max_token_length: The maximum token length. Default is 256. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters. - :vartype max_token_length: int + :type max_token_length: int """ _validation = { @@ -3716,15 +2458,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Default is 256. Tokens longer than the - maximum length are split. The maximum token length that can be used is 300 characters. - :paramtype max_token_length: int - """ super(KeywordTokenizerV2, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.KeywordTokenizerV2' # type: str self.max_token_length = kwargs.get('max_token_length', 256) @@ -3735,32 +2468,32 @@ class LanguageDetectionSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_country_hint: A country code to use as a hint to the language detection model if + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_country_hint: A country code to use as a hint to the language detection model if it cannot disambiguate the language. - :vartype default_country_hint: str - :ivar model_version: The version of the model to use when calling the Text Analytics service. + :type default_country_hint: str + :param model_version: The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary. - :vartype model_version: str + :type model_version: str """ _validation = { @@ -3784,32 +2517,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_country_hint: A country code to use as a hint to the language detection model - if it cannot disambiguate the language. - :paramtype default_country_hint: str - :keyword model_version: The version of the model to use when calling the Text Analytics - service. It will default to the latest available when not specified. We recommend you do not - specify this value unless absolutely necessary. - :paramtype model_version: str - """ super(LanguageDetectionSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Text.LanguageDetectionSkill' # type: str self.default_country_hint = kwargs.get('default_country_hint', None) @@ -3821,18 +2528,18 @@ class LengthTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_length: The minimum length in characters. Default is 0. Maximum is 300. Must be less + :type name: str + :param min_length: The minimum length in characters. Default is 0. Maximum is 300. Must be less than the value of max. - :vartype min_length: int - :ivar max_length: The maximum length in characters. Default and maximum is 300. - :vartype max_length: int + :type min_length: int + :param max_length: The maximum length in characters. Default and maximum is 300. + :type max_length: int """ _validation = { @@ -3853,17 +2560,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_length: The minimum length in characters. Default is 0. Maximum is 300. Must be - less than the value of max. - :paramtype min_length: int - :keyword max_length: The maximum length in characters. Default and maximum is 300. - :paramtype max_length: int - """ super(LengthTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.LengthTokenFilter' # type: str self.min_length = kwargs.get('min_length', 0) @@ -3875,18 +2571,18 @@ class LimitTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_count: The maximum number of tokens to produce. Default is 1. - :vartype max_token_count: int - :ivar consume_all_tokens: A value indicating whether all tokens from the input must be consumed - even if maxTokenCount is reached. Default is false. - :vartype consume_all_tokens: bool + :type name: str + :param max_token_count: The maximum number of tokens to produce. Default is 1. + :type max_token_count: int + :param consume_all_tokens: A value indicating whether all tokens from the input must be + consumed even if maxTokenCount is reached. Default is false. + :type consume_all_tokens: bool """ _validation = { @@ -3905,52 +2601,12 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_count: The maximum number of tokens to produce. Default is 1. - :paramtype max_token_count: int - :keyword consume_all_tokens: A value indicating whether all tokens from the input must be - consumed even if maxTokenCount is reached. Default is false. - :paramtype consume_all_tokens: bool - """ super(LimitTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.LimitTokenFilter' # type: str self.max_token_count = kwargs.get('max_token_count', 1) self.consume_all_tokens = kwargs.get('consume_all_tokens', False) -class ListAliasesResult(msrest.serialization.Model): - """Response from a List Aliases request. If successful, it includes the associated index mappings for all aliases. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar aliases: Required. The aliases in the Search service. - :vartype aliases: list[~azure.search.documents.indexes.models.SearchAlias] - """ - - _validation = { - 'aliases': {'required': True, 'readonly': True}, - } - - _attribute_map = { - 'aliases': {'key': 'value', 'type': '[SearchAlias]'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ListAliasesResult, self).__init__(**kwargs) - self.aliases = None - - class ListDataSourcesResult(msrest.serialization.Model): """Response from a List Datasources request. If successful, it includes the full definitions of all datasources. @@ -3974,8 +2630,6 @@ def __init__( self, **kwargs ): - """ - """ super(ListDataSourcesResult, self).__init__(**kwargs) self.data_sources = None @@ -4003,8 +2657,6 @@ def __init__( self, **kwargs ): - """ - """ super(ListIndexersResult, self).__init__(**kwargs) self.indexers = None @@ -4032,8 +2684,6 @@ def __init__( self, **kwargs ): - """ - """ super(ListIndexesResult, self).__init__(**kwargs) self.indexes = None @@ -4061,8 +2711,6 @@ def __init__( self, **kwargs ): - """ - """ super(ListSkillsetsResult, self).__init__(**kwargs) self.skillsets = None @@ -4090,8 +2738,6 @@ def __init__( self, **kwargs ): - """ - """ super(ListSynonymMapsResult, self).__init__(**kwargs) self.synonym_maps = None @@ -4101,18 +2747,18 @@ class LuceneStandardAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the analyzer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the + :type name: str + :param max_token_length: The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters. - :vartype max_token_length: int - :ivar stopwords: A list of stopwords. - :vartype stopwords: list[str] + :type max_token_length: int + :param stopwords: A list of stopwords. + :type stopwords: list[str] """ _validation = { @@ -4132,17 +2778,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the analyzer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the - maximum length are split. The maximum token length that can be used is 300 characters. - :paramtype max_token_length: int - :keyword stopwords: A list of stopwords. - :paramtype stopwords: list[str] - """ super(LuceneStandardAnalyzer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.StandardAnalyzer' # type: str self.max_token_length = kwargs.get('max_token_length', 255) @@ -4154,16 +2789,16 @@ class LuceneStandardTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the + :type name: str + :param max_token_length: The maximum token length. Default is 255. Tokens longer than the maximum length are split. - :vartype max_token_length: int + :type max_token_length: int """ _validation = { @@ -4181,15 +2816,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the - maximum length are split. - :paramtype max_token_length: int - """ super(LuceneStandardTokenizer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.StandardTokenizer' # type: str self.max_token_length = kwargs.get('max_token_length', 255) @@ -4200,16 +2826,16 @@ class LuceneStandardTokenizerV2(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the + :type name: str + :param max_token_length: The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters. - :vartype max_token_length: int + :type max_token_length: int """ _validation = { @@ -4228,15 +2854,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the - maximum length are split. The maximum token length that can be used is 300 characters. - :paramtype max_token_length: int - """ super(LuceneStandardTokenizerV2, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.StandardTokenizerV2' # type: str self.max_token_length = kwargs.get('max_token_length', 255) @@ -4247,21 +2864,20 @@ class MagnitudeScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Indicates the type of function to use. Valid values include magnitude, + :param type: Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server. - :vartype type: str - :ivar field_name: Required. The name of the field used as input to the scoring function. - :vartype field_name: str - :ivar boost: Required. A multiplier for the raw score. Must be a positive number not equal to + :type type: str + :param field_name: Required. The name of the field used as input to the scoring function. + :type field_name: str + :param boost: Required. A multiplier for the raw score. Must be a positive number not equal to 1.0. - :vartype boost: float - :ivar interpolation: A value indicating how boosting will be interpolated across document + :type boost: float + :param interpolation: A value indicating how boosting will be interpolated across document scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", "logarithmic". - :vartype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :ivar parameters: Required. Parameter values for the magnitude scoring function. - :vartype parameters: ~azure.search.documents.indexes.models.MagnitudeScoringParameters + :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation + :param parameters: Required. Parameter values for the magnitude scoring function. + :type parameters: ~azure.search.documents.indexes.models.MagnitudeScoringParameters """ _validation = { @@ -4283,20 +2899,6 @@ def __init__( self, **kwargs ): - """ - :keyword field_name: Required. The name of the field used as input to the scoring function. - :paramtype field_name: str - :keyword boost: Required. A multiplier for the raw score. Must be a positive number not equal - to 1.0. - :paramtype boost: float - :keyword interpolation: A value indicating how boosting will be interpolated across document - scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", - "logarithmic". - :paramtype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :keyword parameters: Required. Parameter values for the magnitude scoring function. - :paramtype parameters: ~azure.search.documents.indexes.models.MagnitudeScoringParameters - """ super(MagnitudeScoringFunction, self).__init__(**kwargs) self.type = 'magnitude' # type: str self.parameters = kwargs['parameters'] @@ -4307,13 +2909,13 @@ class MagnitudeScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar boosting_range_start: Required. The field value at which boosting starts. - :vartype boosting_range_start: float - :ivar boosting_range_end: Required. The field value at which boosting ends. - :vartype boosting_range_end: float - :ivar should_boost_beyond_range_by_constant: A value indicating whether to apply a constant + :param boosting_range_start: Required. The field value at which boosting starts. + :type boosting_range_start: float + :param boosting_range_end: Required. The field value at which boosting ends. + :type boosting_range_end: float + :param should_boost_beyond_range_by_constant: A value indicating whether to apply a constant boost for field values beyond the range end value; default is false. - :vartype should_boost_beyond_range_by_constant: bool + :type should_boost_beyond_range_by_constant: bool """ _validation = { @@ -4331,15 +2933,6 @@ def __init__( self, **kwargs ): - """ - :keyword boosting_range_start: Required. The field value at which boosting starts. - :paramtype boosting_range_start: float - :keyword boosting_range_end: Required. The field value at which boosting ends. - :paramtype boosting_range_end: float - :keyword should_boost_beyond_range_by_constant: A value indicating whether to apply a constant - boost for field values beyond the range end value; default is false. - :paramtype should_boost_beyond_range_by_constant: bool - """ super(MagnitudeScoringParameters, self).__init__(**kwargs) self.boosting_range_start = kwargs['boosting_range_start'] self.boosting_range_end = kwargs['boosting_range_end'] @@ -4351,16 +2944,16 @@ class MappingCharFilter(CharFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the char filter.Constant filled by + :param odata_type: Required. Identifies the concrete type of the char filter.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the char filter. It must only contain letters, digits, + :type odata_type: str + :param name: Required. The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar mappings: Required. A list of mappings of the following format: "a=>b" (all occurrences + :type name: str + :param mappings: Required. A list of mappings of the following format: "a=>b" (all occurrences of the character "a" will be replaced with character "b"). - :vartype mappings: list[str] + :type mappings: list[str] """ _validation = { @@ -4379,15 +2972,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the char filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword mappings: Required. A list of mappings of the following format: "a=>b" (all - occurrences of the character "a" will be replaced with character "b"). - :paramtype mappings: list[str] - """ super(MappingCharFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.MappingCharFilter' # type: str self.mappings = kwargs['mappings'] @@ -4398,31 +2982,31 @@ class MergeSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar insert_pre_tag: The tag indicates the start of the merged text. By default, the tag is an + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param insert_pre_tag: The tag indicates the start of the merged text. By default, the tag is + an empty space. + :type insert_pre_tag: str + :param insert_post_tag: The tag indicates the end of the merged text. By default, the tag is an empty space. - :vartype insert_pre_tag: str - :ivar insert_post_tag: The tag indicates the end of the merged text. By default, the tag is an - empty space. - :vartype insert_post_tag: str + :type insert_post_tag: str """ _validation = { @@ -4446,31 +3030,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword insert_pre_tag: The tag indicates the start of the merged text. By default, the tag is - an empty space. - :paramtype insert_pre_tag: str - :keyword insert_post_tag: The tag indicates the end of the merged text. By default, the tag is - an empty space. - :paramtype insert_post_tag: str - """ super(MergeSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Text.MergeSkill' # type: str self.insert_pre_tag = kwargs.get('insert_pre_tag', " ") @@ -4482,29 +3041,29 @@ class MicrosoftLanguageStemmingTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Tokens longer than the maximum length are + :type name: str + :param max_token_length: The maximum token length. Tokens longer than the maximum length are split. Maximum token length that can be used is 300 characters. Tokens longer than 300 characters are first split into tokens of length 300 and then each of those tokens is split based on the max token length set. Default is 255. - :vartype max_token_length: int - :ivar is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used as - the search tokenizer, set to false if used as the indexing tokenizer. Default is false. - :vartype is_search_tokenizer: bool - :ivar language: The language to use. The default is English. Possible values include: "arabic", - "bangla", "bulgarian", "catalan", "croatian", "czech", "danish", "dutch", "english", + :type max_token_length: int + :param is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used + as the search tokenizer, set to false if used as the indexing tokenizer. Default is false. + :type is_search_tokenizer: bool + :param language: The language to use. The default is English. Possible values include: + "arabic", "bangla", "bulgarian", "catalan", "croatian", "czech", "danish", "dutch", "english", "estonian", "finnish", "french", "german", "greek", "gujarati", "hebrew", "hindi", "hungarian", "icelandic", "indonesian", "italian", "kannada", "latvian", "lithuanian", "malay", "malayalam", "marathi", "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", "romanian", "russian", "serbianCyrillic", "serbianLatin", "slovak", "slovenian", "spanish", "swedish", "tamil", "telugu", "turkish", "ukrainian", "urdu". - :vartype language: str or + :type language: str or ~azure.search.documents.indexes.models.MicrosoftStemmingTokenizerLanguage """ @@ -4526,29 +3085,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Tokens longer than the maximum length are - split. Maximum token length that can be used is 300 characters. Tokens longer than 300 - characters are first split into tokens of length 300 and then each of those tokens is split - based on the max token length set. Default is 255. - :paramtype max_token_length: int - :keyword is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used - as the search tokenizer, set to false if used as the indexing tokenizer. Default is false. - :paramtype is_search_tokenizer: bool - :keyword language: The language to use. The default is English. Possible values include: - "arabic", "bangla", "bulgarian", "catalan", "croatian", "czech", "danish", "dutch", "english", - "estonian", "finnish", "french", "german", "greek", "gujarati", "hebrew", "hindi", "hungarian", - "icelandic", "indonesian", "italian", "kannada", "latvian", "lithuanian", "malay", "malayalam", - "marathi", "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", - "romanian", "russian", "serbianCyrillic", "serbianLatin", "slovak", "slovenian", "spanish", - "swedish", "tamil", "telugu", "turkish", "ukrainian", "urdu". - :paramtype language: str or - ~azure.search.documents.indexes.models.MicrosoftStemmingTokenizerLanguage - """ super(MicrosoftLanguageStemmingTokenizer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.MicrosoftLanguageStemmingTokenizer' # type: str self.max_token_length = kwargs.get('max_token_length', 255) @@ -4561,29 +3097,29 @@ class MicrosoftLanguageTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Tokens longer than the maximum length are + :type name: str + :param max_token_length: The maximum token length. Tokens longer than the maximum length are split. Maximum token length that can be used is 300 characters. Tokens longer than 300 characters are first split into tokens of length 300 and then each of those tokens is split based on the max token length set. Default is 255. - :vartype max_token_length: int - :ivar is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used as - the search tokenizer, set to false if used as the indexing tokenizer. Default is false. - :vartype is_search_tokenizer: bool - :ivar language: The language to use. The default is English. Possible values include: "bangla", - "bulgarian", "catalan", "chineseSimplified", "chineseTraditional", "croatian", "czech", - "danish", "dutch", "english", "french", "german", "greek", "gujarati", "hindi", "icelandic", - "indonesian", "italian", "japanese", "kannada", "korean", "malay", "malayalam", "marathi", - "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", "romanian", - "russian", "serbianCyrillic", "serbianLatin", "slovenian", "spanish", "swedish", "tamil", - "telugu", "thai", "ukrainian", "urdu", "vietnamese". - :vartype language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage + :type max_token_length: int + :param is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used + as the search tokenizer, set to false if used as the indexing tokenizer. Default is false. + :type is_search_tokenizer: bool + :param language: The language to use. The default is English. Possible values include: + "bangla", "bulgarian", "catalan", "chineseSimplified", "chineseTraditional", "croatian", + "czech", "danish", "dutch", "english", "french", "german", "greek", "gujarati", "hindi", + "icelandic", "indonesian", "italian", "japanese", "kannada", "korean", "malay", "malayalam", + "marathi", "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", + "romanian", "russian", "serbianCyrillic", "serbianLatin", "slovenian", "spanish", "swedish", + "tamil", "telugu", "thai", "ukrainian", "urdu", "vietnamese". + :type language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage """ _validation = { @@ -4604,28 +3140,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Tokens longer than the maximum length are - split. Maximum token length that can be used is 300 characters. Tokens longer than 300 - characters are first split into tokens of length 300 and then each of those tokens is split - based on the max token length set. Default is 255. - :paramtype max_token_length: int - :keyword is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used - as the search tokenizer, set to false if used as the indexing tokenizer. Default is false. - :paramtype is_search_tokenizer: bool - :keyword language: The language to use. The default is English. Possible values include: - "bangla", "bulgarian", "catalan", "chineseSimplified", "chineseTraditional", "croatian", - "czech", "danish", "dutch", "english", "french", "german", "greek", "gujarati", "hindi", - "icelandic", "indonesian", "italian", "japanese", "kannada", "korean", "malay", "malayalam", - "marathi", "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", - "romanian", "russian", "serbianCyrillic", "serbianLatin", "slovenian", "spanish", "swedish", - "tamil", "telugu", "thai", "ukrainian", "urdu", "vietnamese". - :paramtype language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage - """ super(MicrosoftLanguageTokenizer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.MicrosoftLanguageTokenizer' # type: str self.max_token_length = kwargs.get('max_token_length', 255) @@ -4638,18 +3152,18 @@ class NGramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_gram: The minimum n-gram length. Default is 1. Must be less than the value of + :type name: str + :param min_gram: The minimum n-gram length. Default is 1. Must be less than the value of maxGram. - :vartype min_gram: int - :ivar max_gram: The maximum n-gram length. Default is 2. - :vartype max_gram: int + :type min_gram: int + :param max_gram: The maximum n-gram length. Default is 2. + :type max_gram: int """ _validation = { @@ -4668,17 +3182,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_gram: The minimum n-gram length. Default is 1. Must be less than the value of - maxGram. - :paramtype min_gram: int - :keyword max_gram: The maximum n-gram length. Default is 2. - :paramtype max_gram: int - """ super(NGramTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.NGramTokenFilter' # type: str self.min_gram = kwargs.get('min_gram', 1) @@ -4690,18 +3193,18 @@ class NGramTokenFilterV2(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the + :type name: str + :param min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram. - :vartype min_gram: int - :ivar max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :vartype max_gram: int + :type min_gram: int + :param max_gram: The maximum n-gram length. Default is 2. Maximum is 300. + :type max_gram: int """ _validation = { @@ -4722,17 +3225,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than - the value of maxGram. - :paramtype min_gram: int - :keyword max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :paramtype max_gram: int - """ super(NGramTokenFilterV2, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.NGramTokenFilterV2' # type: str self.min_gram = kwargs.get('min_gram', 1) @@ -4744,20 +3236,20 @@ class NGramTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the + :type name: str + :param min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram. - :vartype min_gram: int - :ivar max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :vartype max_gram: int - :ivar token_chars: Character classes to keep in the tokens. - :vartype token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] + :type min_gram: int + :param max_gram: The maximum n-gram length. Default is 2. Maximum is 300. + :type max_gram: int + :param token_chars: Character classes to keep in the tokens. + :type token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] """ _validation = { @@ -4779,19 +3271,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than - the value of maxGram. - :paramtype min_gram: int - :keyword max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :paramtype max_gram: int - :keyword token_chars: Character classes to keep in the tokens. - :paramtype token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] - """ super(NGramTokenizer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.NGramTokenizer' # type: str self.min_gram = kwargs.get('min_gram', 1) @@ -4804,37 +3283,33 @@ class OcrSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "zh-Hans", "zh-Hant", "cs", "da", "nl", "en", "fi", "fr", "de", "el", "hu", "it", "ja", "ko", "nb", "pl", "pt", "ru", "es", "sv", "tr", "ar", "ro", "sr-Cyrl", - "sr-Latn", "sk", "unk". - :vartype default_language_code: str or ~azure.search.documents.indexes.models.OcrSkillLanguage - :ivar should_detect_orientation: A value indicating to turn orientation detection on or not. + "sr-Latn", "sk". + :type default_language_code: str or ~azure.search.documents.indexes.models.OcrSkillLanguage + :param should_detect_orientation: A value indicating to turn orientation detection on or not. Default is false. - :vartype should_detect_orientation: bool - :ivar line_ending: Defines the sequence of characters to use between the lines of text - recognized by the OCR skill. The default value is "space". Possible values include: "space", - "carriageReturn", "lineFeed", "carriageReturnLineFeed". - :vartype line_ending: str or ~azure.search.documents.indexes.models.LineEnding + :type should_detect_orientation: bool """ _validation = { @@ -4852,50 +3327,16 @@ class OcrSkill(SearchIndexerSkill): 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, 'default_language_code': {'key': 'defaultLanguageCode', 'type': 'str'}, 'should_detect_orientation': {'key': 'detectOrientation', 'type': 'bool'}, - 'line_ending': {'key': 'lineEnding', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "zh-Hans", "zh-Hant", "cs", "da", "nl", "en", "fi", "fr", "de", "el", - "hu", "it", "ja", "ko", "nb", "pl", "pt", "ru", "es", "sv", "tr", "ar", "ro", "sr-Cyrl", - "sr-Latn", "sk", "unk". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.OcrSkillLanguage - :keyword should_detect_orientation: A value indicating to turn orientation detection on or not. - Default is false. - :paramtype should_detect_orientation: bool - :keyword line_ending: Defines the sequence of characters to use between the lines of text - recognized by the OCR skill. The default value is "space". Possible values include: "space", - "carriageReturn", "lineFeed", "carriageReturnLineFeed". - :paramtype line_ending: str or ~azure.search.documents.indexes.models.LineEnding - """ + } + + def __init__( + self, + **kwargs + ): super(OcrSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Vision.OcrSkill' # type: str self.default_language_code = kwargs.get('default_language_code', None) self.should_detect_orientation = kwargs.get('should_detect_orientation', False) - self.line_ending = kwargs.get('line_ending', None) class OutputFieldMappingEntry(msrest.serialization.Model): @@ -4903,10 +3344,10 @@ class OutputFieldMappingEntry(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the output defined by the skill. - :vartype name: str - :ivar target_name: The target name of the output. It is optional and default to name. - :vartype target_name: str + :param name: Required. The name of the output defined by the skill. + :type name: str + :param target_name: The target name of the output. It is optional and default to name. + :type target_name: str """ _validation = { @@ -4922,12 +3363,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the output defined by the skill. - :paramtype name: str - :keyword target_name: The target name of the output. It is optional and default to name. - :paramtype target_name: str - """ super(OutputFieldMappingEntry, self).__init__(**kwargs) self.name = kwargs['name'] self.target_name = kwargs.get('target_name', None) @@ -4938,24 +3373,24 @@ class PathHierarchyTokenizerV2(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar delimiter: The delimiter character to use. Default is "/". - :vartype delimiter: str - :ivar replacement: A value that, if set, replaces the delimiter character. Default is "/". - :vartype replacement: str - :ivar max_token_length: The maximum token length. Default and maximum is 300. - :vartype max_token_length: int - :ivar reverse_token_order: A value indicating whether to generate tokens in reverse order. + :type name: str + :param delimiter: The delimiter character to use. Default is "/". + :type delimiter: str + :param replacement: A value that, if set, replaces the delimiter character. Default is "/". + :type replacement: str + :param max_token_length: The maximum token length. Default and maximum is 300. + :type max_token_length: int + :param reverse_token_order: A value indicating whether to generate tokens in reverse order. Default is false. - :vartype reverse_token_order: bool - :ivar number_of_tokens_to_skip: The number of initial tokens to skip. Default is 0. - :vartype number_of_tokens_to_skip: int + :type reverse_token_order: bool + :param number_of_tokens_to_skip: The number of initial tokens to skip. Default is 0. + :type number_of_tokens_to_skip: int """ _validation = { @@ -4978,23 +3413,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword delimiter: The delimiter character to use. Default is "/". - :paramtype delimiter: str - :keyword replacement: A value that, if set, replaces the delimiter character. Default is "/". - :paramtype replacement: str - :keyword max_token_length: The maximum token length. Default and maximum is 300. - :paramtype max_token_length: int - :keyword reverse_token_order: A value indicating whether to generate tokens in reverse order. - Default is false. - :paramtype reverse_token_order: bool - :keyword number_of_tokens_to_skip: The number of initial tokens to skip. Default is 0. - :paramtype number_of_tokens_to_skip: int - """ super(PathHierarchyTokenizerV2, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.PathHierarchyTokenizerV2' # type: str self.delimiter = kwargs.get('delimiter', "/") @@ -5009,24 +3427,24 @@ class PatternAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the analyzer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar lower_case_terms: A value indicating whether terms should be lower-cased. Default is + :type name: str + :param lower_case_terms: A value indicating whether terms should be lower-cased. Default is true. - :vartype lower_case_terms: bool - :ivar pattern: A regular expression pattern to match token separators. Default is an expression - that matches one or more non-word characters. - :vartype pattern: str - :ivar flags: Regular expression flags. Possible values include: "CANON_EQ", "CASE_INSENSITIVE", - "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". - :vartype flags: str or ~azure.search.documents.indexes.models.RegexFlags - :ivar stopwords: A list of stopwords. - :vartype stopwords: list[str] + :type lower_case_terms: bool + :param pattern: A regular expression pattern to match token separators. Default is an + expression that matches one or more non-word characters. + :type pattern: str + :param flags: Regular expression flags. Possible values include: "CANON_EQ", + "CASE_INSENSITIVE", "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". + :type flags: str or ~azure.search.documents.indexes.models.RegexFlags + :param stopwords: A list of stopwords. + :type stopwords: list[str] """ _validation = { @@ -5047,23 +3465,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the analyzer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword lower_case_terms: A value indicating whether terms should be lower-cased. Default is - true. - :paramtype lower_case_terms: bool - :keyword pattern: A regular expression pattern to match token separators. Default is an - expression that matches one or more non-word characters. - :paramtype pattern: str - :keyword flags: Regular expression flags. Possible values include: "CANON_EQ", - "CASE_INSENSITIVE", "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". - :paramtype flags: str or ~azure.search.documents.indexes.models.RegexFlags - :keyword stopwords: A list of stopwords. - :paramtype stopwords: list[str] - """ super(PatternAnalyzer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.PatternAnalyzer' # type: str self.lower_case_terms = kwargs.get('lower_case_terms', True) @@ -5077,18 +3478,18 @@ class PatternCaptureTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar patterns: Required. A list of patterns to match against each token. - :vartype patterns: list[str] - :ivar preserve_original: A value indicating whether to return the original token even if one of - the patterns matches. Default is true. - :vartype preserve_original: bool + :type name: str + :param patterns: Required. A list of patterns to match against each token. + :type patterns: list[str] + :param preserve_original: A value indicating whether to return the original token even if one + of the patterns matches. Default is true. + :type preserve_original: bool """ _validation = { @@ -5108,17 +3509,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword patterns: Required. A list of patterns to match against each token. - :paramtype patterns: list[str] - :keyword preserve_original: A value indicating whether to return the original token even if one - of the patterns matches. Default is true. - :paramtype preserve_original: bool - """ super(PatternCaptureTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.PatternCaptureTokenFilter' # type: str self.patterns = kwargs['patterns'] @@ -5130,17 +3520,17 @@ class PatternReplaceCharFilter(CharFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the char filter.Constant filled by + :param odata_type: Required. Identifies the concrete type of the char filter.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the char filter. It must only contain letters, digits, + :type odata_type: str + :param name: Required. The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar pattern: Required. A regular expression pattern. - :vartype pattern: str - :ivar replacement: Required. The replacement text. - :vartype replacement: str + :type name: str + :param pattern: Required. A regular expression pattern. + :type pattern: str + :param replacement: Required. The replacement text. + :type replacement: str """ _validation = { @@ -5161,16 +3551,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the char filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword pattern: Required. A regular expression pattern. - :paramtype pattern: str - :keyword replacement: Required. The replacement text. - :paramtype replacement: str - """ super(PatternReplaceCharFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.PatternReplaceCharFilter' # type: str self.pattern = kwargs['pattern'] @@ -5182,17 +3562,17 @@ class PatternReplaceTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar pattern: Required. A regular expression pattern. - :vartype pattern: str - :ivar replacement: Required. The replacement text. - :vartype replacement: str + :type name: str + :param pattern: Required. A regular expression pattern. + :type pattern: str + :param replacement: Required. The replacement text. + :type replacement: str """ _validation = { @@ -5213,16 +3593,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword pattern: Required. A regular expression pattern. - :paramtype pattern: str - :keyword replacement: Required. The replacement text. - :paramtype replacement: str - """ super(PatternReplaceTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.PatternReplaceTokenFilter' # type: str self.pattern = kwargs['pattern'] @@ -5234,23 +3604,23 @@ class PatternTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar pattern: A regular expression pattern to match token separators. Default is an expression - that matches one or more non-word characters. - :vartype pattern: str - :ivar flags: Regular expression flags. Possible values include: "CANON_EQ", "CASE_INSENSITIVE", - "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". - :vartype flags: str or ~azure.search.documents.indexes.models.RegexFlags - :ivar group: The zero-based ordinal of the matching group in the regular expression pattern to + :type name: str + :param pattern: A regular expression pattern to match token separators. Default is an + expression that matches one or more non-word characters. + :type pattern: str + :param flags: Regular expression flags. Possible values include: "CANON_EQ", + "CASE_INSENSITIVE", "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". + :type flags: str or ~azure.search.documents.indexes.models.RegexFlags + :param group: The zero-based ordinal of the matching group in the regular expression pattern to extract into tokens. Use -1 if you want to use the entire pattern to split the input into tokens, irrespective of matching groups. Default is -1. - :vartype group: int + :type group: int """ _validation = { @@ -5270,22 +3640,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword pattern: A regular expression pattern to match token separators. Default is an - expression that matches one or more non-word characters. - :paramtype pattern: str - :keyword flags: Regular expression flags. Possible values include: "CANON_EQ", - "CASE_INSENSITIVE", "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". - :paramtype flags: str or ~azure.search.documents.indexes.models.RegexFlags - :keyword group: The zero-based ordinal of the matching group in the regular expression pattern - to extract into tokens. Use -1 if you want to use the entire pattern to split the input into - tokens, irrespective of matching groups. Default is -1. - :paramtype group: int - """ super(PatternTokenizer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.PatternTokenizer' # type: str self.pattern = kwargs.get('pattern', "\W+") @@ -5298,242 +3652,49 @@ class PhoneticTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar encoder: The phonetic encoder to use. Default is "metaphone". Possible values include: + :type name: str + :param encoder: The phonetic encoder to use. Default is "metaphone". Possible values include: "metaphone", "doubleMetaphone", "soundex", "refinedSoundex", "caverphone1", "caverphone2", "cologne", "nysiis", "koelnerPhonetik", "haasePhonetik", "beiderMorse". - :vartype encoder: str or ~azure.search.documents.indexes.models.PhoneticEncoder - :ivar replace_original_tokens: A value indicating whether encoded tokens should replace + :type encoder: str or ~azure.search.documents.indexes.models.PhoneticEncoder + :param replace_original_tokens: A value indicating whether encoded tokens should replace original tokens. If false, encoded tokens are added as synonyms. Default is true. - :vartype replace_original_tokens: bool + :type replace_original_tokens: bool """ _validation = { - 'odata_type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'encoder': {'key': 'encoder', 'type': 'str'}, - 'replace_original_tokens': {'key': 'replace', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword encoder: The phonetic encoder to use. Default is "metaphone". Possible values include: - "metaphone", "doubleMetaphone", "soundex", "refinedSoundex", "caverphone1", "caverphone2", - "cologne", "nysiis", "koelnerPhonetik", "haasePhonetik", "beiderMorse". - :paramtype encoder: str or ~azure.search.documents.indexes.models.PhoneticEncoder - :keyword replace_original_tokens: A value indicating whether encoded tokens should replace - original tokens. If false, encoded tokens are added as synonyms. Default is true. - :paramtype replace_original_tokens: bool - """ - super(PhoneticTokenFilter, self).__init__(**kwargs) - self.odata_type = '#Microsoft.Azure.Search.PhoneticTokenFilter' # type: str - self.encoder = kwargs.get('encoder', None) - self.replace_original_tokens = kwargs.get('replace_original_tokens', True) - - -class PIIDetectionSkill(SearchIndexerSkill): - """Using the Text Analytics API, extracts personal information from an input text and gives you the option of masking it. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. - :vartype default_language_code: str - :ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :vartype minimum_precision: float - :ivar masking_mode: A parameter that provides various ways to mask the personal information - detected in the input text. Default is 'none'. Possible values include: "none", "replace". - :vartype masking_mode: str or - ~azure.search.documents.indexes.models.PIIDetectionSkillMaskingMode - :ivar masking_character: The character used to mask the text if the maskingMode parameter is - set to replace. Default is '*'. - :vartype masking_character: str - :ivar model_version: The version of the model to use when calling the Text Analytics service. - It will default to the latest available when not specified. We recommend you do not specify - this value unless absolutely necessary. - :vartype model_version: str - :ivar pii_categories: A list of PII entity categories that should be extracted and masked. - :vartype pii_categories: list[str] - :ivar domain: If specified, will set the PII domain to include only a subset of the entity - categories. Possible values include: 'phi', 'none'. Default is 'none'. - :vartype domain: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - 'minimum_precision': {'maximum': 1, 'minimum': 0}, - 'masking_character': {'max_length': 1, 'min_length': 0}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - 'default_language_code': {'key': 'defaultLanguageCode', 'type': 'str'}, - 'minimum_precision': {'key': 'minimumPrecision', 'type': 'float'}, - 'masking_mode': {'key': 'maskingMode', 'type': 'str'}, - 'masking_character': {'key': 'maskingCharacter', 'type': 'str'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - 'pii_categories': {'key': 'piiCategories', 'type': '[str]'}, - 'domain': {'key': 'domain', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - :paramtype default_language_code: str - :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :paramtype minimum_precision: float - :keyword masking_mode: A parameter that provides various ways to mask the personal information - detected in the input text. Default is 'none'. Possible values include: "none", "replace". - :paramtype masking_mode: str or - ~azure.search.documents.indexes.models.PIIDetectionSkillMaskingMode - :keyword masking_character: The character used to mask the text if the maskingMode parameter is - set to replace. Default is '*'. - :paramtype masking_character: str - :keyword model_version: The version of the model to use when calling the Text Analytics - service. It will default to the latest available when not specified. We recommend you do not - specify this value unless absolutely necessary. - :paramtype model_version: str - :keyword pii_categories: A list of PII entity categories that should be extracted and masked. - :paramtype pii_categories: list[str] - :keyword domain: If specified, will set the PII domain to include only a subset of the entity - categories. Possible values include: 'phi', 'none'. Default is 'none'. - :paramtype domain: str - """ - super(PIIDetectionSkill, self).__init__(**kwargs) - self.odata_type = '#Microsoft.Skills.Text.PIIDetectionSkill' # type: str - self.default_language_code = kwargs.get('default_language_code', None) - self.minimum_precision = kwargs.get('minimum_precision', None) - self.masking_mode = kwargs.get('masking_mode', None) - self.masking_character = kwargs.get('masking_character', None) - self.model_version = kwargs.get('model_version', None) - self.pii_categories = kwargs.get('pii_categories', None) - self.domain = kwargs.get('domain', None) - - -class PrioritizedFields(msrest.serialization.Model): - """Describes the title, content, and keywords fields to be used for semantic ranking, captions, highlights, and answers. - - :ivar title_field: Defines the title field to be used for semantic ranking, captions, - highlights, and answers. If you don't have a title field in your index, leave this blank. - :vartype title_field: ~azure.search.documents.indexes.models.SemanticField - :ivar prioritized_content_fields: Defines the content fields to be used for semantic ranking, - captions, highlights, and answers. For the best result, the selected fields should contain text - in natural language form. The order of the fields in the array represents their priority. - Fields with lower priority may get truncated if the content is long. - :vartype prioritized_content_fields: list[~azure.search.documents.indexes.models.SemanticField] - :ivar prioritized_keywords_fields: Defines the keyword fields to be used for semantic ranking, - captions, highlights, and answers. For the best result, the selected fields should contain a - list of keywords. The order of the fields in the array represents their priority. Fields with - lower priority may get truncated if the content is long. - :vartype prioritized_keywords_fields: - list[~azure.search.documents.indexes.models.SemanticField] - """ + 'odata_type': {'required': True}, + 'name': {'required': True}, + } _attribute_map = { - 'title_field': {'key': 'titleField', 'type': 'SemanticField'}, - 'prioritized_content_fields': {'key': 'prioritizedContentFields', 'type': '[SemanticField]'}, - 'prioritized_keywords_fields': {'key': 'prioritizedKeywordsFields', 'type': '[SemanticField]'}, + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'encoder': {'key': 'encoder', 'type': 'str'}, + 'replace_original_tokens': {'key': 'replace', 'type': 'bool'}, } def __init__( self, **kwargs ): - """ - :keyword title_field: Defines the title field to be used for semantic ranking, captions, - highlights, and answers. If you don't have a title field in your index, leave this blank. - :paramtype title_field: ~azure.search.documents.indexes.models.SemanticField - :keyword prioritized_content_fields: Defines the content fields to be used for semantic - ranking, captions, highlights, and answers. For the best result, the selected fields should - contain text in natural language form. The order of the fields in the array represents their - priority. Fields with lower priority may get truncated if the content is long. - :paramtype prioritized_content_fields: - list[~azure.search.documents.indexes.models.SemanticField] - :keyword prioritized_keywords_fields: Defines the keyword fields to be used for semantic - ranking, captions, highlights, and answers. For the best result, the selected fields should - contain a list of keywords. The order of the fields in the array represents their priority. - Fields with lower priority may get truncated if the content is long. - :paramtype prioritized_keywords_fields: - list[~azure.search.documents.indexes.models.SemanticField] - """ - super(PrioritizedFields, self).__init__(**kwargs) - self.title_field = kwargs.get('title_field', None) - self.prioritized_content_fields = kwargs.get('prioritized_content_fields', None) - self.prioritized_keywords_fields = kwargs.get('prioritized_keywords_fields', None) + super(PhoneticTokenFilter, self).__init__(**kwargs) + self.odata_type = '#Microsoft.Azure.Search.PhoneticTokenFilter' # type: str + self.encoder = kwargs.get('encoder', None) + self.replace_original_tokens = kwargs.get('replace_original_tokens', True) class RequestOptions(msrest.serialization.Model): """Parameter group. - :ivar x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :vartype x_ms_client_request_id: str + :param x_ms_client_request_id: The tracking ID sent with the request to help with debugging. + :type x_ms_client_request_id: str """ _attribute_map = { @@ -5544,10 +3705,6 @@ def __init__( self, **kwargs ): - """ - :keyword x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :paramtype x_ms_client_request_id: str - """ super(RequestOptions, self).__init__(**kwargs) self.x_ms_client_request_id = kwargs.get('x_ms_client_request_id', None) @@ -5557,10 +3714,10 @@ class ResourceCounter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar usage: Required. The resource usage amount. - :vartype usage: long - :ivar quota: The resource amount quota. - :vartype quota: long + :param usage: Required. The resource usage amount. + :type usage: long + :param quota: The resource amount quota. + :type quota: long """ _validation = { @@ -5576,12 +3733,6 @@ def __init__( self, **kwargs ): - """ - :keyword usage: Required. The resource usage amount. - :paramtype usage: long - :keyword quota: The resource amount quota. - :paramtype quota: long - """ super(ResourceCounter, self).__init__(**kwargs) self.usage = kwargs['usage'] self.quota = kwargs.get('quota', None) @@ -5592,17 +3743,17 @@ class ScoringProfile(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the scoring profile. - :vartype name: str - :ivar text_weights: Parameters that boost scoring based on text matches in certain index + :param name: Required. The name of the scoring profile. + :type name: str + :param text_weights: Parameters that boost scoring based on text matches in certain index fields. - :vartype text_weights: ~azure.search.documents.indexes.models.TextWeights - :ivar functions: The collection of functions that influence the scoring of documents. - :vartype functions: list[~azure.search.documents.indexes.models.ScoringFunction] - :ivar function_aggregation: A value indicating how the results of individual scoring functions + :type text_weights: ~azure.search.documents.indexes.models.TextWeights + :param functions: The collection of functions that influence the scoring of documents. + :type functions: list[~azure.search.documents.indexes.models.ScoringFunction] + :param function_aggregation: A value indicating how the results of individual scoring functions should be combined. Defaults to "Sum". Ignored if there are no scoring functions. Possible values include: "sum", "average", "minimum", "maximum", "firstMatching". - :vartype function_aggregation: str or + :type function_aggregation: str or ~azure.search.documents.indexes.models.ScoringFunctionAggregation """ @@ -5621,20 +3772,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the scoring profile. - :paramtype name: str - :keyword text_weights: Parameters that boost scoring based on text matches in certain index - fields. - :paramtype text_weights: ~azure.search.documents.indexes.models.TextWeights - :keyword functions: The collection of functions that influence the scoring of documents. - :paramtype functions: list[~azure.search.documents.indexes.models.ScoringFunction] - :keyword function_aggregation: A value indicating how the results of individual scoring - functions should be combined. Defaults to "Sum". Ignored if there are no scoring functions. - Possible values include: "sum", "average", "minimum", "maximum", "firstMatching". - :paramtype function_aggregation: str or - ~azure.search.documents.indexes.models.ScoringFunctionAggregation - """ super(ScoringProfile, self).__init__(**kwargs) self.name = kwargs['name'] self.text_weights = kwargs.get('text_weights', None) @@ -5642,50 +3779,6 @@ def __init__( self.function_aggregation = kwargs.get('function_aggregation', None) -class SearchAlias(msrest.serialization.Model): - """Represents an index alias, which describes a mapping from the alias name to an index. The alias name can be used in place of the index name for supported operations. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the alias. - :vartype name: str - :ivar indexes: Required. The name of the index this alias maps to. Only one index name may be - specified. - :vartype indexes: list[str] - :ivar e_tag: The ETag of the alias. - :vartype e_tag: str - """ - - _validation = { - 'name': {'required': True}, - 'indexes': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'indexes': {'key': 'indexes', 'type': '[str]'}, - 'e_tag': {'key': '@odata\\.etag', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the alias. - :paramtype name: str - :keyword indexes: Required. The name of the index this alias maps to. Only one index name may - be specified. - :paramtype indexes: list[str] - :keyword e_tag: The ETag of the alias. - :paramtype e_tag: str - """ - super(SearchAlias, self).__init__(**kwargs) - self.name = kwargs['name'] - self.indexes = kwargs['indexes'] - self.e_tag = kwargs.get('e_tag', None) - - class SearchError(msrest.serialization.Model): """Describes an error condition for the Azure Cognitive Search API. @@ -5717,8 +3810,6 @@ def __init__( self, **kwargs ): - """ - """ super(SearchError, self).__init__(**kwargs) self.code = None self.message = None @@ -5730,26 +3821,26 @@ class SearchField(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the field, which must be unique within the fields collection + :param name: Required. The name of the field, which must be unique within the fields collection of the index or parent field. - :vartype name: str - :ivar type: Required. The data type of the field. Possible values include: "Edm.String", + :type name: str + :param type: Required. The data type of the field. Possible values include: "Edm.String", "Edm.Int32", "Edm.Int64", "Edm.Double", "Edm.Boolean", "Edm.DateTimeOffset", "Edm.GeographyPoint", "Edm.ComplexType". - :vartype type: str or ~azure.search.documents.indexes.models.SearchFieldDataType - :ivar key: A value indicating whether the field uniquely identifies documents in the index. + :type type: str or ~azure.search.documents.indexes.models.SearchFieldDataType + :param key: A value indicating whether the field uniquely identifies documents in the index. Exactly one top-level field in each index must be chosen as the key field and it must be of type Edm.String. Key fields can be used to look up documents directly and update or delete specific documents. Default is false for simple fields and null for complex fields. - :vartype key: bool - :ivar retrievable: A value indicating whether the field can be returned in a search result. You - can disable this option if you want to use a field (for example, margin) as a filter, sorting, - or scoring mechanism but do not want the field to be visible to the end user. This property - must be true for key fields, and it must be null for complex fields. This property can be - changed on existing fields. Enabling this property does not cause any increase in index storage - requirements. Default is true for simple fields and null for complex fields. - :vartype retrievable: bool - :ivar searchable: A value indicating whether the field is full-text searchable. This means it + :type key: bool + :param retrievable: A value indicating whether the field can be returned in a search result. + You can disable this option if you want to use a field (for example, margin) as a filter, + sorting, or scoring mechanism but do not want the field to be visible to the end user. This + property must be true for key fields, and it must be null for complex fields. This property can + be changed on existing fields. Enabling this property does not cause any increase in index + storage requirements. Default is true for simple fields and null for complex fields. + :type retrievable: bool + :param searchable: A value indicating whether the field is full-text searchable. This means it will undergo analysis such as word-breaking during indexing. If you set a searchable field to a value like "sunny day", internally it will be split into the individual tokens "sunny" and "day". This enables full-text searches for these terms. Fields of type Edm.String or @@ -5758,15 +3849,15 @@ class SearchField(msrest.serialization.Model): consume extra space in your index since Azure Cognitive Search will store an additional tokenized version of the field value for full-text searches. If you want to save space in your index and you don't need a field to be included in searches, set searchable to false. - :vartype searchable: bool - :ivar filterable: A value indicating whether to enable the field to be referenced in $filter + :type searchable: bool + :param filterable: A value indicating whether to enable the field to be referenced in $filter queries. filterable differs from searchable in how strings are handled. Fields of type Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are for exact matches only. For example, if you set such a field f to "sunny day", $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. This property must be null for complex fields. Default is true for simple fields and null for complex fields. - :vartype filterable: bool - :ivar sortable: A value indicating whether to enable the field to be referenced in $orderby + :type filterable: bool + :param sortable: A value indicating whether to enable the field to be referenced in $orderby expressions. By default Azure Cognitive Search sorts results by score, but in many experiences users will want to sort by fields in the documents. A simple field can be sortable only if it is single-valued (it has a single value in the scope of the parent document). Simple collection @@ -5776,15 +3867,15 @@ class SearchField(msrest.serialization.Model): cannot be sortable and the sortable property must be null for such fields. The default for sortable is true for single-valued simple fields, false for multi-valued simple fields, and null for complex fields. - :vartype sortable: bool - :ivar facetable: A value indicating whether to enable the field to be referenced in facet + :type sortable: bool + :param facetable: A value indicating whether to enable the field to be referenced in facet queries. Typically used in a presentation of search results that includes hit count by category (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple fields. - :vartype facetable: bool - :ivar analyzer: The name of the analyzer to use for the field. This option can be used only + :type facetable: bool + :param analyzer: The name of the analyzer to use for the field. This option can be used only with searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", @@ -5804,8 +3895,8 @@ class SearchField(msrest.serialization.Model): "th.microsoft", "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", "whitespace". - :vartype analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :ivar search_analyzer: The name of the analyzer used at search time for the field. This option + :type analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName + :param search_analyzer: The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. This @@ -5827,12 +3918,12 @@ class SearchField(msrest.serialization.Model): "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", "whitespace". - :vartype search_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :ivar index_analyzer: The name of the analyzer used at indexing time for the field. This option - can be used only with searchable fields. It must be set together with searchAnalyzer and it - cannot be set together with the analyzer option. This property cannot be set to the name of a - language analyzer; use the analyzer property instead if you need a language analyzer. Once the - analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. + :type search_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName + :param index_analyzer: The name of the analyzer used at indexing time for the field. This + option can be used only with searchable fields. It must be set together with searchAnalyzer and + it cannot be set together with the analyzer option. This property cannot be set to the name of + a language analyzer; use the analyzer property instead if you need a language analyzer. Once + the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", @@ -5850,21 +3941,16 @@ class SearchField(msrest.serialization.Model): "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", "whitespace". - :vartype index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :ivar normalizer: The name of the normalizer to use for the field. This option can be used only - with fields with filterable, sortable, or facetable enabled. Once the normalizer is chosen, it - cannot be changed for the field. Must be null for complex fields. Possible values include: - "asciifolding", "elision", "lowercase", "standard", "uppercase". - :vartype normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :ivar synonym_maps: A list of the names of synonym maps to associate with this field. This + :type index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName + :param synonym_maps: A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules in the synonym map. This attribute can be changed on existing fields. Must be null or an empty collection for complex fields. - :vartype synonym_maps: list[str] - :ivar fields: A list of sub-fields if this is a field of type Edm.ComplexType or + :type synonym_maps: list[str] + :param fields: A list of sub-fields if this is a field of type Edm.ComplexType or Collection(Edm.ComplexType). Must be null or empty for simple fields. - :vartype fields: list[~azure.search.documents.indexes.models.SearchField] + :type fields: list[~azure.search.documents.indexes.models.SearchField] """ _validation = { @@ -5884,7 +3970,6 @@ class SearchField(msrest.serialization.Model): 'analyzer': {'key': 'analyzer', 'type': 'str'}, 'search_analyzer': {'key': 'searchAnalyzer', 'type': 'str'}, 'index_analyzer': {'key': 'indexAnalyzer', 'type': 'str'}, - 'normalizer': {'key': 'normalizer', 'type': 'str'}, 'synonym_maps': {'key': 'synonymMaps', 'type': '[str]'}, 'fields': {'key': 'fields', 'type': '[SearchField]'}, } @@ -5893,143 +3978,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the field, which must be unique within the fields - collection of the index or parent field. - :paramtype name: str - :keyword type: Required. The data type of the field. Possible values include: "Edm.String", - "Edm.Int32", "Edm.Int64", "Edm.Double", "Edm.Boolean", "Edm.DateTimeOffset", - "Edm.GeographyPoint", "Edm.ComplexType". - :paramtype type: str or ~azure.search.documents.indexes.models.SearchFieldDataType - :keyword key: A value indicating whether the field uniquely identifies documents in the index. - Exactly one top-level field in each index must be chosen as the key field and it must be of - type Edm.String. Key fields can be used to look up documents directly and update or delete - specific documents. Default is false for simple fields and null for complex fields. - :paramtype key: bool - :keyword retrievable: A value indicating whether the field can be returned in a search result. - You can disable this option if you want to use a field (for example, margin) as a filter, - sorting, or scoring mechanism but do not want the field to be visible to the end user. This - property must be true for key fields, and it must be null for complex fields. This property can - be changed on existing fields. Enabling this property does not cause any increase in index - storage requirements. Default is true for simple fields and null for complex fields. - :paramtype retrievable: bool - :keyword searchable: A value indicating whether the field is full-text searchable. This means - it will undergo analysis such as word-breaking during indexing. If you set a searchable field - to a value like "sunny day", internally it will be split into the individual tokens "sunny" and - "day". This enables full-text searches for these terms. Fields of type Edm.String or - Collection(Edm.String) are searchable by default. This property must be false for simple fields - of other non-string data types, and it must be null for complex fields. Note: searchable fields - consume extra space in your index since Azure Cognitive Search will store an additional - tokenized version of the field value for full-text searches. If you want to save space in your - index and you don't need a field to be included in searches, set searchable to false. - :paramtype searchable: bool - :keyword filterable: A value indicating whether to enable the field to be referenced in $filter - queries. filterable differs from searchable in how strings are handled. Fields of type - Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so - comparisons are for exact matches only. For example, if you set such a field f to "sunny day", - $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. This property - must be null for complex fields. Default is true for simple fields and null for complex fields. - :paramtype filterable: bool - :keyword sortable: A value indicating whether to enable the field to be referenced in $orderby - expressions. By default Azure Cognitive Search sorts results by score, but in many experiences - users will want to sort by fields in the documents. A simple field can be sortable only if it - is single-valued (it has a single value in the scope of the parent document). Simple collection - fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex - collections are also multi-valued, and therefore cannot be sortable. This is true whether it's - an immediate parent field, or an ancestor field, that's the complex collection. Complex fields - cannot be sortable and the sortable property must be null for such fields. The default for - sortable is true for single-valued simple fields, false for multi-valued simple fields, and - null for complex fields. - :paramtype sortable: bool - :keyword facetable: A value indicating whether to enable the field to be referenced in facet - queries. Typically used in a presentation of search results that includes hit count by category - (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so - on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or - Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple - fields. - :paramtype facetable: bool - :keyword analyzer: The name of the analyzer to use for the field. This option can be used only - with searchable fields and it can't be set together with either searchAnalyzer or - indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null - for complex fields. Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", - "bn.microsoft", "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", - "zh-Hans.microsoft", "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", - "cs.microsoft", "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", - "en.microsoft", "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", - "fr.lucene", "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", - "gu.microsoft", "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", - "is.microsoft", "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", - "ja.microsoft", "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", - "lv.lucene", "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", - "no.lucene", "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", - "pt-PT.microsoft", "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", - "ru.lucene", "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", - "es.microsoft", "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", - "th.microsoft", "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", - "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", - "simple", "stop", "whitespace". - :paramtype analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :keyword search_analyzer: The name of the analyzer used at search time for the field. This - option can be used only with searchable fields. It must be set together with indexAnalyzer and - it cannot be set together with the analyzer option. This property cannot be set to the name of - a language analyzer; use the analyzer property instead if you need a language analyzer. This - analyzer can be updated on an existing field. Must be null for complex fields. Possible values - include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft", - "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh-Hans.lucene", - "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", "cs.lucene", - "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", "en.lucene", - "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", "gl.lucene", - "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", "he.microsoft", - "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", "id.microsoft", - "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", "ja.lucene", - "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", "lt.microsoft", - "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", "fa.lucene", - "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft", - "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene", - "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft", - "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft", - "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", - "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", - "whitespace". - :paramtype search_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :keyword index_analyzer: The name of the analyzer used at indexing time for the field. This - option can be used only with searchable fields. It must be set together with searchAnalyzer and - it cannot be set together with the analyzer option. This property cannot be set to the name of - a language analyzer; use the analyzer property instead if you need a language analyzer. Once - the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. - Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", - "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", - "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", - "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", - "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", - "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", - "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", - "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", - "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", - "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", - "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft", - "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene", - "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft", - "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft", - "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", - "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", - "whitespace". - :paramtype index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :keyword normalizer: The name of the normalizer to use for the field. This option can be used - only with fields with filterable, sortable, or facetable enabled. Once the normalizer is - chosen, it cannot be changed for the field. Must be null for complex fields. Possible values - include: "asciifolding", "elision", "lowercase", "standard", "uppercase". - :paramtype normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :keyword synonym_maps: A list of the names of synonym maps to associate with this field. This - option can be used only with searchable fields. Currently only one synonym map per field is - supported. Assigning a synonym map to a field ensures that query terms targeting that field are - expanded at query-time using the rules in the synonym map. This attribute can be changed on - existing fields. Must be null or an empty collection for complex fields. - :paramtype synonym_maps: list[str] - :keyword fields: A list of sub-fields if this is a field of type Edm.ComplexType or - Collection(Edm.ComplexType). Must be null or empty for simple fields. - :paramtype fields: list[~azure.search.documents.indexes.models.SearchField] - """ super(SearchField, self).__init__(**kwargs) self.name = kwargs['name'] self.type = kwargs['type'] @@ -6042,7 +3990,6 @@ def __init__( self.analyzer = kwargs.get('analyzer', None) self.search_analyzer = kwargs.get('search_analyzer', None) self.index_analyzer = kwargs.get('index_analyzer', None) - self.normalizer = kwargs.get('normalizer', None) self.synonym_maps = kwargs.get('synonym_maps', None) self.fields = kwargs.get('fields', None) @@ -6052,31 +3999,29 @@ class SearchIndex(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the index. - :vartype name: str - :ivar fields: Required. The fields of the index. - :vartype fields: list[~azure.search.documents.indexes.models.SearchField] - :ivar scoring_profiles: The scoring profiles for the index. - :vartype scoring_profiles: list[~azure.search.documents.indexes.models.ScoringProfile] - :ivar default_scoring_profile: The name of the scoring profile to use if none is specified in + :param name: Required. The name of the index. + :type name: str + :param fields: Required. The fields of the index. + :type fields: list[~azure.search.documents.indexes.models.SearchField] + :param scoring_profiles: The scoring profiles for the index. + :type scoring_profiles: list[~azure.search.documents.indexes.models.ScoringProfile] + :param default_scoring_profile: The name of the scoring profile to use if none is specified in the query. If this property is not set and no scoring profile is specified in the query, then default scoring (tf-idf) will be used. - :vartype default_scoring_profile: str - :ivar cors_options: Options to control Cross-Origin Resource Sharing (CORS) for the index. - :vartype cors_options: ~azure.search.documents.indexes.models.CorsOptions - :ivar suggesters: The suggesters for the index. - :vartype suggesters: list[~azure.search.documents.indexes.models.Suggester] - :ivar analyzers: The analyzers for the index. - :vartype analyzers: list[~azure.search.documents.indexes.models.LexicalAnalyzer] - :ivar tokenizers: The tokenizers for the index. - :vartype tokenizers: list[~azure.search.documents.indexes.models.LexicalTokenizer] - :ivar token_filters: The token filters for the index. - :vartype token_filters: list[~azure.search.documents.indexes.models.TokenFilter] - :ivar char_filters: The character filters for the index. - :vartype char_filters: list[~azure.search.documents.indexes.models.CharFilter] - :ivar normalizers: The normalizers for the index. - :vartype normalizers: list[~azure.search.documents.indexes.models.LexicalNormalizer] - :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault. + :type default_scoring_profile: str + :param cors_options: Options to control Cross-Origin Resource Sharing (CORS) for the index. + :type cors_options: ~azure.search.documents.indexes.models.CorsOptions + :param suggesters: The suggesters for the index. + :type suggesters: list[~azure.search.documents.indexes.models.Suggester] + :param analyzers: The analyzers for the index. + :type analyzers: list[~azure.search.documents.indexes.models.LexicalAnalyzer] + :param tokenizers: The tokenizers for the index. + :type tokenizers: list[~azure.search.documents.indexes.models.LexicalTokenizer] + :param token_filters: The token filters for the index. + :type token_filters: list[~azure.search.documents.indexes.models.TokenFilter] + :param char_filters: The character filters for the index. + :type char_filters: list[~azure.search.documents.indexes.models.CharFilter] + :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive @@ -6084,17 +4029,14 @@ class SearchIndex(msrest.serialization.Model): needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :ivar similarity: The type of similarity algorithm to be used when scoring and ranking the + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :param similarity: The type of similarity algorithm to be used when scoring and ranking the documents matching a search query. The similarity algorithm can only be defined at index creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity algorithm is used. - :vartype similarity: ~azure.search.documents.indexes.models.Similarity - :ivar semantic_settings: Defines parameters for a search index that influence semantic - capabilities. - :vartype semantic_settings: ~azure.search.documents.indexes.models.SemanticSettings - :ivar e_tag: The ETag of the index. - :vartype e_tag: str + :type similarity: ~azure.search.documents.indexes.models.Similarity + :param e_tag: The ETag of the index. + :type e_tag: str """ _validation = { @@ -6113,10 +4055,8 @@ class SearchIndex(msrest.serialization.Model): 'tokenizers': {'key': 'tokenizers', 'type': '[LexicalTokenizer]'}, 'token_filters': {'key': 'tokenFilters', 'type': '[TokenFilter]'}, 'char_filters': {'key': 'charFilters', 'type': '[CharFilter]'}, - 'normalizers': {'key': 'normalizers', 'type': '[LexicalNormalizer]'}, 'encryption_key': {'key': 'encryptionKey', 'type': 'SearchResourceEncryptionKey'}, 'similarity': {'key': 'similarity', 'type': 'Similarity'}, - 'semantic_settings': {'key': 'semantic', 'type': 'SemanticSettings'}, 'e_tag': {'key': '@odata\\.etag', 'type': 'str'}, } @@ -6124,51 +4064,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the index. - :paramtype name: str - :keyword fields: Required. The fields of the index. - :paramtype fields: list[~azure.search.documents.indexes.models.SearchField] - :keyword scoring_profiles: The scoring profiles for the index. - :paramtype scoring_profiles: list[~azure.search.documents.indexes.models.ScoringProfile] - :keyword default_scoring_profile: The name of the scoring profile to use if none is specified - in the query. If this property is not set and no scoring profile is specified in the query, - then default scoring (tf-idf) will be used. - :paramtype default_scoring_profile: str - :keyword cors_options: Options to control Cross-Origin Resource Sharing (CORS) for the index. - :paramtype cors_options: ~azure.search.documents.indexes.models.CorsOptions - :keyword suggesters: The suggesters for the index. - :paramtype suggesters: list[~azure.search.documents.indexes.models.Suggester] - :keyword analyzers: The analyzers for the index. - :paramtype analyzers: list[~azure.search.documents.indexes.models.LexicalAnalyzer] - :keyword tokenizers: The tokenizers for the index. - :paramtype tokenizers: list[~azure.search.documents.indexes.models.LexicalTokenizer] - :keyword token_filters: The token filters for the index. - :paramtype token_filters: list[~azure.search.documents.indexes.models.TokenFilter] - :keyword char_filters: The character filters for the index. - :paramtype char_filters: list[~azure.search.documents.indexes.models.CharFilter] - :keyword normalizers: The normalizers for the index. - :paramtype normalizers: list[~azure.search.documents.indexes.models.LexicalNormalizer] - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your data when you - want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive - Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive - Search will ignore attempts to set this property to null. You can change this property as - needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with - customer-managed keys is not available for free search services, and is only available for paid - services created on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :keyword similarity: The type of similarity algorithm to be used when scoring and ranking the - documents matching a search query. The similarity algorithm can only be defined at index - creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity - algorithm is used. - :paramtype similarity: ~azure.search.documents.indexes.models.Similarity - :keyword semantic_settings: Defines parameters for a search index that influence semantic - capabilities. - :paramtype semantic_settings: ~azure.search.documents.indexes.models.SemanticSettings - :keyword e_tag: The ETag of the index. - :paramtype e_tag: str - """ super(SearchIndex, self).__init__(**kwargs) self.name = kwargs['name'] self.fields = kwargs['fields'] @@ -6180,10 +4075,8 @@ def __init__( self.tokenizers = kwargs.get('tokenizers', None) self.token_filters = kwargs.get('token_filters', None) self.char_filters = kwargs.get('char_filters', None) - self.normalizers = kwargs.get('normalizers', None) self.encryption_key = kwargs.get('encryption_key', None) self.similarity = kwargs.get('similarity', None) - self.semantic_settings = kwargs.get('semantic_settings', None) self.e_tag = kwargs.get('e_tag', None) @@ -6192,32 +4085,32 @@ class SearchIndexer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the indexer. - :vartype name: str - :ivar description: The description of the indexer. - :vartype description: str - :ivar data_source_name: Required. The name of the datasource from which this indexer reads + :param name: Required. The name of the indexer. + :type name: str + :param description: The description of the indexer. + :type description: str + :param data_source_name: Required. The name of the datasource from which this indexer reads data. - :vartype data_source_name: str - :ivar skillset_name: The name of the skillset executing with this indexer. - :vartype skillset_name: str - :ivar target_index_name: Required. The name of the index to which this indexer writes data. - :vartype target_index_name: str - :ivar schedule: The schedule for this indexer. - :vartype schedule: ~azure.search.documents.indexes.models.IndexingSchedule - :ivar parameters: Parameters for indexer execution. - :vartype parameters: ~azure.search.documents.indexes.models.IndexingParameters - :ivar field_mappings: Defines mappings between fields in the data source and corresponding + :type data_source_name: str + :param skillset_name: The name of the skillset executing with this indexer. + :type skillset_name: str + :param target_index_name: Required. The name of the index to which this indexer writes data. + :type target_index_name: str + :param schedule: The schedule for this indexer. + :type schedule: ~azure.search.documents.indexes.models.IndexingSchedule + :param parameters: Parameters for indexer execution. + :type parameters: ~azure.search.documents.indexes.models.IndexingParameters + :param field_mappings: Defines mappings between fields in the data source and corresponding target fields in the index. - :vartype field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] - :ivar output_field_mappings: Output field mappings are applied after enrichment and immediately - before indexing. - :vartype output_field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] - :ivar is_disabled: A value indicating whether the indexer is disabled. Default is false. - :vartype is_disabled: bool - :ivar e_tag: The ETag of the indexer. - :vartype e_tag: str - :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault. + :type field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] + :param output_field_mappings: Output field mappings are applied after enrichment and + immediately before indexing. + :type output_field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] + :param is_disabled: A value indicating whether the indexer is disabled. Default is false. + :type is_disabled: bool + :param e_tag: The ETag of the indexer. + :type e_tag: str + :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your indexer definition (as well as indexer execution status) when you want full assurance that no one, not even Microsoft, can decrypt them in Azure Cognitive Search. Once you have encrypted your @@ -6226,10 +4119,7 @@ class SearchIndexer(msrest.serialization.Model): rotate your encryption key; Your indexer definition (and indexer execution status) will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :ivar cache: Adds caching to an enrichment pipeline to allow for incremental modification steps - without having to rebuild the index every time. - :vartype cache: ~azure.search.documents.indexes.models.SearchIndexerCache + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey """ _validation = { @@ -6251,53 +4141,12 @@ class SearchIndexer(msrest.serialization.Model): 'is_disabled': {'key': 'disabled', 'type': 'bool'}, 'e_tag': {'key': '@odata\\.etag', 'type': 'str'}, 'encryption_key': {'key': 'encryptionKey', 'type': 'SearchResourceEncryptionKey'}, - 'cache': {'key': 'cache', 'type': 'SearchIndexerCache'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the indexer. - :paramtype name: str - :keyword description: The description of the indexer. - :paramtype description: str - :keyword data_source_name: Required. The name of the datasource from which this indexer reads - data. - :paramtype data_source_name: str - :keyword skillset_name: The name of the skillset executing with this indexer. - :paramtype skillset_name: str - :keyword target_index_name: Required. The name of the index to which this indexer writes data. - :paramtype target_index_name: str - :keyword schedule: The schedule for this indexer. - :paramtype schedule: ~azure.search.documents.indexes.models.IndexingSchedule - :keyword parameters: Parameters for indexer execution. - :paramtype parameters: ~azure.search.documents.indexes.models.IndexingParameters - :keyword field_mappings: Defines mappings between fields in the data source and corresponding - target fields in the index. - :paramtype field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] - :keyword output_field_mappings: Output field mappings are applied after enrichment and - immediately before indexing. - :paramtype output_field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] - :keyword is_disabled: A value indicating whether the indexer is disabled. Default is false. - :paramtype is_disabled: bool - :keyword e_tag: The ETag of the indexer. - :paramtype e_tag: str - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your indexer - definition (as well as indexer execution status) when you want full assurance that no one, not - even Microsoft, can decrypt them in Azure Cognitive Search. Once you have encrypted your - indexer definition, it will always remain encrypted. Azure Cognitive Search will ignore - attempts to set this property to null. You can change this property as needed if you want to - rotate your encryption key; Your indexer definition (and indexer execution status) will be - unaffected. Encryption with customer-managed keys is not available for free search services, - and is only available for paid services created on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :keyword cache: Adds caching to an enrichment pipeline to allow for incremental modification - steps without having to rebuild the index every time. - :paramtype cache: ~azure.search.documents.indexes.models.SearchIndexerCache - """ + } + + def __init__( + self, + **kwargs + ): super(SearchIndexer, self).__init__(**kwargs) self.name = kwargs['name'] self.description = kwargs.get('description', None) @@ -6311,38 +4160,6 @@ def __init__( self.is_disabled = kwargs.get('is_disabled', False) self.e_tag = kwargs.get('e_tag', None) self.encryption_key = kwargs.get('encryption_key', None) - self.cache = kwargs.get('cache', None) - - -class SearchIndexerCache(msrest.serialization.Model): - """SearchIndexerCache. - - :ivar storage_connection_string: The connection string to the storage account where the cache - data will be persisted. - :vartype storage_connection_string: str - :ivar enable_reprocessing: Specifies whether incremental reprocessing is enabled. - :vartype enable_reprocessing: bool - """ - - _attribute_map = { - 'storage_connection_string': {'key': 'storageConnectionString', 'type': 'str'}, - 'enable_reprocessing': {'key': 'enableReprocessing', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword storage_connection_string: The connection string to the storage account where the - cache data will be persisted. - :paramtype storage_connection_string: str - :keyword enable_reprocessing: Specifies whether incremental reprocessing is enabled. - :paramtype enable_reprocessing: bool - """ - super(SearchIndexerCache, self).__init__(**kwargs) - self.storage_connection_string = kwargs.get('storage_connection_string', None) - self.enable_reprocessing = kwargs.get('enable_reprocessing', None) class SearchIndexerDataContainer(msrest.serialization.Model): @@ -6350,12 +4167,12 @@ class SearchIndexerDataContainer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the table or view (for Azure SQL data source) or collection + :param name: Required. The name of the table or view (for Azure SQL data source) or collection (for CosmosDB data source) that will be indexed. - :vartype name: str - :ivar query: A query that is applied to this data container. The syntax and meaning of this + :type name: str + :param query: A query that is applied to this data container. The syntax and meaning of this parameter is datasource-specific. Not supported by Azure SQL datasources. - :vartype query: str + :type query: str """ _validation = { @@ -6371,112 +4188,36 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the table or view (for Azure SQL data source) or - collection (for CosmosDB data source) that will be indexed. - :paramtype name: str - :keyword query: A query that is applied to this data container. The syntax and meaning of this - parameter is datasource-specific. Not supported by Azure SQL datasources. - :paramtype query: str - """ super(SearchIndexerDataContainer, self).__init__(**kwargs) self.name = kwargs['name'] self.query = kwargs.get('query', None) -class SearchIndexerDataIdentity(msrest.serialization.Model): - """Abstract base type for data identities. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SearchIndexerDataNoneIdentity, SearchIndexerDataUserAssignedIdentity. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the identity.Constant filled by - server. - :vartype odata_type: str - """ - - _validation = { - 'odata_type': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - } - - _subtype_map = { - 'odata_type': {'#Microsoft.Azure.Search.SearchIndexerDataNoneIdentity': 'SearchIndexerDataNoneIdentity', '#Microsoft.Azure.Search.SearchIndexerDataUserAssignedIdentity': 'SearchIndexerDataUserAssignedIdentity'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SearchIndexerDataIdentity, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - - -class SearchIndexerDataNoneIdentity(SearchIndexerDataIdentity): - """Clears the identity property of a datasource. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the identity.Constant filled by - server. - :vartype odata_type: str - """ - - _validation = { - 'odata_type': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SearchIndexerDataNoneIdentity, self).__init__(**kwargs) - self.odata_type = '#Microsoft.Azure.Search.SearchIndexerDataNoneIdentity' # type: str - - class SearchIndexerDataSource(msrest.serialization.Model): """Represents a datasource definition, which can be used to configure an indexer. All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the datasource. - :vartype name: str - :ivar description: The description of the datasource. - :vartype description: str - :ivar type: Required. The type of the datasource. Possible values include: "azuresql", + :param name: Required. The name of the datasource. + :type name: str + :param description: The description of the datasource. + :type description: str + :param type: Required. The type of the datasource. Possible values include: "azuresql", "cosmosdb", "azureblob", "azuretable", "mysql", "adlsgen2". - :vartype type: str or ~azure.search.documents.indexes.models.SearchIndexerDataSourceType - :ivar credentials: Required. Credentials for the datasource. - :vartype credentials: ~azure.search.documents.indexes.models.DataSourceCredentials - :ivar container: Required. The data container for the datasource. - :vartype container: ~azure.search.documents.indexes.models.SearchIndexerDataContainer - :ivar identity: An explicit managed identity to use for this datasource. If not specified and - the connection string is a managed identity, the system-assigned managed identity is used. If - not specified, the value remains unchanged. If "none" is specified, the value of this property - is cleared. - :vartype identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity - :ivar data_change_detection_policy: The data change detection policy for the datasource. - :vartype data_change_detection_policy: + :type type: str or ~azure.search.documents.indexes.models.SearchIndexerDataSourceType + :param credentials: Required. Credentials for the datasource. + :type credentials: ~azure.search.documents.indexes.models.DataSourceCredentials + :param container: Required. The data container for the datasource. + :type container: ~azure.search.documents.indexes.models.SearchIndexerDataContainer + :param data_change_detection_policy: The data change detection policy for the datasource. + :type data_change_detection_policy: ~azure.search.documents.indexes.models.DataChangeDetectionPolicy - :ivar data_deletion_detection_policy: The data deletion detection policy for the datasource. - :vartype data_deletion_detection_policy: + :param data_deletion_detection_policy: The data deletion detection policy for the datasource. + :type data_deletion_detection_policy: ~azure.search.documents.indexes.models.DataDeletionDetectionPolicy - :ivar e_tag: The ETag of the data source. - :vartype e_tag: str - :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault. + :param e_tag: The ETag of the data source. + :type e_tag: str + :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your datasource definition when you want full assurance that no one, not even Microsoft, can decrypt your data source definition in Azure Cognitive Search. Once you have encrypted your data source @@ -6485,7 +4226,7 @@ class SearchIndexerDataSource(msrest.serialization.Model): encryption key; Your datasource definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey """ _validation = { @@ -6501,7 +4242,6 @@ class SearchIndexerDataSource(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, 'credentials': {'key': 'credentials', 'type': 'DataSourceCredentials'}, 'container': {'key': 'container', 'type': 'SearchIndexerDataContainer'}, - 'identity': {'key': 'identity', 'type': 'SearchIndexerDataIdentity'}, 'data_change_detection_policy': {'key': 'dataChangeDetectionPolicy', 'type': 'DataChangeDetectionPolicy'}, 'data_deletion_detection_policy': {'key': 'dataDeletionDetectionPolicy', 'type': 'DataDeletionDetectionPolicy'}, 'e_tag': {'key': '@odata\\.etag', 'type': 'str'}, @@ -6512,96 +4252,18 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the datasource. - :paramtype name: str - :keyword description: The description of the datasource. - :paramtype description: str - :keyword type: Required. The type of the datasource. Possible values include: "azuresql", - "cosmosdb", "azureblob", "azuretable", "mysql", "adlsgen2". - :paramtype type: str or ~azure.search.documents.indexes.models.SearchIndexerDataSourceType - :keyword credentials: Required. Credentials for the datasource. - :paramtype credentials: ~azure.search.documents.indexes.models.DataSourceCredentials - :keyword container: Required. The data container for the datasource. - :paramtype container: ~azure.search.documents.indexes.models.SearchIndexerDataContainer - :keyword identity: An explicit managed identity to use for this datasource. If not specified - and the connection string is a managed identity, the system-assigned managed identity is used. - If not specified, the value remains unchanged. If "none" is specified, the value of this - property is cleared. - :paramtype identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity - :keyword data_change_detection_policy: The data change detection policy for the datasource. - :paramtype data_change_detection_policy: - ~azure.search.documents.indexes.models.DataChangeDetectionPolicy - :keyword data_deletion_detection_policy: The data deletion detection policy for the datasource. - :paramtype data_deletion_detection_policy: - ~azure.search.documents.indexes.models.DataDeletionDetectionPolicy - :keyword e_tag: The ETag of the data source. - :paramtype e_tag: str - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your datasource - definition when you want full assurance that no one, not even Microsoft, can decrypt your data - source definition in Azure Cognitive Search. Once you have encrypted your data source - definition, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set - this property to null. You can change this property as needed if you want to rotate your - encryption key; Your datasource definition will be unaffected. Encryption with customer-managed - keys is not available for free search services, and is only available for paid services created - on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - """ super(SearchIndexerDataSource, self).__init__(**kwargs) self.name = kwargs['name'] self.description = kwargs.get('description', None) self.type = kwargs['type'] self.credentials = kwargs['credentials'] self.container = kwargs['container'] - self.identity = kwargs.get('identity', None) self.data_change_detection_policy = kwargs.get('data_change_detection_policy', None) self.data_deletion_detection_policy = kwargs.get('data_deletion_detection_policy', None) self.e_tag = kwargs.get('e_tag', None) self.encryption_key = kwargs.get('encryption_key', None) -class SearchIndexerDataUserAssignedIdentity(SearchIndexerDataIdentity): - """Specifies the identity for a datasource to use. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the identity.Constant filled by - server. - :vartype odata_type: str - :ivar user_assigned_identity: Required. The fully qualified Azure resource Id of a user - assigned managed identity typically in the form - "/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId" - that should have been assigned to the search service. - :vartype user_assigned_identity: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'user_assigned_identity': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword user_assigned_identity: Required. The fully qualified Azure resource Id of a user - assigned managed identity typically in the form - "/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId" - that should have been assigned to the search service. - :paramtype user_assigned_identity: str - """ - super(SearchIndexerDataUserAssignedIdentity, self).__init__(**kwargs) - self.odata_type = '#Microsoft.Azure.Search.SearchIndexerDataUserAssignedIdentity' # type: str - self.user_assigned_identity = kwargs['user_assigned_identity'] - - class SearchIndexerError(msrest.serialization.Model): """Represents an item- or document-level indexing error. @@ -6652,8 +4314,6 @@ def __init__( self, **kwargs ): - """ - """ super(SearchIndexerError, self).__init__(**kwargs) self.key = None self.error_message = None @@ -6668,11 +4328,11 @@ class SearchIndexerKnowledgeStore(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar storage_connection_string: Required. The connection string to the storage account + :param storage_connection_string: Required. The connection string to the storage account projections will be stored in. - :vartype storage_connection_string: str - :ivar projections: Required. A list of additional projections to perform during indexing. - :vartype projections: + :type storage_connection_string: str + :param projections: Required. A list of additional projections to perform during indexing. + :type projections: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreProjection] """ @@ -6690,14 +4350,6 @@ def __init__( self, **kwargs ): - """ - :keyword storage_connection_string: Required. The connection string to the storage account - projections will be stored in. - :paramtype storage_connection_string: str - :keyword projections: Required. A list of additional projections to perform during indexing. - :paramtype projections: - list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreProjection] - """ super(SearchIndexerKnowledgeStore, self).__init__(**kwargs) self.storage_connection_string = kwargs['storage_connection_string'] self.projections = kwargs['projections'] @@ -6706,16 +4358,16 @@ def __init__( class SearchIndexerKnowledgeStoreProjectionSelector(msrest.serialization.Model): """Abstract class to share properties between concrete selectors. - :ivar reference_key_name: Name of reference key to different projection. - :vartype reference_key_name: str - :ivar generated_key_name: Name of generated key to store projection under. - :vartype generated_key_name: str - :ivar source: Source data to project. - :vartype source: str - :ivar source_context: Source context for complex projections. - :vartype source_context: str - :ivar inputs: Nested inputs for complex projections. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param reference_key_name: Name of reference key to different projection. + :type reference_key_name: str + :param generated_key_name: Name of generated key to store projection under. + :type generated_key_name: str + :param source: Source data to project. + :type source: str + :param source_context: Source context for complex projections. + :type source_context: str + :param inputs: Nested inputs for complex projections. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] """ _attribute_map = { @@ -6730,18 +4382,6 @@ def __init__( self, **kwargs ): - """ - :keyword reference_key_name: Name of reference key to different projection. - :paramtype reference_key_name: str - :keyword generated_key_name: Name of generated key to store projection under. - :paramtype generated_key_name: str - :keyword source: Source data to project. - :paramtype source: str - :keyword source_context: Source context for complex projections. - :paramtype source_context: str - :keyword inputs: Nested inputs for complex projections. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - """ super(SearchIndexerKnowledgeStoreProjectionSelector, self).__init__(**kwargs) self.reference_key_name = kwargs.get('reference_key_name', None) self.generated_key_name = kwargs.get('generated_key_name', None) @@ -6755,18 +4395,18 @@ class SearchIndexerKnowledgeStoreBlobProjectionSelector(SearchIndexerKnowledgeSt All required parameters must be populated in order to send to Azure. - :ivar reference_key_name: Name of reference key to different projection. - :vartype reference_key_name: str - :ivar generated_key_name: Name of generated key to store projection under. - :vartype generated_key_name: str - :ivar source: Source data to project. - :vartype source: str - :ivar source_context: Source context for complex projections. - :vartype source_context: str - :ivar inputs: Nested inputs for complex projections. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar storage_container: Required. Blob container to store projections in. - :vartype storage_container: str + :param reference_key_name: Name of reference key to different projection. + :type reference_key_name: str + :param generated_key_name: Name of generated key to store projection under. + :type generated_key_name: str + :param source: Source data to project. + :type source: str + :param source_context: Source context for complex projections. + :type source_context: str + :param inputs: Nested inputs for complex projections. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param storage_container: Required. Blob container to store projections in. + :type storage_container: str """ _validation = { @@ -6786,20 +4426,6 @@ def __init__( self, **kwargs ): - """ - :keyword reference_key_name: Name of reference key to different projection. - :paramtype reference_key_name: str - :keyword generated_key_name: Name of generated key to store projection under. - :paramtype generated_key_name: str - :keyword source: Source data to project. - :paramtype source: str - :keyword source_context: Source context for complex projections. - :paramtype source_context: str - :keyword inputs: Nested inputs for complex projections. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword storage_container: Required. Blob container to store projections in. - :paramtype storage_container: str - """ super(SearchIndexerKnowledgeStoreBlobProjectionSelector, self).__init__(**kwargs) self.storage_container = kwargs['storage_container'] @@ -6809,18 +4435,18 @@ class SearchIndexerKnowledgeStoreFileProjectionSelector(SearchIndexerKnowledgeSt All required parameters must be populated in order to send to Azure. - :ivar reference_key_name: Name of reference key to different projection. - :vartype reference_key_name: str - :ivar generated_key_name: Name of generated key to store projection under. - :vartype generated_key_name: str - :ivar source: Source data to project. - :vartype source: str - :ivar source_context: Source context for complex projections. - :vartype source_context: str - :ivar inputs: Nested inputs for complex projections. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar storage_container: Required. Blob container to store projections in. - :vartype storage_container: str + :param reference_key_name: Name of reference key to different projection. + :type reference_key_name: str + :param generated_key_name: Name of generated key to store projection under. + :type generated_key_name: str + :param source: Source data to project. + :type source: str + :param source_context: Source context for complex projections. + :type source_context: str + :param inputs: Nested inputs for complex projections. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param storage_container: Required. Blob container to store projections in. + :type storage_container: str """ _validation = { @@ -6840,20 +4466,6 @@ def __init__( self, **kwargs ): - """ - :keyword reference_key_name: Name of reference key to different projection. - :paramtype reference_key_name: str - :keyword generated_key_name: Name of generated key to store projection under. - :paramtype generated_key_name: str - :keyword source: Source data to project. - :paramtype source: str - :keyword source_context: Source context for complex projections. - :paramtype source_context: str - :keyword inputs: Nested inputs for complex projections. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword storage_container: Required. Blob container to store projections in. - :paramtype storage_container: str - """ super(SearchIndexerKnowledgeStoreFileProjectionSelector, self).__init__(**kwargs) @@ -6862,18 +4474,18 @@ class SearchIndexerKnowledgeStoreObjectProjectionSelector(SearchIndexerKnowledge All required parameters must be populated in order to send to Azure. - :ivar reference_key_name: Name of reference key to different projection. - :vartype reference_key_name: str - :ivar generated_key_name: Name of generated key to store projection under. - :vartype generated_key_name: str - :ivar source: Source data to project. - :vartype source: str - :ivar source_context: Source context for complex projections. - :vartype source_context: str - :ivar inputs: Nested inputs for complex projections. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar storage_container: Required. Blob container to store projections in. - :vartype storage_container: str + :param reference_key_name: Name of reference key to different projection. + :type reference_key_name: str + :param generated_key_name: Name of generated key to store projection under. + :type generated_key_name: str + :param source: Source data to project. + :type source: str + :param source_context: Source context for complex projections. + :type source_context: str + :param inputs: Nested inputs for complex projections. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param storage_container: Required. Blob container to store projections in. + :type storage_container: str """ _validation = { @@ -6893,34 +4505,20 @@ def __init__( self, **kwargs ): - """ - :keyword reference_key_name: Name of reference key to different projection. - :paramtype reference_key_name: str - :keyword generated_key_name: Name of generated key to store projection under. - :paramtype generated_key_name: str - :keyword source: Source data to project. - :paramtype source: str - :keyword source_context: Source context for complex projections. - :paramtype source_context: str - :keyword inputs: Nested inputs for complex projections. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword storage_container: Required. Blob container to store projections in. - :paramtype storage_container: str - """ super(SearchIndexerKnowledgeStoreObjectProjectionSelector, self).__init__(**kwargs) class SearchIndexerKnowledgeStoreProjection(msrest.serialization.Model): """Container object for various projection selectors. - :ivar tables: Projections to Azure Table storage. - :vartype tables: + :param tables: Projections to Azure Table storage. + :type tables: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreTableProjectionSelector] - :ivar objects: Projections to Azure Blob storage. - :vartype objects: + :param objects: Projections to Azure Blob storage. + :type objects: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreObjectProjectionSelector] - :ivar files: Projections to Azure File storage. - :vartype files: + :param files: Projections to Azure File storage. + :type files: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreFileProjectionSelector] """ @@ -6934,17 +4532,6 @@ def __init__( self, **kwargs ): - """ - :keyword tables: Projections to Azure Table storage. - :paramtype tables: - list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreTableProjectionSelector] - :keyword objects: Projections to Azure Blob storage. - :paramtype objects: - list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreObjectProjectionSelector] - :keyword files: Projections to Azure File storage. - :paramtype files: - list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreFileProjectionSelector] - """ super(SearchIndexerKnowledgeStoreProjection, self).__init__(**kwargs) self.tables = kwargs.get('tables', None) self.objects = kwargs.get('objects', None) @@ -6956,18 +4543,18 @@ class SearchIndexerKnowledgeStoreTableProjectionSelector(SearchIndexerKnowledgeS All required parameters must be populated in order to send to Azure. - :ivar reference_key_name: Name of reference key to different projection. - :vartype reference_key_name: str - :ivar generated_key_name: Name of generated key to store projection under. - :vartype generated_key_name: str - :ivar source: Source data to project. - :vartype source: str - :ivar source_context: Source context for complex projections. - :vartype source_context: str - :ivar inputs: Nested inputs for complex projections. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar table_name: Required. Name of the Azure table to store projected data in. - :vartype table_name: str + :param reference_key_name: Name of reference key to different projection. + :type reference_key_name: str + :param generated_key_name: Name of generated key to store projection under. + :type generated_key_name: str + :param source: Source data to project. + :type source: str + :param source_context: Source context for complex projections. + :type source_context: str + :param inputs: Nested inputs for complex projections. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param table_name: Required. Name of the Azure table to store projected data in. + :type table_name: str """ _validation = { @@ -6987,20 +4574,6 @@ def __init__( self, **kwargs ): - """ - :keyword reference_key_name: Name of reference key to different projection. - :paramtype reference_key_name: str - :keyword generated_key_name: Name of generated key to store projection under. - :paramtype generated_key_name: str - :keyword source: Source data to project. - :paramtype source: str - :keyword source_context: Source context for complex projections. - :paramtype source_context: str - :keyword inputs: Nested inputs for complex projections. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword table_name: Required. Name of the Azure table to store projected data in. - :paramtype table_name: str - """ super(SearchIndexerKnowledgeStoreTableProjectionSelector, self).__init__(**kwargs) self.table_name = kwargs['table_name'] @@ -7037,8 +4610,6 @@ def __init__( self, **kwargs ): - """ - """ super(SearchIndexerLimits, self).__init__(**kwargs) self.max_run_time = None self.max_document_extraction_size = None @@ -7050,22 +4621,22 @@ class SearchIndexerSkillset(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the skillset. - :vartype name: str - :ivar description: The description of the skillset. - :vartype description: str - :ivar skills: Required. A list of skills in the skillset. - :vartype skills: list[~azure.search.documents.indexes.models.SearchIndexerSkill] - :ivar cognitive_services_account: Details about cognitive services to be used when running + :param name: Required. The name of the skillset. + :type name: str + :param description: The description of the skillset. + :type description: str + :param skills: Required. A list of skills in the skillset. + :type skills: list[~azure.search.documents.indexes.models.SearchIndexerSkill] + :param cognitive_services_account: Details about cognitive services to be used when running skills. - :vartype cognitive_services_account: + :type cognitive_services_account: ~azure.search.documents.indexes.models.CognitiveServicesAccount - :ivar knowledge_store: Definition of additional projections to azure blob, table, or files, of + :param knowledge_store: Definition of additional projections to azure blob, table, or files, of enriched data. - :vartype knowledge_store: ~azure.search.documents.indexes.models.SearchIndexerKnowledgeStore - :ivar e_tag: The ETag of the skillset. - :vartype e_tag: str - :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault. + :type knowledge_store: ~azure.search.documents.indexes.models.SearchIndexerKnowledgeStore + :param e_tag: The ETag of the skillset. + :type e_tag: str + :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your skillset definition when you want full assurance that no one, not even Microsoft, can decrypt your skillset definition in Azure Cognitive Search. Once you have encrypted your skillset @@ -7074,7 +4645,7 @@ class SearchIndexerSkillset(msrest.serialization.Model): encryption key; Your skillset definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey """ _validation = { @@ -7096,33 +4667,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the skillset. - :paramtype name: str - :keyword description: The description of the skillset. - :paramtype description: str - :keyword skills: Required. A list of skills in the skillset. - :paramtype skills: list[~azure.search.documents.indexes.models.SearchIndexerSkill] - :keyword cognitive_services_account: Details about cognitive services to be used when running - skills. - :paramtype cognitive_services_account: - ~azure.search.documents.indexes.models.CognitiveServicesAccount - :keyword knowledge_store: Definition of additional projections to azure blob, table, or files, - of enriched data. - :paramtype knowledge_store: ~azure.search.documents.indexes.models.SearchIndexerKnowledgeStore - :keyword e_tag: The ETag of the skillset. - :paramtype e_tag: str - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your skillset - definition when you want full assurance that no one, not even Microsoft, can decrypt your - skillset definition in Azure Cognitive Search. Once you have encrypted your skillset - definition, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set - this property to null. You can change this property as needed if you want to rotate your - encryption key; Your skillset definition will be unaffected. Encryption with customer-managed - keys is not available for free search services, and is only available for paid services created - on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - """ super(SearchIndexerSkillset, self).__init__(**kwargs) self.name = kwargs['name'] self.description = kwargs.get('description', None) @@ -7170,8 +4714,6 @@ def __init__( self, **kwargs ): - """ - """ super(SearchIndexerStatus, self).__init__(**kwargs) self.status = None self.last_result = None @@ -7222,8 +4764,6 @@ def __init__( self, **kwargs ): - """ - """ super(SearchIndexerWarning, self).__init__(**kwargs) self.key = None self.message = None @@ -7237,25 +4777,20 @@ class SearchResourceEncryptionKey(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar key_name: Required. The name of your Azure Key Vault key to be used to encrypt your data + :param key_name: Required. The name of your Azure Key Vault key to be used to encrypt your data at rest. - :vartype key_name: str - :ivar key_version: Required. The version of your Azure Key Vault key to be used to encrypt your - data at rest. - :vartype key_version: str - :ivar vault_uri: Required. The URI of your Azure Key Vault, also referred to as DNS name, that + :type key_name: str + :param key_version: Required. The version of your Azure Key Vault key to be used to encrypt + your data at rest. + :type key_version: str + :param vault_uri: Required. The URI of your Azure Key Vault, also referred to as DNS name, that contains the key to be used to encrypt your data at rest. An example URI might be https://my-keyvault-name.vault.azure.net. - :vartype vault_uri: str - :ivar access_credentials: Optional Azure Active Directory credentials used for accessing your + :type vault_uri: str + :param access_credentials: Optional Azure Active Directory credentials used for accessing your Azure Key Vault. Not required if using managed identity instead. - :vartype access_credentials: + :type access_credentials: ~azure.search.documents.indexes.models.AzureActiveDirectoryApplicationCredentials - :ivar identity: An explicit managed identity to use for this encryption key. If not specified - and the access credentials property is null, the system-assigned managed identity is used. On - update to the resource, if the explicit identity is unspecified, it remains unchanged. If - "none" is specified, the value of this property is cleared. - :vartype identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity """ _validation = { @@ -7269,126 +4804,17 @@ class SearchResourceEncryptionKey(msrest.serialization.Model): 'key_version': {'key': 'keyVaultKeyVersion', 'type': 'str'}, 'vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, 'access_credentials': {'key': 'accessCredentials', 'type': 'AzureActiveDirectoryApplicationCredentials'}, - 'identity': {'key': 'identity', 'type': 'SearchIndexerDataIdentity'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key_name: Required. The name of your Azure Key Vault key to be used to encrypt your - data at rest. - :paramtype key_name: str - :keyword key_version: Required. The version of your Azure Key Vault key to be used to encrypt - your data at rest. - :paramtype key_version: str - :keyword vault_uri: Required. The URI of your Azure Key Vault, also referred to as DNS name, - that contains the key to be used to encrypt your data at rest. An example URI might be - https://my-keyvault-name.vault.azure.net. - :paramtype vault_uri: str - :keyword access_credentials: Optional Azure Active Directory credentials used for accessing - your Azure Key Vault. Not required if using managed identity instead. - :paramtype access_credentials: - ~azure.search.documents.indexes.models.AzureActiveDirectoryApplicationCredentials - :keyword identity: An explicit managed identity to use for this encryption key. If not - specified and the access credentials property is null, the system-assigned managed identity is - used. On update to the resource, if the explicit identity is unspecified, it remains unchanged. - If "none" is specified, the value of this property is cleared. - :paramtype identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity - """ - super(SearchResourceEncryptionKey, self).__init__(**kwargs) - self.key_name = kwargs['key_name'] - self.key_version = kwargs['key_version'] - self.vault_uri = kwargs['vault_uri'] - self.access_credentials = kwargs.get('access_credentials', None) - self.identity = kwargs.get('identity', None) - - -class SemanticConfiguration(msrest.serialization.Model): - """Defines a specific configuration to be used in the context of semantic capabilities. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the semantic configuration. - :vartype name: str - :ivar prioritized_fields: Required. Describes the title, content, and keyword fields to be used - for semantic ranking, captions, highlights, and answers. At least one of the three sub - properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. - :vartype prioritized_fields: ~azure.search.documents.indexes.models.PrioritizedFields - """ - - _validation = { - 'name': {'required': True}, - 'prioritized_fields': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'prioritized_fields': {'key': 'prioritizedFields', 'type': 'PrioritizedFields'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The name of the semantic configuration. - :paramtype name: str - :keyword prioritized_fields: Required. Describes the title, content, and keyword fields to be - used for semantic ranking, captions, highlights, and answers. At least one of the three sub - properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. - :paramtype prioritized_fields: ~azure.search.documents.indexes.models.PrioritizedFields - """ - super(SemanticConfiguration, self).__init__(**kwargs) - self.name = kwargs['name'] - self.prioritized_fields = kwargs['prioritized_fields'] - - -class SemanticField(msrest.serialization.Model): - """A field that is used as part of the semantic configuration. - - :ivar field_name: - :vartype field_name: str - """ - - _attribute_map = { - 'field_name': {'key': 'fieldName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword field_name: - :paramtype field_name: str - """ - super(SemanticField, self).__init__(**kwargs) - self.field_name = kwargs.get('field_name', None) - - -class SemanticSettings(msrest.serialization.Model): - """Defines parameters for a search index that influence semantic capabilities. - - :ivar configurations: The semantic configurations for the index. - :vartype configurations: list[~azure.search.documents.indexes.models.SemanticConfiguration] - """ - - _attribute_map = { - 'configurations': {'key': 'configurations', 'type': '[SemanticConfiguration]'}, } def __init__( self, **kwargs ): - """ - :keyword configurations: The semantic configurations for the index. - :paramtype configurations: list[~azure.search.documents.indexes.models.SemanticConfiguration] - """ - super(SemanticSettings, self).__init__(**kwargs) - self.configurations = kwargs.get('configurations', None) + super(SearchResourceEncryptionKey, self).__init__(**kwargs) + self.key_name = kwargs['key_name'] + self.key_version = kwargs['key_version'] + self.vault_uri = kwargs['vault_uri'] + self.access_credentials = kwargs.get('access_credentials', None) class SentimentSkill(SearchIndexerSkill): @@ -7396,29 +4822,29 @@ class SentimentSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "nl", "en", "fi", "fr", "de", "el", "it", "no", "pl", "pt-PT", "ru", "es", "sv", "tr". - :vartype default_language_code: str or + :type default_language_code: str or ~azure.search.documents.indexes.models.SentimentSkillLanguage """ @@ -7442,150 +4868,30 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "da", "nl", "en", "fi", "fr", "de", "el", "it", "no", "pl", "pt-PT", - "ru", "es", "sv", "tr". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.SentimentSkillLanguage - """ super(SentimentSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Text.SentimentSkill' # type: str self.default_language_code = kwargs.get('default_language_code', None) -class SentimentSkillV3(SearchIndexerSkill): - """Using the Text Analytics API, evaluates unstructured text and for each record, provides sentiment labels (such as "negative", "neutral" and "positive") based on the highest confidence score found by the service at a sentence and document-level. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. - :vartype default_language_code: str - :ivar include_opinion_mining: If set to true, the skill output will include information from - Text Analytics for opinion mining, namely targets (nouns or verbs) and their associated - assessment (adjective) in the text. Default is false. - :vartype include_opinion_mining: bool - :ivar model_version: The version of the model to use when calling the Text Analytics service. - It will default to the latest available when not specified. We recommend you do not specify - this value unless absolutely necessary. - :vartype model_version: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - 'default_language_code': {'key': 'defaultLanguageCode', 'type': 'str'}, - 'include_opinion_mining': {'key': 'includeOpinionMining', 'type': 'bool'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - :paramtype default_language_code: str - :keyword include_opinion_mining: If set to true, the skill output will include information from - Text Analytics for opinion mining, namely targets (nouns or verbs) and their associated - assessment (adjective) in the text. Default is false. - :paramtype include_opinion_mining: bool - :keyword model_version: The version of the model to use when calling the Text Analytics - service. It will default to the latest available when not specified. We recommend you do not - specify this value unless absolutely necessary. - :paramtype model_version: str - """ - super(SentimentSkillV3, self).__init__(**kwargs) - self.odata_type = '#Microsoft.Skills.Text.V3.SentimentSkill' # type: str - self.default_language_code = kwargs.get('default_language_code', None) - self.include_opinion_mining = kwargs.get('include_opinion_mining', False) - self.model_version = kwargs.get('model_version', None) - - class ServiceCounters(msrest.serialization.Model): """Represents service-level resource counters and quotas. All required parameters must be populated in order to send to Azure. - :ivar alias_counter: Total number of aliases. - :vartype alias_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar document_counter: Required. Total number of documents across all indexes in the service. - :vartype document_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar index_counter: Required. Total number of indexes. - :vartype index_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar indexer_counter: Required. Total number of indexers. - :vartype indexer_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar data_source_counter: Required. Total number of data sources. - :vartype data_source_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar storage_size_counter: Required. Total size of used storage in bytes. - :vartype storage_size_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar synonym_map_counter: Required. Total number of synonym maps. - :vartype synonym_map_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar skillset_counter: Total number of skillsets. - :vartype skillset_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param document_counter: Required. Total number of documents across all indexes in the service. + :type document_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param index_counter: Required. Total number of indexes. + :type index_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param indexer_counter: Required. Total number of indexers. + :type indexer_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param data_source_counter: Required. Total number of data sources. + :type data_source_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param storage_size_counter: Required. Total size of used storage in bytes. + :type storage_size_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param synonym_map_counter: Required. Total number of synonym maps. + :type synonym_map_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param skillset_counter: Total number of skillsets. + :type skillset_counter: ~azure.search.documents.indexes.models.ResourceCounter """ _validation = { @@ -7598,7 +4904,6 @@ class ServiceCounters(msrest.serialization.Model): } _attribute_map = { - 'alias_counter': {'key': 'aliasesCount', 'type': 'ResourceCounter'}, 'document_counter': {'key': 'documentCount', 'type': 'ResourceCounter'}, 'index_counter': {'key': 'indexesCount', 'type': 'ResourceCounter'}, 'indexer_counter': {'key': 'indexersCount', 'type': 'ResourceCounter'}, @@ -7612,27 +4917,7 @@ def __init__( self, **kwargs ): - """ - :keyword alias_counter: Total number of aliases. - :paramtype alias_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword document_counter: Required. Total number of documents across all indexes in the - service. - :paramtype document_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword index_counter: Required. Total number of indexes. - :paramtype index_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword indexer_counter: Required. Total number of indexers. - :paramtype indexer_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword data_source_counter: Required. Total number of data sources. - :paramtype data_source_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword storage_size_counter: Required. Total size of used storage in bytes. - :paramtype storage_size_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword synonym_map_counter: Required. Total number of synonym maps. - :paramtype synonym_map_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword skillset_counter: Total number of skillsets. - :paramtype skillset_counter: ~azure.search.documents.indexes.models.ResourceCounter - """ super(ServiceCounters, self).__init__(**kwargs) - self.alias_counter = kwargs.get('alias_counter', None) self.document_counter = kwargs['document_counter'] self.index_counter = kwargs['index_counter'] self.indexer_counter = kwargs['indexer_counter'] @@ -7645,17 +4930,17 @@ def __init__( class ServiceLimits(msrest.serialization.Model): """Represents various service level limits. - :ivar max_fields_per_index: The maximum allowed fields per index. - :vartype max_fields_per_index: int - :ivar max_field_nesting_depth_per_index: The maximum depth which you can nest sub-fields in an + :param max_fields_per_index: The maximum allowed fields per index. + :type max_fields_per_index: int + :param max_field_nesting_depth_per_index: The maximum depth which you can nest sub-fields in an index, including the top-level complex field. For example, a/b/c has a nesting depth of 3. - :vartype max_field_nesting_depth_per_index: int - :ivar max_complex_collection_fields_per_index: The maximum number of fields of type + :type max_field_nesting_depth_per_index: int + :param max_complex_collection_fields_per_index: The maximum number of fields of type Collection(Edm.ComplexType) allowed in an index. - :vartype max_complex_collection_fields_per_index: int - :ivar max_complex_objects_in_collections_per_document: The maximum number of objects in complex - collections allowed per document. - :vartype max_complex_objects_in_collections_per_document: int + :type max_complex_collection_fields_per_index: int + :param max_complex_objects_in_collections_per_document: The maximum number of objects in + complex collections allowed per document. + :type max_complex_objects_in_collections_per_document: int """ _attribute_map = { @@ -7669,19 +4954,6 @@ def __init__( self, **kwargs ): - """ - :keyword max_fields_per_index: The maximum allowed fields per index. - :paramtype max_fields_per_index: int - :keyword max_field_nesting_depth_per_index: The maximum depth which you can nest sub-fields in - an index, including the top-level complex field. For example, a/b/c has a nesting depth of 3. - :paramtype max_field_nesting_depth_per_index: int - :keyword max_complex_collection_fields_per_index: The maximum number of fields of type - Collection(Edm.ComplexType) allowed in an index. - :paramtype max_complex_collection_fields_per_index: int - :keyword max_complex_objects_in_collections_per_document: The maximum number of objects in - complex collections allowed per document. - :paramtype max_complex_objects_in_collections_per_document: int - """ super(ServiceLimits, self).__init__(**kwargs) self.max_fields_per_index = kwargs.get('max_fields_per_index', None) self.max_field_nesting_depth_per_index = kwargs.get('max_field_nesting_depth_per_index', None) @@ -7694,10 +4966,10 @@ class ServiceStatistics(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar counters: Required. Service level resource counters. - :vartype counters: ~azure.search.documents.indexes.models.ServiceCounters - :ivar limits: Required. Service level general limits. - :vartype limits: ~azure.search.documents.indexes.models.ServiceLimits + :param counters: Required. Service level resource counters. + :type counters: ~azure.search.documents.indexes.models.ServiceCounters + :param limits: Required. Service level general limits. + :type limits: ~azure.search.documents.indexes.models.ServiceLimits """ _validation = { @@ -7714,12 +4986,6 @@ def __init__( self, **kwargs ): - """ - :keyword counters: Required. Service level resource counters. - :paramtype counters: ~azure.search.documents.indexes.models.ServiceCounters - :keyword limits: Required. Service level general limits. - :paramtype limits: ~azure.search.documents.indexes.models.ServiceLimits - """ super(ServiceStatistics, self).__init__(**kwargs) self.counters = kwargs['counters'] self.limits = kwargs['limits'] @@ -7730,25 +4996,25 @@ class ShaperSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] """ _validation = { @@ -7770,25 +5036,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - """ super(ShaperSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Util.ShaperSkill' # type: str @@ -7798,31 +5045,31 @@ class ShingleTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_shingle_size: The maximum shingle size. Default and minimum value is 2. - :vartype max_shingle_size: int - :ivar min_shingle_size: The minimum shingle size. Default and minimum value is 2. Must be less + :type name: str + :param max_shingle_size: The maximum shingle size. Default and minimum value is 2. + :type max_shingle_size: int + :param min_shingle_size: The minimum shingle size. Default and minimum value is 2. Must be less than the value of maxShingleSize. - :vartype min_shingle_size: int - :ivar output_unigrams: A value indicating whether the output stream will contain the input + :type min_shingle_size: int + :param output_unigrams: A value indicating whether the output stream will contain the input tokens (unigrams) as well as shingles. Default is true. - :vartype output_unigrams: bool - :ivar output_unigrams_if_no_shingles: A value indicating whether to output unigrams for those + :type output_unigrams: bool + :param output_unigrams_if_no_shingles: A value indicating whether to output unigrams for those times when no shingles are available. This property takes precedence when outputUnigrams is set to false. Default is false. - :vartype output_unigrams_if_no_shingles: bool - :ivar token_separator: The string to use when joining adjacent tokens to form a shingle. + :type output_unigrams_if_no_shingles: bool + :param token_separator: The string to use when joining adjacent tokens to form a shingle. Default is a single space (" "). - :vartype token_separator: str - :ivar filter_token: The string to insert for each position at which there is no token. Default + :type token_separator: str + :param filter_token: The string to insert for each position at which there is no token. Default is an underscore ("_"). - :vartype filter_token: str + :type filter_token: str """ _validation = { @@ -7847,30 +5094,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_shingle_size: The maximum shingle size. Default and minimum value is 2. - :paramtype max_shingle_size: int - :keyword min_shingle_size: The minimum shingle size. Default and minimum value is 2. Must be - less than the value of maxShingleSize. - :paramtype min_shingle_size: int - :keyword output_unigrams: A value indicating whether the output stream will contain the input - tokens (unigrams) as well as shingles. Default is true. - :paramtype output_unigrams: bool - :keyword output_unigrams_if_no_shingles: A value indicating whether to output unigrams for - those times when no shingles are available. This property takes precedence when outputUnigrams - is set to false. Default is false. - :paramtype output_unigrams_if_no_shingles: bool - :keyword token_separator: The string to use when joining adjacent tokens to form a shingle. - Default is a single space (" "). - :paramtype token_separator: str - :keyword filter_token: The string to insert for each position at which there is no token. - Default is an underscore ("_"). - :paramtype filter_token: str - """ super(ShingleTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.ShingleTokenFilter' # type: str self.max_shingle_size = kwargs.get('max_shingle_size', 2) @@ -7881,46 +5104,23 @@ def __init__( self.filter_token = kwargs.get('filter_token', "_") -class SkillNames(msrest.serialization.Model): - """SkillNames. - - :ivar skill_names: the names of skills to be reset. - :vartype skill_names: list[str] - """ - - _attribute_map = { - 'skill_names': {'key': 'skillNames', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword skill_names: the names of skills to be reset. - :paramtype skill_names: list[str] - """ - super(SkillNames, self).__init__(**kwargs) - self.skill_names = kwargs.get('skill_names', None) - - class SnowballTokenFilter(TokenFilter): """A filter that stems words using a Snowball-generated stemmer. This token filter is implemented using Apache Lucene. All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar language: Required. The language to use. Possible values include: "armenian", "basque", + :type name: str + :param language: Required. The language to use. Possible values include: "armenian", "basque", "catalan", "danish", "dutch", "english", "finnish", "french", "german", "german2", "hungarian", "italian", "kp", "lovins", "norwegian", "porter", "portuguese", "romanian", "russian", "spanish", "swedish", "turkish". - :vartype language: str or ~azure.search.documents.indexes.models.SnowballTokenFilterLanguage + :type language: str or ~azure.search.documents.indexes.models.SnowballTokenFilterLanguage """ _validation = { @@ -7939,17 +5139,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword language: Required. The language to use. Possible values include: "armenian", - "basque", "catalan", "danish", "dutch", "english", "finnish", "french", "german", "german2", - "hungarian", "italian", "kp", "lovins", "norwegian", "porter", "portuguese", "romanian", - "russian", "spanish", "swedish", "turkish". - :paramtype language: str or ~azure.search.documents.indexes.models.SnowballTokenFilterLanguage - """ super(SnowballTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.SnowballTokenFilter' # type: str self.language = kwargs['language'] @@ -7960,13 +5149,13 @@ class SoftDeleteColumnDeletionDetectionPolicy(DataDeletionDetectionPolicy): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the data deletion detection + :param odata_type: Required. Identifies the concrete type of the data deletion detection policy.Constant filled by server. - :vartype odata_type: str - :ivar soft_delete_column_name: The name of the column to use for soft-deletion detection. - :vartype soft_delete_column_name: str - :ivar soft_delete_marker_value: The marker value that identifies an item as deleted. - :vartype soft_delete_marker_value: str + :type odata_type: str + :param soft_delete_column_name: The name of the column to use for soft-deletion detection. + :type soft_delete_column_name: str + :param soft_delete_marker_value: The marker value that identifies an item as deleted. + :type soft_delete_marker_value: str """ _validation = { @@ -7983,12 +5172,6 @@ def __init__( self, **kwargs ): - """ - :keyword soft_delete_column_name: The name of the column to use for soft-deletion detection. - :paramtype soft_delete_column_name: str - :keyword soft_delete_marker_value: The marker value that identifies an item as deleted. - :paramtype soft_delete_marker_value: str - """ super(SoftDeleteColumnDeletionDetectionPolicy, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy' # type: str self.soft_delete_column_name = kwargs.get('soft_delete_column_name', None) @@ -8000,34 +5183,33 @@ class SplitSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "de", "en", "es", "fi", "fr", "it", "ko", "pt". - :vartype default_language_code: str or - ~azure.search.documents.indexes.models.SplitSkillLanguage - :ivar text_split_mode: A value indicating which split mode to perform. Possible values include: - "pages", "sentences". - :vartype text_split_mode: str or ~azure.search.documents.indexes.models.TextSplitMode - :ivar maximum_page_length: The desired maximum page length. Default is 10000. - :vartype maximum_page_length: int + :type default_language_code: str or ~azure.search.documents.indexes.models.SplitSkillLanguage + :param text_split_mode: A value indicating which split mode to perform. Possible values + include: "pages", "sentences". + :type text_split_mode: str or ~azure.search.documents.indexes.models.TextSplitMode + :param maximum_page_length: The desired maximum page length. Default is 10000. + :type maximum_page_length: int """ _validation = { @@ -8052,34 +5234,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "da", "de", "en", "es", "fi", "fr", "it", "ko", "pt". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.SplitSkillLanguage - :keyword text_split_mode: A value indicating which split mode to perform. Possible values - include: "pages", "sentences". - :paramtype text_split_mode: str or ~azure.search.documents.indexes.models.TextSplitMode - :keyword maximum_page_length: The desired maximum page length. Default is 10000. - :paramtype maximum_page_length: int - """ super(SplitSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Text.SplitSkill' # type: str self.default_language_code = kwargs.get('default_language_code', None) @@ -8092,9 +5246,9 @@ class SqlIntegratedChangeTrackingPolicy(DataChangeDetectionPolicy): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the data change detection + :param odata_type: Required. Identifies the concrete type of the data change detection policy.Constant filled by server. - :vartype odata_type: str + :type odata_type: str """ _validation = { @@ -8109,8 +5263,6 @@ def __init__( self, **kwargs ): - """ - """ super(SqlIntegratedChangeTrackingPolicy, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.SqlIntegratedChangeTrackingPolicy' # type: str @@ -8120,16 +5272,16 @@ class StemmerOverrideTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar rules: Required. A list of stemming rules in the following format: "word => stem", for + :type name: str + :param rules: Required. A list of stemming rules in the following format: "word => stem", for example: "ran => run". - :vartype rules: list[str] + :type rules: list[str] """ _validation = { @@ -8148,15 +5300,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword rules: Required. A list of stemming rules in the following format: "word => stem", for - example: "ran => run". - :paramtype rules: list[str] - """ super(StemmerOverrideTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.StemmerOverrideTokenFilter' # type: str self.rules = kwargs['rules'] @@ -8167,14 +5310,14 @@ class StemmerTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar language: Required. The language to use. Possible values include: "arabic", "armenian", + :type name: str + :param language: Required. The language to use. Possible values include: "arabic", "armenian", "basque", "brazilian", "bulgarian", "catalan", "czech", "danish", "dutch", "dutchKp", "english", "lightEnglish", "minimalEnglish", "possessiveEnglish", "porter2", "lovins", "finnish", "lightFinnish", "french", "lightFrench", "minimalFrench", "galician", @@ -8183,7 +5326,7 @@ class StemmerTokenFilter(TokenFilter): "latvian", "norwegian", "lightNorwegian", "minimalNorwegian", "lightNynorsk", "minimalNynorsk", "portuguese", "lightPortuguese", "minimalPortuguese", "portugueseRslp", "romanian", "russian", "lightRussian", "spanish", "lightSpanish", "swedish", "lightSwedish", "turkish". - :vartype language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage + :type language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage """ _validation = { @@ -8202,22 +5345,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword language: Required. The language to use. Possible values include: "arabic", - "armenian", "basque", "brazilian", "bulgarian", "catalan", "czech", "danish", "dutch", - "dutchKp", "english", "lightEnglish", "minimalEnglish", "possessiveEnglish", "porter2", - "lovins", "finnish", "lightFinnish", "french", "lightFrench", "minimalFrench", "galician", - "minimalGalician", "german", "german2", "lightGerman", "minimalGerman", "greek", "hindi", - "hungarian", "lightHungarian", "indonesian", "irish", "italian", "lightItalian", "sorani", - "latvian", "norwegian", "lightNorwegian", "minimalNorwegian", "lightNynorsk", "minimalNynorsk", - "portuguese", "lightPortuguese", "minimalPortuguese", "portugueseRslp", "romanian", "russian", - "lightRussian", "spanish", "lightSpanish", "swedish", "lightSwedish", "turkish". - :paramtype language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage - """ super(StemmerTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.StemmerTokenFilter' # type: str self.language = kwargs['language'] @@ -8228,15 +5355,15 @@ class StopAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the analyzer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar stopwords: A list of stopwords. - :vartype stopwords: list[str] + :type name: str + :param stopwords: A list of stopwords. + :type stopwords: list[str] """ _validation = { @@ -8254,14 +5381,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the analyzer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword stopwords: A list of stopwords. - :paramtype stopwords: list[str] - """ super(StopAnalyzer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.StopAnalyzer' # type: str self.stopwords = kwargs.get('stopwords', None) @@ -8272,29 +5391,29 @@ class StopwordsTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar stopwords: The list of stopwords. This property and the stopwords list property cannot + :type name: str + :param stopwords: The list of stopwords. This property and the stopwords list property cannot both be set. - :vartype stopwords: list[str] - :ivar stopwords_list: A predefined list of stopwords to use. This property and the stopwords + :type stopwords: list[str] + :param stopwords_list: A predefined list of stopwords to use. This property and the stopwords property cannot both be set. Default is English. Possible values include: "arabic", "armenian", "basque", "brazilian", "bulgarian", "catalan", "czech", "danish", "dutch", "english", "finnish", "french", "galician", "german", "greek", "hindi", "hungarian", "indonesian", "irish", "italian", "latvian", "norwegian", "persian", "portuguese", "romanian", "russian", "sorani", "spanish", "swedish", "thai", "turkish". - :vartype stopwords_list: str or ~azure.search.documents.indexes.models.StopwordsList - :ivar ignore_case: A value indicating whether to ignore case. If true, all words are converted + :type stopwords_list: str or ~azure.search.documents.indexes.models.StopwordsList + :param ignore_case: A value indicating whether to ignore case. If true, all words are converted to lower case first. Default is false. - :vartype ignore_case: bool - :ivar remove_trailing_stop_words: A value indicating whether to ignore the last search term if + :type ignore_case: bool + :param remove_trailing_stop_words: A value indicating whether to ignore the last search term if it's a stop word. Default is true. - :vartype remove_trailing_stop_words: bool + :type remove_trailing_stop_words: bool """ _validation = { @@ -8315,28 +5434,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword stopwords: The list of stopwords. This property and the stopwords list property cannot - both be set. - :paramtype stopwords: list[str] - :keyword stopwords_list: A predefined list of stopwords to use. This property and the stopwords - property cannot both be set. Default is English. Possible values include: "arabic", "armenian", - "basque", "brazilian", "bulgarian", "catalan", "czech", "danish", "dutch", "english", - "finnish", "french", "galician", "german", "greek", "hindi", "hungarian", "indonesian", - "irish", "italian", "latvian", "norwegian", "persian", "portuguese", "romanian", "russian", - "sorani", "spanish", "swedish", "thai", "turkish". - :paramtype stopwords_list: str or ~azure.search.documents.indexes.models.StopwordsList - :keyword ignore_case: A value indicating whether to ignore case. If true, all words are - converted to lower case first. Default is false. - :paramtype ignore_case: bool - :keyword remove_trailing_stop_words: A value indicating whether to ignore the last search term - if it's a stop word. Default is true. - :paramtype remove_trailing_stop_words: bool - """ super(StopwordsTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.StopwordsTokenFilter' # type: str self.stopwords = kwargs.get('stopwords', None) @@ -8352,14 +5449,14 @@ class Suggester(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the suggester. - :vartype name: str - :ivar search_mode: A value indicating the capabilities of the suggester. Has constant value: - "analyzingInfixMatching". + :param name: Required. The name of the suggester. + :type name: str + :ivar search_mode: Required. A value indicating the capabilities of the suggester. Default + value: "analyzingInfixMatching". :vartype search_mode: str - :ivar source_fields: Required. The list of field names to which the suggester applies. Each + :param source_fields: Required. The list of field names to which the suggester applies. Each field must be searchable. - :vartype source_fields: list[str] + :type source_fields: list[str] """ _validation = { @@ -8380,13 +5477,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the suggester. - :paramtype name: str - :keyword source_fields: Required. The list of field names to which the suggester applies. Each - field must be searchable. - :paramtype source_fields: list[str] - """ super(Suggester, self).__init__(**kwargs) self.name = kwargs['name'] self.source_fields = kwargs['source_fields'] @@ -8399,15 +5489,15 @@ class SynonymMap(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the synonym map. - :vartype name: str - :ivar format: The format of the synonym map. Only the 'solr' format is currently supported. Has - constant value: "solr". + :param name: Required. The name of the synonym map. + :type name: str + :ivar format: Required. The format of the synonym map. Only the 'solr' format is currently + supported. Default value: "solr". :vartype format: str - :ivar synonyms: Required. A series of synonym rules in the specified synonym map format. The + :param synonyms: Required. A series of synonym rules in the specified synonym map format. The rules must be separated by newlines. - :vartype synonyms: str - :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault. + :type synonyms: str + :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive @@ -8415,9 +5505,9 @@ class SynonymMap(msrest.serialization.Model): needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :ivar e_tag: The ETag of the synonym map. - :vartype e_tag: str + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :param e_tag: The ETag of the synonym map. + :type e_tag: str """ _validation = { @@ -8440,24 +5530,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the synonym map. - :paramtype name: str - :keyword synonyms: Required. A series of synonym rules in the specified synonym map format. The - rules must be separated by newlines. - :paramtype synonyms: str - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your data when you - want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive - Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive - Search will ignore attempts to set this property to null. You can change this property as - needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with - customer-managed keys is not available for free search services, and is only available for paid - services created on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :keyword e_tag: The ETag of the synonym map. - :paramtype e_tag: str - """ super(SynonymMap, self).__init__(**kwargs) self.name = kwargs['name'] self.synonyms = kwargs['synonyms'] @@ -8470,30 +5542,30 @@ class SynonymTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar synonyms: Required. A list of synonyms in following one of two formats: 1. incredible, + :type name: str + :param synonyms: Required. A list of synonyms in following one of two formats: 1. incredible, unbelievable, fabulous => amazing - all terms on the left side of => symbol will be replaced with all terms on its right side; 2. incredible, unbelievable, fabulous, amazing - comma separated list of equivalent words. Set the expand option to change how this list is interpreted. - :vartype synonyms: list[str] - :ivar ignore_case: A value indicating whether to case-fold input for matching. Default is + :type synonyms: list[str] + :param ignore_case: A value indicating whether to case-fold input for matching. Default is false. - :vartype ignore_case: bool - :ivar expand: A value indicating whether all words in the list of synonyms (if => notation is + :type ignore_case: bool + :param expand: A value indicating whether all words in the list of synonyms (if => notation is not used) will map to one another. If true, all words in the list of synonyms (if => notation is not used) will map to one another. The following list: incredible, unbelievable, fabulous, amazing is equivalent to: incredible, unbelievable, fabulous, amazing => incredible, unbelievable, fabulous, amazing. If false, the following list: incredible, unbelievable, fabulous, amazing will be equivalent to: incredible, unbelievable, fabulous, amazing => incredible. Default is true. - :vartype expand: bool + :type expand: bool """ _validation = { @@ -8514,29 +5586,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword synonyms: Required. A list of synonyms in following one of two formats: 1. incredible, - unbelievable, fabulous => amazing - all terms on the left side of => symbol will be replaced - with all terms on its right side; 2. incredible, unbelievable, fabulous, amazing - comma - separated list of equivalent words. Set the expand option to change how this list is - interpreted. - :paramtype synonyms: list[str] - :keyword ignore_case: A value indicating whether to case-fold input for matching. Default is - false. - :paramtype ignore_case: bool - :keyword expand: A value indicating whether all words in the list of synonyms (if => notation - is not used) will map to one another. If true, all words in the list of synonyms (if => - notation is not used) will map to one another. The following list: incredible, unbelievable, - fabulous, amazing is equivalent to: incredible, unbelievable, fabulous, amazing => incredible, - unbelievable, fabulous, amazing. If false, the following list: incredible, unbelievable, - fabulous, amazing will be equivalent to: incredible, unbelievable, fabulous, amazing => - incredible. Default is true. - :paramtype expand: bool - """ super(SynonymTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.SynonymTokenFilter' # type: str self.synonyms = kwargs['synonyms'] @@ -8549,21 +5598,20 @@ class TagScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Indicates the type of function to use. Valid values include magnitude, + :param type: Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server. - :vartype type: str - :ivar field_name: Required. The name of the field used as input to the scoring function. - :vartype field_name: str - :ivar boost: Required. A multiplier for the raw score. Must be a positive number not equal to + :type type: str + :param field_name: Required. The name of the field used as input to the scoring function. + :type field_name: str + :param boost: Required. A multiplier for the raw score. Must be a positive number not equal to 1.0. - :vartype boost: float - :ivar interpolation: A value indicating how boosting will be interpolated across document + :type boost: float + :param interpolation: A value indicating how boosting will be interpolated across document scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", "logarithmic". - :vartype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :ivar parameters: Required. Parameter values for the tag scoring function. - :vartype parameters: ~azure.search.documents.indexes.models.TagScoringParameters + :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation + :param parameters: Required. Parameter values for the tag scoring function. + :type parameters: ~azure.search.documents.indexes.models.TagScoringParameters """ _validation = { @@ -8585,20 +5633,6 @@ def __init__( self, **kwargs ): - """ - :keyword field_name: Required. The name of the field used as input to the scoring function. - :paramtype field_name: str - :keyword boost: Required. A multiplier for the raw score. Must be a positive number not equal - to 1.0. - :paramtype boost: float - :keyword interpolation: A value indicating how boosting will be interpolated across document - scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", - "logarithmic". - :paramtype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :keyword parameters: Required. Parameter values for the tag scoring function. - :paramtype parameters: ~azure.search.documents.indexes.models.TagScoringParameters - """ super(TagScoringFunction, self).__init__(**kwargs) self.type = 'tag' # type: str self.parameters = kwargs['parameters'] @@ -8609,9 +5643,9 @@ class TagScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar tags_parameter: Required. The name of the parameter passed in search queries to specify + :param tags_parameter: Required. The name of the parameter passed in search queries to specify the list of tags to compare against the target field. - :vartype tags_parameter: str + :type tags_parameter: str """ _validation = { @@ -8626,11 +5660,6 @@ def __init__( self, **kwargs ): - """ - :keyword tags_parameter: Required. The name of the parameter passed in search queries to - specify the list of tags to compare against the target field. - :paramtype tags_parameter: str - """ super(TagScoringParameters, self).__init__(**kwargs) self.tags_parameter = kwargs['tags_parameter'] @@ -8640,53 +5669,52 @@ class TextTranslationSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_to_language_code: Required. The language code to translate documents into for + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_to_language_code: Required. The language code to translate documents into for documents that don't specify the to language explicitly. Possible values include: "af", "ar", "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw", - "tlh", "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", - "pt-br", "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", - "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa". - :vartype default_to_language_code: str or + "tlh", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "otq", "ro", "ru", "sm", + "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", "ur", + "vi", "cy", "yua". + :type default_to_language_code: str or ~azure.search.documents.indexes.models.TextTranslationSkillLanguage - :ivar default_from_language_code: The language code to translate documents from for documents + :param default_from_language_code: The language code to translate documents from for documents that don't specify the from language explicitly. Possible values include: "af", "ar", "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw", "tlh", - "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "pt-br", - "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", - "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa". - :vartype default_from_language_code: str or + "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "otq", "ro", "ru", "sm", "sr-Cyrl", + "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", + "yua". + :type default_from_language_code: str or ~azure.search.documents.indexes.models.TextTranslationSkillLanguage - :ivar suggested_from: The language code to translate documents from when neither the + :param suggested_from: The language code to translate documents from when neither the fromLanguageCode input nor the defaultFromLanguageCode parameter are provided, and the automatic language detection is unsuccessful. Default is en. Possible values include: "af", "ar", "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", - "sw", "tlh", "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", - "pt", "pt-br", "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", - "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", - "pa". - :vartype suggested_from: str or + "sw", "tlh", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "otq", "ro", "ru", + "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", + "ur", "vi", "cy", "yua". + :type suggested_from: str or ~azure.search.documents.indexes.models.TextTranslationSkillLanguage """ @@ -8713,54 +5741,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_to_language_code: Required. The language code to translate documents into for - documents that don't specify the to language explicitly. Possible values include: "af", "ar", - "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", - "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw", - "tlh", "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", - "pt-br", "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", - "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa". - :paramtype default_to_language_code: str or - ~azure.search.documents.indexes.models.TextTranslationSkillLanguage - :keyword default_from_language_code: The language code to translate documents from for - documents that don't specify the from language explicitly. Possible values include: "af", "ar", - "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", - "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw", - "tlh", "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", - "pt-br", "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", - "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa". - :paramtype default_from_language_code: str or - ~azure.search.documents.indexes.models.TextTranslationSkillLanguage - :keyword suggested_from: The language code to translate documents from when neither the - fromLanguageCode input nor the defaultFromLanguageCode parameter are provided, and the - automatic language detection is unsuccessful. Default is en. Possible values include: "af", - "ar", "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", - "fj", "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", - "sw", "tlh", "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", - "pt", "pt-br", "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", - "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", - "pa". - :paramtype suggested_from: str or - ~azure.search.documents.indexes.models.TextTranslationSkillLanguage - """ super(TextTranslationSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Text.TranslationSkill' # type: str self.default_to_language_code = kwargs['default_to_language_code'] @@ -8773,9 +5753,9 @@ class TextWeights(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar weights: Required. The dictionary of per-field weights to boost document scoring. The + :param weights: Required. The dictionary of per-field weights to boost document scoring. The keys are field names and the values are the weights for each field. - :vartype weights: dict[str, float] + :type weights: dict[str, float] """ _validation = { @@ -8790,11 +5770,6 @@ def __init__( self, **kwargs ): - """ - :keyword weights: Required. The dictionary of per-field weights to boost document scoring. The - keys are field names and the values are the weights for each field. - :paramtype weights: dict[str, float] - """ super(TextWeights, self).__init__(**kwargs) self.weights = kwargs['weights'] @@ -8804,15 +5779,15 @@ class TruncateTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar length: The length at which terms will be truncated. Default and maximum is 300. - :vartype length: int + :type name: str + :param length: The length at which terms will be truncated. Default and maximum is 300. + :type length: int """ _validation = { @@ -8831,14 +5806,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword length: The length at which terms will be truncated. Default and maximum is 300. - :paramtype length: int - """ super(TruncateTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.TruncateTokenFilter' # type: str self.length = kwargs.get('length', 300) @@ -8849,16 +5816,16 @@ class UaxUrlEmailTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the + :type name: str + :param max_token_length: The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters. - :vartype max_token_length: int + :type max_token_length: int """ _validation = { @@ -8877,15 +5844,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the - maximum length are split. The maximum token length that can be used is 300 characters. - :paramtype max_token_length: int - """ super(UaxUrlEmailTokenizer, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.UaxUrlEmailTokenizer' # type: str self.max_token_length = kwargs.get('max_token_length', 255) @@ -8896,16 +5854,16 @@ class UniqueTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar only_on_same_position: A value indicating whether to remove duplicates only at the same + :type name: str + :param only_on_same_position: A value indicating whether to remove duplicates only at the same position. Default is false. - :vartype only_on_same_position: bool + :type only_on_same_position: bool """ _validation = { @@ -8923,15 +5881,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword only_on_same_position: A value indicating whether to remove duplicates only at the - same position. Default is false. - :paramtype only_on_same_position: bool - """ super(UniqueTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.UniqueTokenFilter' # type: str self.only_on_same_position = kwargs.get('only_on_same_position', False) @@ -8942,38 +5891,38 @@ class WebApiSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar uri: Required. The url for the Web API. - :vartype uri: str - :ivar http_headers: The headers required to make the http request. - :vartype http_headers: dict[str, str] - :ivar http_method: The method for the http request. - :vartype http_method: str - :ivar timeout: The desired timeout for the request. Default is 30 seconds. - :vartype timeout: ~datetime.timedelta - :ivar batch_size: The desired batch size which indicates number of documents. - :vartype batch_size: int - :ivar degree_of_parallelism: If set, the number of parallel calls that can be made to the Web + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param uri: Required. The url for the Web API. + :type uri: str + :param http_headers: The headers required to make the http request. + :type http_headers: dict[str, str] + :param http_method: The method for the http request. + :type http_method: str + :param timeout: The desired timeout for the request. Default is 30 seconds. + :type timeout: ~datetime.timedelta + :param batch_size: The desired batch size which indicates number of documents. + :type batch_size: int + :param degree_of_parallelism: If set, the number of parallel calls that can be made to the Web API. - :vartype degree_of_parallelism: int + :type degree_of_parallelism: int """ _validation = { @@ -9002,38 +5951,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword uri: Required. The url for the Web API. - :paramtype uri: str - :keyword http_headers: The headers required to make the http request. - :paramtype http_headers: dict[str, str] - :keyword http_method: The method for the http request. - :paramtype http_method: str - :keyword timeout: The desired timeout for the request. Default is 30 seconds. - :paramtype timeout: ~datetime.timedelta - :keyword batch_size: The desired batch size which indicates number of documents. - :paramtype batch_size: int - :keyword degree_of_parallelism: If set, the number of parallel calls that can be made to the - Web API. - :paramtype degree_of_parallelism: int - """ super(WebApiSkill, self).__init__(**kwargs) self.odata_type = '#Microsoft.Skills.Custom.WebApiSkill' # type: str self.uri = kwargs['uri'] @@ -9049,43 +5966,43 @@ class WordDelimiterTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar generate_word_parts: A value indicating whether to generate part words. If set, causes + :type name: str + :param generate_word_parts: A value indicating whether to generate part words. If set, causes parts of words to be generated; for example "AzureSearch" becomes "Azure" "Search". Default is true. - :vartype generate_word_parts: bool - :ivar generate_number_parts: A value indicating whether to generate number subwords. Default is - true. - :vartype generate_number_parts: bool - :ivar catenate_words: A value indicating whether maximum runs of word parts will be catenated. + :type generate_word_parts: bool + :param generate_number_parts: A value indicating whether to generate number subwords. Default + is true. + :type generate_number_parts: bool + :param catenate_words: A value indicating whether maximum runs of word parts will be catenated. For example, if this is set to true, "Azure-Search" becomes "AzureSearch". Default is false. - :vartype catenate_words: bool - :ivar catenate_numbers: A value indicating whether maximum runs of number parts will be + :type catenate_words: bool + :param catenate_numbers: A value indicating whether maximum runs of number parts will be catenated. For example, if this is set to true, "1-2" becomes "12". Default is false. - :vartype catenate_numbers: bool - :ivar catenate_all: A value indicating whether all subword parts will be catenated. For + :type catenate_numbers: bool + :param catenate_all: A value indicating whether all subword parts will be catenated. For example, if this is set to true, "Azure-Search-1" becomes "AzureSearch1". Default is false. - :vartype catenate_all: bool - :ivar split_on_case_change: A value indicating whether to split words on caseChange. For + :type catenate_all: bool + :param split_on_case_change: A value indicating whether to split words on caseChange. For example, if this is set to true, "AzureSearch" becomes "Azure" "Search". Default is true. - :vartype split_on_case_change: bool - :ivar preserve_original: A value indicating whether original words will be preserved and added + :type split_on_case_change: bool + :param preserve_original: A value indicating whether original words will be preserved and added to the subword list. Default is false. - :vartype preserve_original: bool - :ivar split_on_numerics: A value indicating whether to split on numbers. For example, if this + :type preserve_original: bool + :param split_on_numerics: A value indicating whether to split on numbers. For example, if this is set to true, "Azure1Search" becomes "Azure" "1" "Search". Default is true. - :vartype split_on_numerics: bool - :ivar stem_english_possessive: A value indicating whether to remove trailing "'s" for each + :type split_on_numerics: bool + :param stem_english_possessive: A value indicating whether to remove trailing "'s" for each subword. Default is true. - :vartype stem_english_possessive: bool - :ivar protected_words: A list of tokens to protect from being delimited. - :vartype protected_words: list[str] + :type stem_english_possessive: bool + :param protected_words: A list of tokens to protect from being delimited. + :type protected_words: list[str] """ _validation = { @@ -9112,43 +6029,6 @@ def __init__( self, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword generate_word_parts: A value indicating whether to generate part words. If set, causes - parts of words to be generated; for example "AzureSearch" becomes "Azure" "Search". Default is - true. - :paramtype generate_word_parts: bool - :keyword generate_number_parts: A value indicating whether to generate number subwords. Default - is true. - :paramtype generate_number_parts: bool - :keyword catenate_words: A value indicating whether maximum runs of word parts will be - catenated. For example, if this is set to true, "Azure-Search" becomes "AzureSearch". Default - is false. - :paramtype catenate_words: bool - :keyword catenate_numbers: A value indicating whether maximum runs of number parts will be - catenated. For example, if this is set to true, "1-2" becomes "12". Default is false. - :paramtype catenate_numbers: bool - :keyword catenate_all: A value indicating whether all subword parts will be catenated. For - example, if this is set to true, "Azure-Search-1" becomes "AzureSearch1". Default is false. - :paramtype catenate_all: bool - :keyword split_on_case_change: A value indicating whether to split words on caseChange. For - example, if this is set to true, "AzureSearch" becomes "Azure" "Search". Default is true. - :paramtype split_on_case_change: bool - :keyword preserve_original: A value indicating whether original words will be preserved and - added to the subword list. Default is false. - :paramtype preserve_original: bool - :keyword split_on_numerics: A value indicating whether to split on numbers. For example, if - this is set to true, "Azure1Search" becomes "Azure" "1" "Search". Default is true. - :paramtype split_on_numerics: bool - :keyword stem_english_possessive: A value indicating whether to remove trailing "'s" for each - subword. Default is true. - :paramtype stem_english_possessive: bool - :keyword protected_words: A list of tokens to protect from being delimited. - :paramtype protected_words: list[str] - """ super(WordDelimiterTokenFilter, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.WordDelimiterTokenFilter' # type: str self.generate_word_parts = kwargs.get('generate_word_parts', True) diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_models_py3.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_models_py3.py index 9c04d4c732a4..6ed9c832e82f 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_models_py3.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_models_py3.py @@ -53,8 +53,6 @@ def __init__( self, **kwargs ): - """ - """ super(AnalyzedTokenInfo, self).__init__(**kwargs) self.token = None self.start_offset = None @@ -67,39 +65,40 @@ class AnalyzeRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar text: Required. The text to break into tokens. - :vartype text: str - :ivar analyzer: The name of the analyzer to use to break the given text. Possible values - include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft", - "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh-Hans.lucene", - "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", "cs.lucene", - "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", "en.lucene", - "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", "gl.lucene", - "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", "he.microsoft", - "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", "id.microsoft", - "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", "ja.lucene", - "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", "lt.microsoft", - "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", "fa.lucene", - "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft", - "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene", - "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft", - "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft", - "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", - "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", - "whitespace". - :vartype analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :ivar tokenizer: The name of the tokenizer to use to break the given text. Possible values - include: "classic", "edgeNGram", "keyword_v2", "letter", "lowercase", - "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", "nGram", - "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", "whitespace". - :vartype tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName - :ivar normalizer: The name of the normalizer to use to normalize the given text. Possible - values include: "asciifolding", "elision", "lowercase", "standard", "uppercase". - :vartype normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :ivar token_filters: An optional list of token filters to use when breaking the given text. - :vartype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :ivar char_filters: An optional list of character filters to use when breaking the given text. - :vartype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] + :param text: Required. The text to break into tokens. + :type text: str + :param analyzer: The name of the analyzer to use to break the given text. If this parameter is + not specified, you must specify a tokenizer instead. The tokenizer and analyzer parameters are + mutually exclusive. Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", + "bn.microsoft", "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", + "zh-Hans.microsoft", "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", + "cs.microsoft", "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", + "en.microsoft", "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", + "fr.lucene", "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", + "gu.microsoft", "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", + "is.microsoft", "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", + "ja.microsoft", "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", + "lv.lucene", "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", + "no.lucene", "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", + "pt-PT.microsoft", "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", + "ru.lucene", "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", + "es.microsoft", "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", + "th.microsoft", "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", + "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", + "simple", "stop", "whitespace". + :type analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName + :param tokenizer: The name of the tokenizer to use to break the given text. If this parameter + is not specified, you must specify an analyzer instead. The tokenizer and analyzer parameters + are mutually exclusive. Possible values include: "classic", "edgeNGram", "keyword_v2", + "letter", "lowercase", "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", + "nGram", "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", "whitespace". + :type tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName + :param token_filters: An optional list of token filters to use when breaking the given text. + This parameter can only be set when using the tokenizer parameter. + :type token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] + :param char_filters: An optional list of character filters to use when breaking the given text. + This parameter can only be set when using the tokenizer parameter. + :type char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] """ _validation = { @@ -110,7 +109,6 @@ class AnalyzeRequest(msrest.serialization.Model): 'text': {'key': 'text', 'type': 'str'}, 'analyzer': {'key': 'analyzer', 'type': 'str'}, 'tokenizer': {'key': 'tokenizer', 'type': 'str'}, - 'normalizer': {'key': 'normalizer', 'type': 'str'}, 'token_filters': {'key': 'tokenFilters', 'type': '[str]'}, 'char_filters': {'key': 'charFilters', 'type': '[str]'}, } @@ -121,52 +119,14 @@ def __init__( text: str, analyzer: Optional[Union[str, "LexicalAnalyzerName"]] = None, tokenizer: Optional[Union[str, "LexicalTokenizerName"]] = None, - normalizer: Optional[Union[str, "LexicalNormalizerName"]] = None, token_filters: Optional[List[Union[str, "TokenFilterName"]]] = None, char_filters: Optional[List[Union[str, "CharFilterName"]]] = None, **kwargs ): - """ - :keyword text: Required. The text to break into tokens. - :paramtype text: str - :keyword analyzer: The name of the analyzer to use to break the given text. Possible values - include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft", - "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh-Hans.lucene", - "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", "cs.lucene", - "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", "en.lucene", - "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", "gl.lucene", - "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", "he.microsoft", - "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", "id.microsoft", - "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", "ja.lucene", - "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", "lt.microsoft", - "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", "fa.lucene", - "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft", - "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene", - "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft", - "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft", - "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", - "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", - "whitespace". - :paramtype analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :keyword tokenizer: The name of the tokenizer to use to break the given text. Possible values - include: "classic", "edgeNGram", "keyword_v2", "letter", "lowercase", - "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", "nGram", - "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", "whitespace". - :paramtype tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName - :keyword normalizer: The name of the normalizer to use to normalize the given text. Possible - values include: "asciifolding", "elision", "lowercase", "standard", "uppercase". - :paramtype normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :keyword token_filters: An optional list of token filters to use when breaking the given text. - :paramtype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :keyword char_filters: An optional list of character filters to use when breaking the given - text. - :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] - """ super(AnalyzeRequest, self).__init__(**kwargs) self.text = text self.analyzer = analyzer self.tokenizer = tokenizer - self.normalizer = normalizer self.token_filters = token_filters self.char_filters = char_filters @@ -176,8 +136,8 @@ class AnalyzeResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar tokens: Required. The list of tokens returned by the analyzer specified in the request. - :vartype tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo] + :param tokens: Required. The list of tokens returned by the analyzer specified in the request. + :type tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo] """ _validation = { @@ -194,11 +154,6 @@ def __init__( tokens: List["AnalyzedTokenInfo"], **kwargs ): - """ - :keyword tokens: Required. The list of tokens returned by the analyzer specified in the - request. - :paramtype tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo] - """ super(AnalyzeResult, self).__init__(**kwargs) self.tokens = tokens @@ -211,13 +166,13 @@ class TokenFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str + :type name: str """ _validation = { @@ -240,12 +195,6 @@ def __init__( name: str, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - """ super(TokenFilter, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] self.name = name @@ -256,16 +205,16 @@ class AsciiFoldingTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar preserve_original: A value indicating whether the original token will be kept. Default is - false. - :vartype preserve_original: bool + :type name: str + :param preserve_original: A value indicating whether the original token will be kept. Default + is false. + :type preserve_original: bool """ _validation = { @@ -286,15 +235,6 @@ def __init__( preserve_original: Optional[bool] = False, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword preserve_original: A value indicating whether the original token will be kept. Default - is false. - :paramtype preserve_original: bool - """ super(AsciiFoldingTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.AsciiFoldingTokenFilter' # type: str self.preserve_original = preserve_original @@ -305,12 +245,12 @@ class AzureActiveDirectoryApplicationCredentials(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar application_id: Required. An AAD Application ID that was granted the required access + :param application_id: Required. An AAD Application ID that was granted the required access permissions to the Azure Key Vault that is to be used when encrypting your data at rest. The Application ID should not be confused with the Object ID for your AAD Application. - :vartype application_id: str - :ivar application_secret: The authentication key of the specified AAD application. - :vartype application_secret: str + :type application_id: str + :param application_secret: The authentication key of the specified AAD application. + :type application_secret: str """ _validation = { @@ -329,240 +269,11 @@ def __init__( application_secret: Optional[str] = None, **kwargs ): - """ - :keyword application_id: Required. An AAD Application ID that was granted the required access - permissions to the Azure Key Vault that is to be used when encrypting your data at rest. The - Application ID should not be confused with the Object ID for your AAD Application. - :paramtype application_id: str - :keyword application_secret: The authentication key of the specified AAD application. - :paramtype application_secret: str - """ super(AzureActiveDirectoryApplicationCredentials, self).__init__(**kwargs) self.application_id = application_id self.application_secret = application_secret -class SearchIndexerSkill(msrest.serialization.Model): - """Base type for skills. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureMachineLearningSkill, WebApiSkill, CustomEntityLookupSkill, EntityRecognitionSkill, KeyPhraseExtractionSkill, LanguageDetectionSkill, MergeSkill, PIIDetectionSkill, SentimentSkill, SplitSkill, TextTranslationSkill, EntityLinkingSkill, EntityRecognitionSkillV3, SentimentSkillV3, ConditionalSkill, DocumentExtractionSkill, ShaperSkill, ImageAnalysisSkill, OcrSkill. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - } - - _subtype_map = { - 'odata_type': {'#Microsoft.Skills.Custom.AmlSkill': 'AzureMachineLearningSkill', '#Microsoft.Skills.Custom.WebApiSkill': 'WebApiSkill', '#Microsoft.Skills.Text.CustomEntityLookupSkill': 'CustomEntityLookupSkill', '#Microsoft.Skills.Text.EntityRecognitionSkill': 'EntityRecognitionSkill', '#Microsoft.Skills.Text.KeyPhraseExtractionSkill': 'KeyPhraseExtractionSkill', '#Microsoft.Skills.Text.LanguageDetectionSkill': 'LanguageDetectionSkill', '#Microsoft.Skills.Text.MergeSkill': 'MergeSkill', '#Microsoft.Skills.Text.PIIDetectionSkill': 'PIIDetectionSkill', '#Microsoft.Skills.Text.SentimentSkill': 'SentimentSkill', '#Microsoft.Skills.Text.SplitSkill': 'SplitSkill', '#Microsoft.Skills.Text.TranslationSkill': 'TextTranslationSkill', '#Microsoft.Skills.Text.V3.EntityLinkingSkill': 'EntityLinkingSkill', '#Microsoft.Skills.Text.V3.EntityRecognitionSkill': 'EntityRecognitionSkillV3', '#Microsoft.Skills.Text.V3.SentimentSkill': 'SentimentSkillV3', '#Microsoft.Skills.Util.ConditionalSkill': 'ConditionalSkill', '#Microsoft.Skills.Util.DocumentExtractionSkill': 'DocumentExtractionSkill', '#Microsoft.Skills.Util.ShaperSkill': 'ShaperSkill', '#Microsoft.Skills.Vision.ImageAnalysisSkill': 'ImageAnalysisSkill', '#Microsoft.Skills.Vision.OcrSkill': 'OcrSkill'} - } - - def __init__( - self, - *, - inputs: List["InputFieldMappingEntry"], - outputs: List["OutputFieldMappingEntry"], - name: Optional[str] = None, - description: Optional[str] = None, - context: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - """ - super(SearchIndexerSkill, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - self.name = name - self.description = description - self.context = context - self.inputs = inputs - self.outputs = outputs - - -class AzureMachineLearningSkill(SearchIndexerSkill): - """The AML skill allows you to extend AI enrichment with a custom Azure Machine Learning (AML) model. Once an AML model is trained and deployed, an AML skill integrates it into AI enrichment. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar scoring_uri: (Required for no authentication or key authentication) The scoring URI of - the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. - :vartype scoring_uri: str - :ivar authentication_key: (Required for key authentication) The key for the AML service. - :vartype authentication_key: str - :ivar resource_id: (Required for token authentication). The Azure Resource Manager resource ID - of the AML service. It should be in the format - subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. - :vartype resource_id: str - :ivar timeout: (Optional) When specified, indicates the timeout for the http client making the - API call. - :vartype timeout: ~datetime.timedelta - :ivar region: (Optional for token authentication). The region the AML service is deployed in. - :vartype region: str - :ivar degree_of_parallelism: (Optional) When specified, indicates the number of calls the - indexer will make in parallel to the endpoint you have provided. You can decrease this value if - your endpoint is failing under too high of a request load, or raise it if your endpoint is able - to accept more requests and you would like an increase in the performance of the indexer. If - not set, a default value of 5 is used. The degreeOfParallelism can be set to a maximum of 10 - and a minimum of 1. - :vartype degree_of_parallelism: int - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - 'scoring_uri': {'key': 'uri', 'type': 'str'}, - 'authentication_key': {'key': 'key', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'timeout': {'key': 'timeout', 'type': 'duration'}, - 'region': {'key': 'region', 'type': 'str'}, - 'degree_of_parallelism': {'key': 'degreeOfParallelism', 'type': 'int'}, - } - - def __init__( - self, - *, - inputs: List["InputFieldMappingEntry"], - outputs: List["OutputFieldMappingEntry"], - name: Optional[str] = None, - description: Optional[str] = None, - context: Optional[str] = None, - scoring_uri: Optional[str] = None, - authentication_key: Optional[str] = None, - resource_id: Optional[str] = None, - timeout: Optional[datetime.timedelta] = None, - region: Optional[str] = None, - degree_of_parallelism: Optional[int] = None, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword scoring_uri: (Required for no authentication or key authentication) The scoring URI of - the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. - :paramtype scoring_uri: str - :keyword authentication_key: (Required for key authentication) The key for the AML service. - :paramtype authentication_key: str - :keyword resource_id: (Required for token authentication). The Azure Resource Manager resource - ID of the AML service. It should be in the format - subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. - :paramtype resource_id: str - :keyword timeout: (Optional) When specified, indicates the timeout for the http client making - the API call. - :paramtype timeout: ~datetime.timedelta - :keyword region: (Optional for token authentication). The region the AML service is deployed - in. - :paramtype region: str - :keyword degree_of_parallelism: (Optional) When specified, indicates the number of calls the - indexer will make in parallel to the endpoint you have provided. You can decrease this value if - your endpoint is failing under too high of a request load, or raise it if your endpoint is able - to accept more requests and you would like an increase in the performance of the indexer. If - not set, a default value of 5 is used. The degreeOfParallelism can be set to a maximum of 10 - and a minimum of 1. - :paramtype degree_of_parallelism: int - """ - super(AzureMachineLearningSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) - self.odata_type = '#Microsoft.Skills.Custom.AmlSkill' # type: str - self.scoring_uri = scoring_uri - self.authentication_key = authentication_key - self.resource_id = resource_id - self.timeout = timeout - self.region = region - self.degree_of_parallelism = degree_of_parallelism - - class Similarity(msrest.serialization.Model): """Base type for similarity algorithms. Similarity algorithms are used to calculate scores that tie queries to documents. The higher the score, the more relevant the document is to that specific query. Those scores are used to rank the search results. @@ -571,8 +282,8 @@ class Similarity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Constant filled by server. - :vartype odata_type: str + :param odata_type: Required. Constant filled by server. + :type odata_type: str """ _validation = { @@ -591,8 +302,6 @@ def __init__( self, **kwargs ): - """ - """ super(Similarity, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] @@ -602,16 +311,16 @@ class BM25Similarity(Similarity): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Constant filled by server. - :vartype odata_type: str - :ivar k1: This property controls the scaling function between the term frequency of each + :param odata_type: Required. Constant filled by server. + :type odata_type: str + :param k1: This property controls the scaling function between the term frequency of each matching terms and the final relevance score of a document-query pair. By default, a value of 1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency. - :vartype k1: float - :ivar b: This property controls how the length of a document affects the relevance score. By + :type k1: float + :param b: This property controls how the length of a document affects the relevance score. By default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied, while a value of 1.0 means the score is fully normalized by the length of the document. - :vartype b: float + :type b: float """ _validation = { @@ -631,16 +340,6 @@ def __init__( b: Optional[float] = None, **kwargs ): - """ - :keyword k1: This property controls the scaling function between the term frequency of each - matching terms and the final relevance score of a document-query pair. By default, a value of - 1.2 is used. A value of 0.0 means the score does not scale with an increase in term frequency. - :paramtype k1: float - :keyword b: This property controls how the length of a document affects the relevance score. By - default, a value of 0.75 is used. A value of 0.0 means no length normalization is applied, - while a value of 1.0 means the score is fully normalized by the length of the document. - :paramtype b: float - """ super(BM25Similarity, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.BM25Similarity' # type: str self.k1 = k1 @@ -655,13 +354,13 @@ class CharFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the char filter.Constant filled by + :param odata_type: Required. Identifies the concrete type of the char filter.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the char filter. It must only contain letters, digits, + :type odata_type: str + :param name: Required. The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str + :type name: str """ _validation = { @@ -684,12 +383,6 @@ def __init__( name: str, **kwargs ): - """ - :keyword name: Required. The name of the char filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - """ super(CharFilter, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] self.name = name @@ -700,19 +393,19 @@ class CjkBigramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar ignore_scripts: The scripts to ignore. - :vartype ignore_scripts: list[str or + :type name: str + :param ignore_scripts: The scripts to ignore. + :type ignore_scripts: list[str or ~azure.search.documents.indexes.models.CjkBigramTokenFilterScripts] - :ivar output_unigrams: A value indicating whether to output both unigrams and bigrams (if + :param output_unigrams: A value indicating whether to output both unigrams and bigrams (if true), or just bigrams (if false). Default is false. - :vartype output_unigrams: bool + :type output_unigrams: bool """ _validation = { @@ -735,18 +428,6 @@ def __init__( output_unigrams: Optional[bool] = False, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword ignore_scripts: The scripts to ignore. - :paramtype ignore_scripts: list[str or - ~azure.search.documents.indexes.models.CjkBigramTokenFilterScripts] - :keyword output_unigrams: A value indicating whether to output both unigrams and bigrams (if - true), or just bigrams (if false). Default is false. - :paramtype output_unigrams: bool - """ super(CjkBigramTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.CjkBigramTokenFilter' # type: str self.ignore_scripts = ignore_scripts @@ -758,8 +439,8 @@ class ClassicSimilarity(Similarity): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Constant filled by server. - :vartype odata_type: str + :param odata_type: Required. Constant filled by server. + :type odata_type: str """ _validation = { @@ -774,8 +455,6 @@ def __init__( self, **kwargs ): - """ - """ super(ClassicSimilarity, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.ClassicSimilarity' # type: str @@ -788,13 +467,13 @@ class LexicalTokenizer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str + :type name: str """ _validation = { @@ -817,12 +496,6 @@ def __init__( name: str, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - """ super(LexicalTokenizer, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] self.name = name @@ -833,16 +506,16 @@ class ClassicTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the + :type name: str + :param max_token_length: The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters. - :vartype max_token_length: int + :type max_token_length: int """ _validation = { @@ -864,15 +537,6 @@ def __init__( max_token_length: Optional[int] = 255, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the - maximum length are split. The maximum token length that can be used is 300 characters. - :paramtype max_token_length: int - """ super(ClassicTokenizer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.ClassicTokenizer' # type: str self.max_token_length = max_token_length @@ -886,11 +550,11 @@ class CognitiveServicesAccount(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the cognitive service resource + :param odata_type: Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server. - :vartype odata_type: str - :ivar description: Description of the cognitive service resource attached to a skillset. - :vartype description: str + :type odata_type: str + :param description: Description of the cognitive service resource attached to a skillset. + :type description: str """ _validation = { @@ -912,10 +576,6 @@ def __init__( description: Optional[str] = None, **kwargs ): - """ - :keyword description: Description of the cognitive service resource attached to a skillset. - :paramtype description: str - """ super(CognitiveServicesAccount, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] self.description = description @@ -926,14 +586,14 @@ class CognitiveServicesAccountKey(CognitiveServicesAccount): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the cognitive service resource + :param odata_type: Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server. - :vartype odata_type: str - :ivar description: Description of the cognitive service resource attached to a skillset. - :vartype description: str - :ivar key: Required. The key used to provision the cognitive service resource attached to a + :type odata_type: str + :param description: Description of the cognitive service resource attached to a skillset. + :type description: str + :param key: Required. The key used to provision the cognitive service resource attached to a skillset. - :vartype key: str + :type key: str """ _validation = { @@ -954,13 +614,6 @@ def __init__( description: Optional[str] = None, **kwargs ): - """ - :keyword description: Description of the cognitive service resource attached to a skillset. - :paramtype description: str - :keyword key: Required. The key used to provision the cognitive service resource attached to a - skillset. - :paramtype key: str - """ super(CognitiveServicesAccountKey, self).__init__(description=description, **kwargs) self.odata_type = '#Microsoft.Azure.Search.CognitiveServicesByKey' # type: str self.key = key @@ -971,22 +624,22 @@ class CommonGramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar common_words: Required. The set of common words. - :vartype common_words: list[str] - :ivar ignore_case: A value indicating whether common words matching will be case insensitive. + :type name: str + :param common_words: Required. The set of common words. + :type common_words: list[str] + :param ignore_case: A value indicating whether common words matching will be case insensitive. Default is false. - :vartype ignore_case: bool - :ivar use_query_mode: A value that indicates whether the token filter is in query mode. When in - query mode, the token filter generates bigrams and then removes common words and single terms - followed by a common word. Default is false. - :vartype use_query_mode: bool + :type ignore_case: bool + :param use_query_mode: A value that indicates whether the token filter is in query mode. When + in query mode, the token filter generates bigrams and then removes common words and single + terms followed by a common word. Default is false. + :type use_query_mode: bool """ _validation = { @@ -1012,21 +665,6 @@ def __init__( use_query_mode: Optional[bool] = False, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword common_words: Required. The set of common words. - :paramtype common_words: list[str] - :keyword ignore_case: A value indicating whether common words matching will be case - insensitive. Default is false. - :paramtype ignore_case: bool - :keyword use_query_mode: A value that indicates whether the token filter is in query mode. When - in query mode, the token filter generates bigrams and then removes common words and single - terms followed by a common word. Default is false. - :paramtype use_query_mode: bool - """ super(CommonGramTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.CommonGramTokenFilter' # type: str self.common_words = common_words @@ -1034,30 +672,97 @@ def __init__( self.use_query_mode = use_query_mode +class SearchIndexerSkill(msrest.serialization.Model): + """Base type for skills. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: WebApiSkill, CustomEntityLookupSkill, EntityRecognitionSkill, KeyPhraseExtractionSkill, LanguageDetectionSkill, MergeSkill, SentimentSkill, SplitSkill, TextTranslationSkill, ConditionalSkill, DocumentExtractionSkill, ShaperSkill, ImageAnalysisSkill, OcrSkill. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by + server. + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill + with no name defined will be given a default name of its 1-based index in the skills array, + prefixed with the character '#'. + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage + of the skill. + :type description: str + :param context: Represents the level at which operations take place, such as the document root + or document content (for example, /document or /document/content). The default is /document. + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the + output of an upstream skill. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value + that can be consumed as an input by another skill. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + """ + + _validation = { + 'odata_type': {'required': True}, + 'inputs': {'required': True}, + 'outputs': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'context': {'key': 'context', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, + 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, + } + + _subtype_map = { + 'odata_type': {'#Microsoft.Skills.Custom.WebApiSkill': 'WebApiSkill', '#Microsoft.Skills.Text.CustomEntityLookupSkill': 'CustomEntityLookupSkill', '#Microsoft.Skills.Text.EntityRecognitionSkill': 'EntityRecognitionSkill', '#Microsoft.Skills.Text.KeyPhraseExtractionSkill': 'KeyPhraseExtractionSkill', '#Microsoft.Skills.Text.LanguageDetectionSkill': 'LanguageDetectionSkill', '#Microsoft.Skills.Text.MergeSkill': 'MergeSkill', '#Microsoft.Skills.Text.SentimentSkill': 'SentimentSkill', '#Microsoft.Skills.Text.SplitSkill': 'SplitSkill', '#Microsoft.Skills.Text.TranslationSkill': 'TextTranslationSkill', '#Microsoft.Skills.Util.ConditionalSkill': 'ConditionalSkill', '#Microsoft.Skills.Util.DocumentExtractionSkill': 'DocumentExtractionSkill', '#Microsoft.Skills.Util.ShaperSkill': 'ShaperSkill', '#Microsoft.Skills.Vision.ImageAnalysisSkill': 'ImageAnalysisSkill', '#Microsoft.Skills.Vision.OcrSkill': 'OcrSkill'} + } + + def __init__( + self, + *, + inputs: List["InputFieldMappingEntry"], + outputs: List["OutputFieldMappingEntry"], + name: Optional[str] = None, + description: Optional[str] = None, + context: Optional[str] = None, + **kwargs + ): + super(SearchIndexerSkill, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + self.name = name + self.description = description + self.context = context + self.inputs = inputs + self.outputs = outputs + + class ConditionalSkill(SearchIndexerSkill): """A skill that enables scenarios that require a Boolean operation to determine the data to assign to an output. All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] """ _validation = { @@ -1085,25 +790,6 @@ def __init__( context: Optional[str] = None, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - """ super(ConditionalSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Util.ConditionalSkill' # type: str @@ -1113,14 +799,14 @@ class CorsOptions(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar allowed_origins: Required. The list of origins from which JavaScript code will be granted - access to your index. Can contain a list of hosts of the form + :param allowed_origins: Required. The list of origins from which JavaScript code will be + granted access to your index. Can contain a list of hosts of the form {protocol}://{fully-qualified-domain-name}[:{port#}], or a single '*' to allow all origins (not recommended). - :vartype allowed_origins: list[str] - :ivar max_age_in_seconds: The duration for which browsers should cache CORS preflight + :type allowed_origins: list[str] + :param max_age_in_seconds: The duration for which browsers should cache CORS preflight responses. Defaults to 5 minutes. - :vartype max_age_in_seconds: long + :type max_age_in_seconds: long """ _validation = { @@ -1139,16 +825,6 @@ def __init__( max_age_in_seconds: Optional[int] = None, **kwargs ): - """ - :keyword allowed_origins: Required. The list of origins from which JavaScript code will be - granted access to your index. Can contain a list of hosts of the form - {protocol}://{fully-qualified-domain-name}[:{port#}], or a single '*' to allow all origins (not - recommended). - :paramtype allowed_origins: list[str] - :keyword max_age_in_seconds: The duration for which browsers should cache CORS preflight - responses. Defaults to 5 minutes. - :paramtype max_age_in_seconds: long - """ super(CorsOptions, self).__init__(**kwargs) self.allowed_origins = allowed_origins self.max_age_in_seconds = max_age_in_seconds @@ -1162,13 +838,13 @@ class LexicalAnalyzer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the analyzer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str + :type name: str """ _validation = { @@ -1191,12 +867,6 @@ def __init__( name: str, **kwargs ): - """ - :keyword name: Required. The name of the analyzer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - """ super(LexicalAnalyzer, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] self.name = name @@ -1207,27 +877,27 @@ class CustomAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the analyzer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar tokenizer: Required. The name of the tokenizer to use to divide continuous text into a + :type name: str + :param tokenizer: Required. The name of the tokenizer to use to divide continuous text into a sequence of tokens, such as breaking a sentence into words. Possible values include: "classic", "edgeNGram", "keyword_v2", "letter", "lowercase", "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", "nGram", "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", "whitespace". - :vartype tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName - :ivar token_filters: A list of token filters used to filter out or modify the tokens generated + :type tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName + :param token_filters: A list of token filters used to filter out or modify the tokens generated by a tokenizer. For example, you can specify a lowercase filter that converts all characters to lowercase. The filters are run in the order in which they are listed. - :vartype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :ivar char_filters: A list of character filters used to prepare input text before it is + :type token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] + :param char_filters: A list of character filters used to prepare input text before it is processed by the tokenizer. For instance, they can replace certain characters or symbols. The filters are run in the order in which they are listed. - :vartype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] + :type char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] """ _validation = { @@ -1253,26 +923,6 @@ def __init__( char_filters: Optional[List[Union[str, "CharFilterName"]]] = None, **kwargs ): - """ - :keyword name: Required. The name of the analyzer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword tokenizer: Required. The name of the tokenizer to use to divide continuous text into a - sequence of tokens, such as breaking a sentence into words. Possible values include: "classic", - "edgeNGram", "keyword_v2", "letter", "lowercase", "microsoft_language_tokenizer", - "microsoft_language_stemming_tokenizer", "nGram", "path_hierarchy_v2", "pattern", - "standard_v2", "uax_url_email", "whitespace". - :paramtype tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName - :keyword token_filters: A list of token filters used to filter out or modify the tokens - generated by a tokenizer. For example, you can specify a lowercase filter that converts all - characters to lowercase. The filters are run in the order in which they are listed. - :paramtype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :keyword char_filters: A list of character filters used to prepare input text before it is - processed by the tokenizer. For instance, they can replace certain characters or symbols. The - filters are run in the order in which they are listed. - :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] - """ super(CustomAnalyzer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.CustomAnalyzer' # type: str self.tokenizer = tokenizer @@ -1285,51 +935,51 @@ class CustomEntity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The top-level entity descriptor. Matches in the skill output will be + :param name: Required. The top-level entity descriptor. Matches in the skill output will be grouped by this name, and it should represent the "normalized" form of the text being found. - :vartype name: str - :ivar description: This field can be used as a passthrough for custom metadata about the + :type name: str + :param description: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. - :vartype description: str - :ivar type: This field can be used as a passthrough for custom metadata about the matched + :type description: str + :param type: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. - :vartype type: str - :ivar subtype: This field can be used as a passthrough for custom metadata about the matched + :type type: str + :param subtype: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. - :vartype subtype: str - :ivar id: This field can be used as a passthrough for custom metadata about the matched + :type subtype: str + :param id: This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. - :vartype id: str - :ivar case_sensitive: Defaults to false. Boolean value denoting whether comparisons with the + :type id: str + :param case_sensitive: Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to character casing. Sample case insensitive matches of "Microsoft" could be: microsoft, microSoft, MICROSOFT. - :vartype case_sensitive: bool - :ivar accent_sensitive: Defaults to false. Boolean value denoting whether comparisons with the + :type case_sensitive: bool + :param accent_sensitive: Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to accent. - :vartype accent_sensitive: bool - :ivar fuzzy_edit_distance: Defaults to 0. Maximum value of 5. Denotes the acceptable number of + :type accent_sensitive: bool + :param fuzzy_edit_distance: Defaults to 0. Maximum value of 5. Denotes the acceptable number of divergent characters that would still constitute a match with the entity name. The smallest possible fuzziness for any given match is returned. For instance, if the edit distance is set to 3, "Windows10" would still match "Windows", "Windows10" and "Windows 7". When case sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but otherwise do. - :vartype fuzzy_edit_distance: int - :ivar default_case_sensitive: Changes the default case sensitivity value for this entity. It be - used to change the default value of all aliases caseSensitive values. - :vartype default_case_sensitive: bool - :ivar default_accent_sensitive: Changes the default accent sensitivity value for this entity. + :type fuzzy_edit_distance: int + :param default_case_sensitive: Changes the default case sensitivity value for this entity. It + be used to change the default value of all aliases caseSensitive values. + :type default_case_sensitive: bool + :param default_accent_sensitive: Changes the default accent sensitivity value for this entity. It be used to change the default value of all aliases accentSensitive values. - :vartype default_accent_sensitive: bool - :ivar default_fuzzy_edit_distance: Changes the default fuzzy edit distance value for this + :type default_accent_sensitive: bool + :param default_fuzzy_edit_distance: Changes the default fuzzy edit distance value for this entity. It can be used to change the default value of all aliases fuzzyEditDistance values. - :vartype default_fuzzy_edit_distance: int - :ivar aliases: An array of complex objects that can be used to specify alternative spellings or - synonyms to the root entity name. - :vartype aliases: list[~azure.search.documents.indexes.models.CustomEntityAlias] + :type default_fuzzy_edit_distance: int + :param aliases: An array of complex objects that can be used to specify alternative spellings + or synonyms to the root entity name. + :type aliases: list[~azure.search.documents.indexes.models.CustomEntityAlias] """ _validation = { @@ -1368,53 +1018,6 @@ def __init__( aliases: Optional[List["CustomEntityAlias"]] = None, **kwargs ): - """ - :keyword name: Required. The top-level entity descriptor. Matches in the skill output will be - grouped by this name, and it should represent the "normalized" form of the text being found. - :paramtype name: str - :keyword description: This field can be used as a passthrough for custom metadata about the - matched text(s). The value of this field will appear with every match of its entity in the - skill output. - :paramtype description: str - :keyword type: This field can be used as a passthrough for custom metadata about the matched - text(s). The value of this field will appear with every match of its entity in the skill - output. - :paramtype type: str - :keyword subtype: This field can be used as a passthrough for custom metadata about the matched - text(s). The value of this field will appear with every match of its entity in the skill - output. - :paramtype subtype: str - :keyword id: This field can be used as a passthrough for custom metadata about the matched - text(s). The value of this field will appear with every match of its entity in the skill - output. - :paramtype id: str - :keyword case_sensitive: Defaults to false. Boolean value denoting whether comparisons with the - entity name should be sensitive to character casing. Sample case insensitive matches of - "Microsoft" could be: microsoft, microSoft, MICROSOFT. - :paramtype case_sensitive: bool - :keyword accent_sensitive: Defaults to false. Boolean value denoting whether comparisons with - the entity name should be sensitive to accent. - :paramtype accent_sensitive: bool - :keyword fuzzy_edit_distance: Defaults to 0. Maximum value of 5. Denotes the acceptable number - of divergent characters that would still constitute a match with the entity name. The smallest - possible fuzziness for any given match is returned. For instance, if the edit distance is set - to 3, "Windows10" would still match "Windows", "Windows10" and "Windows 7". When case - sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but - otherwise do. - :paramtype fuzzy_edit_distance: int - :keyword default_case_sensitive: Changes the default case sensitivity value for this entity. It - be used to change the default value of all aliases caseSensitive values. - :paramtype default_case_sensitive: bool - :keyword default_accent_sensitive: Changes the default accent sensitivity value for this - entity. It be used to change the default value of all aliases accentSensitive values. - :paramtype default_accent_sensitive: bool - :keyword default_fuzzy_edit_distance: Changes the default fuzzy edit distance value for this - entity. It can be used to change the default value of all aliases fuzzyEditDistance values. - :paramtype default_fuzzy_edit_distance: int - :keyword aliases: An array of complex objects that can be used to specify alternative spellings - or synonyms to the root entity name. - :paramtype aliases: list[~azure.search.documents.indexes.models.CustomEntityAlias] - """ super(CustomEntity, self).__init__(**kwargs) self.name = name self.description = description @@ -1435,14 +1038,14 @@ class CustomEntityAlias(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar text: Required. The text of the alias. - :vartype text: str - :ivar case_sensitive: Determine if the alias is case sensitive. - :vartype case_sensitive: bool - :ivar accent_sensitive: Determine if the alias is accent sensitive. - :vartype accent_sensitive: bool - :ivar fuzzy_edit_distance: Determine the fuzzy edit distance of the alias. - :vartype fuzzy_edit_distance: int + :param text: Required. The text of the alias. + :type text: str + :param case_sensitive: Determine if the alias is case sensitive. + :type case_sensitive: bool + :param accent_sensitive: Determine if the alias is accent sensitive. + :type accent_sensitive: bool + :param fuzzy_edit_distance: Determine the fuzzy edit distance of the alias. + :type fuzzy_edit_distance: int """ _validation = { @@ -1465,16 +1068,6 @@ def __init__( fuzzy_edit_distance: Optional[int] = None, **kwargs ): - """ - :keyword text: Required. The text of the alias. - :paramtype text: str - :keyword case_sensitive: Determine if the alias is case sensitive. - :paramtype case_sensitive: bool - :keyword accent_sensitive: Determine if the alias is accent sensitive. - :paramtype accent_sensitive: bool - :keyword fuzzy_edit_distance: Determine the fuzzy edit distance of the alias. - :paramtype fuzzy_edit_distance: int - """ super(CustomEntityAlias, self).__init__(**kwargs) self.text = text self.case_sensitive = case_sensitive @@ -1487,45 +1080,45 @@ class CustomEntityLookupSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "de", "en", "es", "fi", "fr", "it", "ko", "pt". - :vartype default_language_code: str or + :type default_language_code: str or ~azure.search.documents.indexes.models.CustomEntityLookupSkillLanguage - :ivar entities_definition_uri: Path to a JSON or CSV file containing all the target text to + :param entities_definition_uri: Path to a JSON or CSV file containing all the target text to match against. This entity definition is read at the beginning of an indexer run. Any updates to this file during an indexer run will not take effect until subsequent runs. This config must be accessible over HTTPS. - :vartype entities_definition_uri: str - :ivar inline_entities_definition: The inline CustomEntity definition. - :vartype inline_entities_definition: list[~azure.search.documents.indexes.models.CustomEntity] - :ivar global_default_case_sensitive: A global flag for CaseSensitive. If CaseSensitive is not + :type entities_definition_uri: str + :param inline_entities_definition: The inline CustomEntity definition. + :type inline_entities_definition: list[~azure.search.documents.indexes.models.CustomEntity] + :param global_default_case_sensitive: A global flag for CaseSensitive. If CaseSensitive is not set in CustomEntity, this value will be the default value. - :vartype global_default_case_sensitive: bool - :ivar global_default_accent_sensitive: A global flag for AccentSensitive. If AccentSensitive is - not set in CustomEntity, this value will be the default value. - :vartype global_default_accent_sensitive: bool - :ivar global_default_fuzzy_edit_distance: A global flag for FuzzyEditDistance. If + :type global_default_case_sensitive: bool + :param global_default_accent_sensitive: A global flag for AccentSensitive. If AccentSensitive + is not set in CustomEntity, this value will be the default value. + :type global_default_accent_sensitive: bool + :param global_default_fuzzy_edit_distance: A global flag for FuzzyEditDistance. If FuzzyEditDistance is not set in CustomEntity, this value will be the default value. - :vartype global_default_fuzzy_edit_distance: int + :type global_default_fuzzy_edit_distance: int """ _validation = { @@ -1565,46 +1158,6 @@ def __init__( global_default_fuzzy_edit_distance: Optional[int] = None, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "da", "de", "en", "es", "fi", "fr", "it", "ko", "pt". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.CustomEntityLookupSkillLanguage - :keyword entities_definition_uri: Path to a JSON or CSV file containing all the target text to - match against. This entity definition is read at the beginning of an indexer run. Any updates - to this file during an indexer run will not take effect until subsequent runs. This config must - be accessible over HTTPS. - :paramtype entities_definition_uri: str - :keyword inline_entities_definition: The inline CustomEntity definition. - :paramtype inline_entities_definition: - list[~azure.search.documents.indexes.models.CustomEntity] - :keyword global_default_case_sensitive: A global flag for CaseSensitive. If CaseSensitive is - not set in CustomEntity, this value will be the default value. - :paramtype global_default_case_sensitive: bool - :keyword global_default_accent_sensitive: A global flag for AccentSensitive. If AccentSensitive - is not set in CustomEntity, this value will be the default value. - :paramtype global_default_accent_sensitive: bool - :keyword global_default_fuzzy_edit_distance: A global flag for FuzzyEditDistance. If - FuzzyEditDistance is not set in CustomEntity, this value will be the default value. - :paramtype global_default_fuzzy_edit_distance: int - """ super(CustomEntityLookupSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Text.CustomEntityLookupSkill' # type: str self.default_language_code = default_language_code @@ -1615,120 +1168,6 @@ def __init__( self.global_default_fuzzy_edit_distance = global_default_fuzzy_edit_distance -class LexicalNormalizer(msrest.serialization.Model): - """Base type for normalizers. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CustomNormalizer. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the normalizer.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the normalizer. It must only contain letters, digits, spaces, - dashes or underscores, can only start and end with alphanumeric characters, and is limited to - 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', - 'standard', 'lowercase', 'uppercase', or 'elision'. - :vartype name: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - _subtype_map = { - 'odata_type': {'#Microsoft.Azure.Search.CustomNormalizer': 'CustomNormalizer'} - } - - def __init__( - self, - *, - name: str, - **kwargs - ): - """ - :keyword name: Required. The name of the normalizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named - 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - :paramtype name: str - """ - super(LexicalNormalizer, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - self.name = name - - -class CustomNormalizer(LexicalNormalizer): - """Allows you to configure normalization for filterable, sortable, and facetable fields, which by default operate with strict matching. This is a user-defined configuration consisting of at least one or more filters, which modify the token that is stored. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the normalizer.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the normalizer. It must only contain letters, digits, spaces, - dashes or underscores, can only start and end with alphanumeric characters, and is limited to - 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', - 'standard', 'lowercase', 'uppercase', or 'elision'. - :vartype name: str - :ivar token_filters: A list of token filters used to filter out or modify the input token. For - example, you can specify a lowercase filter that converts all characters to lowercase. The - filters are run in the order in which they are listed. - :vartype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :ivar char_filters: A list of character filters used to prepare input text before it is - processed. For instance, they can replace certain characters or symbols. The filters are run in - the order in which they are listed. - :vartype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] - """ - - _validation = { - 'odata_type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'token_filters': {'key': 'tokenFilters', 'type': '[str]'}, - 'char_filters': {'key': 'charFilters', 'type': '[str]'}, - } - - def __init__( - self, - *, - name: str, - token_filters: Optional[List[Union[str, "TokenFilterName"]]] = None, - char_filters: Optional[List[Union[str, "CharFilterName"]]] = None, - **kwargs - ): - """ - :keyword name: Required. The name of the normalizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named - 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - :paramtype name: str - :keyword token_filters: A list of token filters used to filter out or modify the input token. - For example, you can specify a lowercase filter that converts all characters to lowercase. The - filters are run in the order in which they are listed. - :paramtype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :keyword char_filters: A list of character filters used to prepare input text before it is - processed. For instance, they can replace certain characters or symbols. The filters are run in - the order in which they are listed. - :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] - """ - super(CustomNormalizer, self).__init__(name=name, **kwargs) - self.odata_type = '#Microsoft.Azure.Search.CustomNormalizer' # type: str - self.token_filters = token_filters - self.char_filters = char_filters - - class DataChangeDetectionPolicy(msrest.serialization.Model): """Base type for data change detection policies. @@ -1737,9 +1176,9 @@ class DataChangeDetectionPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the data change detection + :param odata_type: Required. Identifies the concrete type of the data change detection policy.Constant filled by server. - :vartype odata_type: str + :type odata_type: str """ _validation = { @@ -1758,8 +1197,6 @@ def __init__( self, **kwargs ): - """ - """ super(DataChangeDetectionPolicy, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] @@ -1772,9 +1209,9 @@ class DataDeletionDetectionPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the data deletion detection + :param odata_type: Required. Identifies the concrete type of the data deletion detection policy.Constant filled by server. - :vartype odata_type: str + :type odata_type: str """ _validation = { @@ -1793,8 +1230,6 @@ def __init__( self, **kwargs ): - """ - """ super(DataDeletionDetectionPolicy, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] @@ -1802,9 +1237,9 @@ def __init__( class DataSourceCredentials(msrest.serialization.Model): """Represents credentials that can be used to connect to a datasource. - :ivar connection_string: The connection string for the datasource. Set to ':code:``' - if you do not want the connection string updated. - :vartype connection_string: str + :param connection_string: The connection string for the datasource. Set to + ':code:``' if you do not want the connection string updated. + :type connection_string: str """ _attribute_map = { @@ -1817,11 +1252,6 @@ def __init__( connection_string: Optional[str] = None, **kwargs ): - """ - :keyword connection_string: The connection string for the datasource. Set to - ':code:``' if you do not want the connection string updated. - :paramtype connection_string: str - """ super(DataSourceCredentials, self).__init__(**kwargs) self.connection_string = connection_string @@ -1831,11 +1261,11 @@ class DefaultCognitiveServicesAccount(CognitiveServicesAccount): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the cognitive service resource + :param odata_type: Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server. - :vartype odata_type: str - :ivar description: Description of the cognitive service resource attached to a skillset. - :vartype description: str + :type odata_type: str + :param description: Description of the cognitive service resource attached to a skillset. + :type description: str """ _validation = { @@ -1853,10 +1283,6 @@ def __init__( description: Optional[str] = None, **kwargs ): - """ - :keyword description: Description of the cognitive service resource attached to a skillset. - :paramtype description: str - """ super(DefaultCognitiveServicesAccount, self).__init__(description=description, **kwargs) self.odata_type = '#Microsoft.Azure.Search.DefaultCognitiveServices' # type: str @@ -1866,27 +1292,27 @@ class DictionaryDecompounderTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar word_list: Required. The list of words to match against. - :vartype word_list: list[str] - :ivar min_word_size: The minimum word size. Only words longer than this get processed. Default + :type name: str + :param word_list: Required. The list of words to match against. + :type word_list: list[str] + :param min_word_size: The minimum word size. Only words longer than this get processed. Default is 5. Maximum is 300. - :vartype min_word_size: int - :ivar min_subword_size: The minimum subword size. Only subwords longer than this are outputted. - Default is 2. Maximum is 300. - :vartype min_subword_size: int - :ivar max_subword_size: The maximum subword size. Only subwords shorter than this are + :type min_word_size: int + :param min_subword_size: The minimum subword size. Only subwords longer than this are + outputted. Default is 2. Maximum is 300. + :type min_subword_size: int + :param max_subword_size: The maximum subword size. Only subwords shorter than this are outputted. Default is 15. Maximum is 300. - :vartype max_subword_size: int - :ivar only_longest_match: A value indicating whether to add only the longest matching subword + :type max_subword_size: int + :param only_longest_match: A value indicating whether to add only the longest matching subword to the output. Default is false. - :vartype only_longest_match: bool + :type only_longest_match: bool """ _validation = { @@ -1919,26 +1345,6 @@ def __init__( only_longest_match: Optional[bool] = False, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword word_list: Required. The list of words to match against. - :paramtype word_list: list[str] - :keyword min_word_size: The minimum word size. Only words longer than this get processed. - Default is 5. Maximum is 300. - :paramtype min_word_size: int - :keyword min_subword_size: The minimum subword size. Only subwords longer than this are - outputted. Default is 2. Maximum is 300. - :paramtype min_subword_size: int - :keyword max_subword_size: The maximum subword size. Only subwords shorter than this are - outputted. Default is 15. Maximum is 300. - :paramtype max_subword_size: int - :keyword only_longest_match: A value indicating whether to add only the longest matching - subword to the output. Default is false. - :paramtype only_longest_match: bool - """ super(DictionaryDecompounderTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter' # type: str self.word_list = word_list @@ -1956,19 +1362,18 @@ class ScoringFunction(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Indicates the type of function to use. Valid values include magnitude, + :param type: Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server. - :vartype type: str - :ivar field_name: Required. The name of the field used as input to the scoring function. - :vartype field_name: str - :ivar boost: Required. A multiplier for the raw score. Must be a positive number not equal to + :type type: str + :param field_name: Required. The name of the field used as input to the scoring function. + :type field_name: str + :param boost: Required. A multiplier for the raw score. Must be a positive number not equal to 1.0. - :vartype boost: float - :ivar interpolation: A value indicating how boosting will be interpolated across document + :type boost: float + :param interpolation: A value indicating how boosting will be interpolated across document scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", "logarithmic". - :vartype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation + :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation """ _validation = { @@ -1996,18 +1401,6 @@ def __init__( interpolation: Optional[Union[str, "ScoringFunctionInterpolation"]] = None, **kwargs ): - """ - :keyword field_name: Required. The name of the field used as input to the scoring function. - :paramtype field_name: str - :keyword boost: Required. A multiplier for the raw score. Must be a positive number not equal - to 1.0. - :paramtype boost: float - :keyword interpolation: A value indicating how boosting will be interpolated across document - scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", - "logarithmic". - :paramtype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - """ super(ScoringFunction, self).__init__(**kwargs) self.type = None # type: Optional[str] self.field_name = field_name @@ -2020,21 +1413,20 @@ class DistanceScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Indicates the type of function to use. Valid values include magnitude, + :param type: Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server. - :vartype type: str - :ivar field_name: Required. The name of the field used as input to the scoring function. - :vartype field_name: str - :ivar boost: Required. A multiplier for the raw score. Must be a positive number not equal to + :type type: str + :param field_name: Required. The name of the field used as input to the scoring function. + :type field_name: str + :param boost: Required. A multiplier for the raw score. Must be a positive number not equal to 1.0. - :vartype boost: float - :ivar interpolation: A value indicating how boosting will be interpolated across document + :type boost: float + :param interpolation: A value indicating how boosting will be interpolated across document scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", "logarithmic". - :vartype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :ivar parameters: Required. Parameter values for the distance scoring function. - :vartype parameters: ~azure.search.documents.indexes.models.DistanceScoringParameters + :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation + :param parameters: Required. Parameter values for the distance scoring function. + :type parameters: ~azure.search.documents.indexes.models.DistanceScoringParameters """ _validation = { @@ -2061,20 +1453,6 @@ def __init__( interpolation: Optional[Union[str, "ScoringFunctionInterpolation"]] = None, **kwargs ): - """ - :keyword field_name: Required. The name of the field used as input to the scoring function. - :paramtype field_name: str - :keyword boost: Required. A multiplier for the raw score. Must be a positive number not equal - to 1.0. - :paramtype boost: float - :keyword interpolation: A value indicating how boosting will be interpolated across document - scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", - "logarithmic". - :paramtype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :keyword parameters: Required. Parameter values for the distance scoring function. - :paramtype parameters: ~azure.search.documents.indexes.models.DistanceScoringParameters - """ super(DistanceScoringFunction, self).__init__(field_name=field_name, boost=boost, interpolation=interpolation, **kwargs) self.type = 'distance' # type: str self.parameters = parameters @@ -2085,12 +1463,12 @@ class DistanceScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar reference_point_parameter: Required. The name of the parameter passed in search queries + :param reference_point_parameter: Required. The name of the parameter passed in search queries to specify the reference location. - :vartype reference_point_parameter: str - :ivar boosting_distance: Required. The distance in kilometers from the reference location where - the boosting range ends. - :vartype boosting_distance: float + :type reference_point_parameter: str + :param boosting_distance: Required. The distance in kilometers from the reference location + where the boosting range ends. + :type boosting_distance: float """ _validation = { @@ -2110,14 +1488,6 @@ def __init__( boosting_distance: float, **kwargs ): - """ - :keyword reference_point_parameter: Required. The name of the parameter passed in search - queries to specify the reference location. - :paramtype reference_point_parameter: str - :keyword boosting_distance: Required. The distance in kilometers from the reference location - where the boosting range ends. - :paramtype boosting_distance: float - """ super(DistanceScoringParameters, self).__init__(**kwargs) self.reference_point_parameter = reference_point_parameter self.boosting_distance = boosting_distance @@ -2128,32 +1498,32 @@ class DocumentExtractionSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar parsing_mode: The parsingMode for the skill. Will be set to 'default' if not defined. - :vartype parsing_mode: str - :ivar data_to_extract: The type of data to be extracted for the skill. Will be set to + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param parsing_mode: The parsingMode for the skill. Will be set to 'default' if not defined. + :type parsing_mode: str + :param data_to_extract: The type of data to be extracted for the skill. Will be set to 'contentAndMetadata' if not defined. - :vartype data_to_extract: str - :ivar configuration: A dictionary of configurations for the skill. - :vartype configuration: dict[str, any] + :type data_to_extract: str + :param configuration: A dictionary of configurations for the skill. + :type configuration: dict[str, any] """ _validation = { @@ -2187,32 +1557,6 @@ def __init__( configuration: Optional[Dict[str, Any]] = None, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword parsing_mode: The parsingMode for the skill. Will be set to 'default' if not defined. - :paramtype parsing_mode: str - :keyword data_to_extract: The type of data to be extracted for the skill. Will be set to - 'contentAndMetadata' if not defined. - :paramtype data_to_extract: str - :keyword configuration: A dictionary of configurations for the skill. - :paramtype configuration: dict[str, any] - """ super(DocumentExtractionSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Util.DocumentExtractionSkill' # type: str self.parsing_mode = parsing_mode @@ -2220,58 +1564,26 @@ def __init__( self.configuration = configuration -class DocumentKeysOrIds(msrest.serialization.Model): - """DocumentKeysOrIds. - - :ivar document_keys: document keys to be reset. - :vartype document_keys: list[str] - :ivar datasource_document_ids: datasource document identifiers to be reset. - :vartype datasource_document_ids: list[str] - """ - - _attribute_map = { - 'document_keys': {'key': 'documentKeys', 'type': '[str]'}, - 'datasource_document_ids': {'key': 'datasourceDocumentIds', 'type': '[str]'}, - } - - def __init__( - self, - *, - document_keys: Optional[List[str]] = None, - datasource_document_ids: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword document_keys: document keys to be reset. - :paramtype document_keys: list[str] - :keyword datasource_document_ids: datasource document identifiers to be reset. - :paramtype datasource_document_ids: list[str] - """ - super(DocumentKeysOrIds, self).__init__(**kwargs) - self.document_keys = document_keys - self.datasource_document_ids = datasource_document_ids - - class EdgeNGramTokenFilter(TokenFilter): """Generates n-grams of the given size(s) starting from the front or the back of an input token. This token filter is implemented using Apache Lucene. All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_gram: The minimum n-gram length. Default is 1. Must be less than the value of + :type name: str + :param min_gram: The minimum n-gram length. Default is 1. Must be less than the value of maxGram. - :vartype min_gram: int - :ivar max_gram: The maximum n-gram length. Default is 2. - :vartype max_gram: int - :ivar side: Specifies which side of the input the n-gram should be generated from. Default is + :type min_gram: int + :param max_gram: The maximum n-gram length. Default is 2. + :type max_gram: int + :param side: Specifies which side of the input the n-gram should be generated from. Default is "front". Possible values include: "front", "back". - :vartype side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide + :type side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide """ _validation = { @@ -2296,20 +1608,6 @@ def __init__( side: Optional[Union[str, "EdgeNGramTokenFilterSide"]] = None, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_gram: The minimum n-gram length. Default is 1. Must be less than the value of - maxGram. - :paramtype min_gram: int - :keyword max_gram: The maximum n-gram length. Default is 2. - :paramtype max_gram: int - :keyword side: Specifies which side of the input the n-gram should be generated from. Default - is "front". Possible values include: "front", "back". - :paramtype side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide - """ super(EdgeNGramTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.EdgeNGramTokenFilter' # type: str self.min_gram = min_gram @@ -2322,21 +1620,21 @@ class EdgeNGramTokenFilterV2(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the + :type name: str + :param min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram. - :vartype min_gram: int - :ivar max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :vartype max_gram: int - :ivar side: Specifies which side of the input the n-gram should be generated from. Default is + :type min_gram: int + :param max_gram: The maximum n-gram length. Default is 2. Maximum is 300. + :type max_gram: int + :param side: Specifies which side of the input the n-gram should be generated from. Default is "front". Possible values include: "front", "back". - :vartype side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide + :type side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide """ _validation = { @@ -2363,20 +1661,6 @@ def __init__( side: Optional[Union[str, "EdgeNGramTokenFilterSide"]] = None, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than - the value of maxGram. - :paramtype min_gram: int - :keyword max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :paramtype max_gram: int - :keyword side: Specifies which side of the input the n-gram should be generated from. Default - is "front". Possible values include: "front", "back". - :paramtype side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide - """ super(EdgeNGramTokenFilterV2, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.EdgeNGramTokenFilterV2' # type: str self.min_gram = min_gram @@ -2389,20 +1673,20 @@ class EdgeNGramTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the + :type name: str + :param min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram. - :vartype min_gram: int - :ivar max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :vartype max_gram: int - :ivar token_chars: Character classes to keep in the tokens. - :vartype token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] + :type min_gram: int + :param max_gram: The maximum n-gram length. Default is 2. Maximum is 300. + :type max_gram: int + :param token_chars: Character classes to keep in the tokens. + :type token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] """ _validation = { @@ -2429,19 +1713,6 @@ def __init__( token_chars: Optional[List[Union[str, "TokenCharacterKind"]]] = None, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than - the value of maxGram. - :paramtype min_gram: int - :keyword max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :paramtype max_gram: int - :keyword token_chars: Character classes to keep in the tokens. - :paramtype token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] - """ super(EdgeNGramTokenizer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.EdgeNGramTokenizer' # type: str self.min_gram = min_gram @@ -2454,15 +1725,15 @@ class ElisionTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar articles: The set of articles to remove. - :vartype articles: list[str] + :type name: str + :param articles: The set of articles to remove. + :type articles: list[str] """ _validation = { @@ -2483,163 +1754,51 @@ def __init__( articles: Optional[List[str]] = None, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword articles: The set of articles to remove. - :paramtype articles: list[str] - """ super(ElisionTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.ElisionTokenFilter' # type: str self.articles = articles -class EntityLinkingSkill(SearchIndexerSkill): - """Using the Text Analytics API, extracts linked entities from text. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. - :vartype default_language_code: str - :ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :vartype minimum_precision: float - :ivar model_version: The version of the model to use when calling the Text Analytics service. - It will default to the latest available when not specified. We recommend you do not specify - this value unless absolutely necessary. - :vartype model_version: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - 'minimum_precision': {'maximum': 1, 'minimum': 0}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - 'default_language_code': {'key': 'defaultLanguageCode', 'type': 'str'}, - 'minimum_precision': {'key': 'minimumPrecision', 'type': 'float'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - inputs: List["InputFieldMappingEntry"], - outputs: List["OutputFieldMappingEntry"], - name: Optional[str] = None, - description: Optional[str] = None, - context: Optional[str] = None, - default_language_code: Optional[str] = None, - minimum_precision: Optional[float] = None, - model_version: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - :paramtype default_language_code: str - :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :paramtype minimum_precision: float - :keyword model_version: The version of the model to use when calling the Text Analytics - service. It will default to the latest available when not specified. We recommend you do not - specify this value unless absolutely necessary. - :paramtype model_version: str - """ - super(EntityLinkingSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) - self.odata_type = '#Microsoft.Skills.Text.V3.EntityLinkingSkill' # type: str - self.default_language_code = default_language_code - self.minimum_precision = minimum_precision - self.model_version = model_version - - class EntityRecognitionSkill(SearchIndexerSkill): """Text analytics entity recognition. All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar categories: A list of entity categories that should be extracted. - :vartype categories: list[str or ~azure.search.documents.indexes.models.EntityCategory] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param categories: A list of entity categories that should be extracted. + :type categories: list[str or ~azure.search.documents.indexes.models.EntityCategory] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "ar", "cs", "zh-Hans", "zh-Hant", "da", "nl", "en", "fi", "fr", "de", "el", "hu", "it", "ja", "ko", "no", "pl", "pt-PT", "pt-BR", "ru", "es", "sv", "tr". - :vartype default_language_code: str or + :type default_language_code: str or ~azure.search.documents.indexes.models.EntityRecognitionSkillLanguage - :ivar include_typeless_entities: Determines whether or not to include entities which are well + :param include_typeless_entities: Determines whether or not to include entities which are well known but don't conform to a pre-defined type. If this configuration is not set (default), set to null or set to false, entities which don't conform to one of the pre-defined types will not be surfaced. - :vartype include_typeless_entities: bool - :ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose + :type include_typeless_entities: bool + :param minimum_precision: A value between 0 and 1 that be used to only include entities whose confidence score is greater than the value specified. If not set (default), or if explicitly set to null, all entities will be included. - :vartype minimum_precision: float + :type minimum_precision: float """ _validation = { @@ -2675,41 +1834,6 @@ def __init__( minimum_precision: Optional[float] = None, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword categories: A list of entity categories that should be extracted. - :paramtype categories: list[str or ~azure.search.documents.indexes.models.EntityCategory] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "ar", "cs", "zh-Hans", "zh-Hant", "da", "nl", "en", "fi", "fr", "de", - "el", "hu", "it", "ja", "ko", "no", "pl", "pt-PT", "pt-BR", "ru", "es", "sv", "tr". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.EntityRecognitionSkillLanguage - :keyword include_typeless_entities: Determines whether or not to include entities which are - well known but don't conform to a pre-defined type. If this configuration is not set (default), - set to null or set to false, entities which don't conform to one of the pre-defined types will - not be surfaced. - :paramtype include_typeless_entities: bool - :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :paramtype minimum_precision: float - """ super(EntityRecognitionSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Text.EntityRecognitionSkill' # type: str self.categories = categories @@ -2718,129 +1842,18 @@ def __init__( self.minimum_precision = minimum_precision -class EntityRecognitionSkillV3(SearchIndexerSkill): - """Using the Text Analytics API, extracts entities of different types from text. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar categories: A list of entity categories that should be extracted. - :vartype categories: list[str] - :ivar default_language_code: A value indicating which language code to use. Default is en. - :vartype default_language_code: str - :ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :vartype minimum_precision: float - :ivar model_version: The version of the model to use when calling the Text Analytics service. - It will default to the latest available when not specified. We recommend you do not specify - this value unless absolutely necessary. - :vartype model_version: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - 'minimum_precision': {'maximum': 1, 'minimum': 0}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - 'categories': {'key': 'categories', 'type': '[str]'}, - 'default_language_code': {'key': 'defaultLanguageCode', 'type': 'str'}, - 'minimum_precision': {'key': 'minimumPrecision', 'type': 'float'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - inputs: List["InputFieldMappingEntry"], - outputs: List["OutputFieldMappingEntry"], - name: Optional[str] = None, - description: Optional[str] = None, - context: Optional[str] = None, - categories: Optional[List[str]] = None, - default_language_code: Optional[str] = None, - minimum_precision: Optional[float] = None, - model_version: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword categories: A list of entity categories that should be extracted. - :paramtype categories: list[str] - :keyword default_language_code: A value indicating which language code to use. Default is en. - :paramtype default_language_code: str - :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :paramtype minimum_precision: float - :keyword model_version: The version of the model to use when calling the Text Analytics - service. It will default to the latest available when not specified. We recommend you do not - specify this value unless absolutely necessary. - :paramtype model_version: str - """ - super(EntityRecognitionSkillV3, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) - self.odata_type = '#Microsoft.Skills.Text.V3.EntityRecognitionSkill' # type: str - self.categories = categories - self.default_language_code = default_language_code - self.minimum_precision = minimum_precision - self.model_version = model_version - - class FieldMapping(msrest.serialization.Model): """Defines a mapping between a field in a data source and a target field in an index. All required parameters must be populated in order to send to Azure. - :ivar source_field_name: Required. The name of the field in the data source. - :vartype source_field_name: str - :ivar target_field_name: The name of the target field in the index. Same as the source field + :param source_field_name: Required. The name of the field in the data source. + :type source_field_name: str + :param target_field_name: The name of the target field in the index. Same as the source field name by default. - :vartype target_field_name: str - :ivar mapping_function: A function to apply to each source field value before indexing. - :vartype mapping_function: ~azure.search.documents.indexes.models.FieldMappingFunction + :type target_field_name: str + :param mapping_function: A function to apply to each source field value before indexing. + :type mapping_function: ~azure.search.documents.indexes.models.FieldMappingFunction """ _validation = { @@ -2861,15 +1874,6 @@ def __init__( mapping_function: Optional["FieldMappingFunction"] = None, **kwargs ): - """ - :keyword source_field_name: Required. The name of the field in the data source. - :paramtype source_field_name: str - :keyword target_field_name: The name of the target field in the index. Same as the source field - name by default. - :paramtype target_field_name: str - :keyword mapping_function: A function to apply to each source field value before indexing. - :paramtype mapping_function: ~azure.search.documents.indexes.models.FieldMappingFunction - """ super(FieldMapping, self).__init__(**kwargs) self.source_field_name = source_field_name self.target_field_name = target_field_name @@ -2881,11 +1885,11 @@ class FieldMappingFunction(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the field mapping function. - :vartype name: str - :ivar parameters: A dictionary of parameter name/value pairs to pass to the function. Each + :param name: Required. The name of the field mapping function. + :type name: str + :param parameters: A dictionary of parameter name/value pairs to pass to the function. Each value must be of a primitive type. - :vartype parameters: dict[str, any] + :type parameters: dict[str, any] """ _validation = { @@ -2904,13 +1908,6 @@ def __init__( parameters: Optional[Dict[str, Any]] = None, **kwargs ): - """ - :keyword name: Required. The name of the field mapping function. - :paramtype name: str - :keyword parameters: A dictionary of parameter name/value pairs to pass to the function. Each - value must be of a primitive type. - :paramtype parameters: dict[str, any] - """ super(FieldMappingFunction, self).__init__(**kwargs) self.name = name self.parameters = parameters @@ -2921,21 +1918,20 @@ class FreshnessScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Indicates the type of function to use. Valid values include magnitude, + :param type: Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server. - :vartype type: str - :ivar field_name: Required. The name of the field used as input to the scoring function. - :vartype field_name: str - :ivar boost: Required. A multiplier for the raw score. Must be a positive number not equal to + :type type: str + :param field_name: Required. The name of the field used as input to the scoring function. + :type field_name: str + :param boost: Required. A multiplier for the raw score. Must be a positive number not equal to 1.0. - :vartype boost: float - :ivar interpolation: A value indicating how boosting will be interpolated across document + :type boost: float + :param interpolation: A value indicating how boosting will be interpolated across document scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", "logarithmic". - :vartype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :ivar parameters: Required. Parameter values for the freshness scoring function. - :vartype parameters: ~azure.search.documents.indexes.models.FreshnessScoringParameters + :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation + :param parameters: Required. Parameter values for the freshness scoring function. + :type parameters: ~azure.search.documents.indexes.models.FreshnessScoringParameters """ _validation = { @@ -2962,20 +1958,6 @@ def __init__( interpolation: Optional[Union[str, "ScoringFunctionInterpolation"]] = None, **kwargs ): - """ - :keyword field_name: Required. The name of the field used as input to the scoring function. - :paramtype field_name: str - :keyword boost: Required. A multiplier for the raw score. Must be a positive number not equal - to 1.0. - :paramtype boost: float - :keyword interpolation: A value indicating how boosting will be interpolated across document - scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", - "logarithmic". - :paramtype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :keyword parameters: Required. Parameter values for the freshness scoring function. - :paramtype parameters: ~azure.search.documents.indexes.models.FreshnessScoringParameters - """ super(FreshnessScoringFunction, self).__init__(field_name=field_name, boost=boost, interpolation=interpolation, **kwargs) self.type = 'freshness' # type: str self.parameters = parameters @@ -2986,9 +1968,9 @@ class FreshnessScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar boosting_duration: Required. The expiration period after which boosting will stop for a + :param boosting_duration: Required. The expiration period after which boosting will stop for a particular document. - :vartype boosting_duration: ~datetime.timedelta + :type boosting_duration: ~datetime.timedelta """ _validation = { @@ -3005,11 +1987,6 @@ def __init__( boosting_duration: datetime.timedelta, **kwargs ): - """ - :keyword boosting_duration: Required. The expiration period after which boosting will stop for - a particular document. - :paramtype boosting_duration: ~datetime.timedelta - """ super(FreshnessScoringParameters, self).__init__(**kwargs) self.boosting_duration = boosting_duration @@ -3041,8 +2018,6 @@ def __init__( self, **kwargs ): - """ - """ super(GetIndexStatisticsResult, self).__init__(**kwargs) self.document_count = None self.storage_size = None @@ -3053,11 +2028,11 @@ class HighWaterMarkChangeDetectionPolicy(DataChangeDetectionPolicy): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the data change detection + :param odata_type: Required. Identifies the concrete type of the data change detection policy.Constant filled by server. - :vartype odata_type: str - :ivar high_water_mark_column_name: Required. The name of the high water mark column. - :vartype high_water_mark_column_name: str + :type odata_type: str + :param high_water_mark_column_name: Required. The name of the high water mark column. + :type high_water_mark_column_name: str """ _validation = { @@ -3076,10 +2051,6 @@ def __init__( high_water_mark_column_name: str, **kwargs ): - """ - :keyword high_water_mark_column_name: Required. The name of the high water mark column. - :paramtype high_water_mark_column_name: str - """ super(HighWaterMarkChangeDetectionPolicy, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy' # type: str self.high_water_mark_column_name = high_water_mark_column_name @@ -3090,33 +2061,33 @@ class ImageAnalysisSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "en", "es", "ja", "pt", "zh". - :vartype default_language_code: str or + :type default_language_code: str or ~azure.search.documents.indexes.models.ImageAnalysisSkillLanguage - :ivar visual_features: A list of visual features. - :vartype visual_features: list[str or ~azure.search.documents.indexes.models.VisualFeature] - :ivar details: A string indicating which domain-specific details to return. - :vartype details: list[str or ~azure.search.documents.indexes.models.ImageDetail] + :param visual_features: A list of visual features. + :type visual_features: list[str or ~azure.search.documents.indexes.models.VisualFeature] + :param details: A string indicating which domain-specific details to return. + :type details: list[str or ~azure.search.documents.indexes.models.ImageDetail] """ _validation = { @@ -3150,33 +2121,6 @@ def __init__( details: Optional[List[Union[str, "ImageDetail"]]] = None, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "en", "es", "ja", "pt", "zh". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.ImageAnalysisSkillLanguage - :keyword visual_features: A list of visual features. - :paramtype visual_features: list[str or ~azure.search.documents.indexes.models.VisualFeature] - :keyword details: A string indicating which domain-specific details to return. - :paramtype details: list[str or ~azure.search.documents.indexes.models.ImageDetail] - """ super(ImageAnalysisSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Vision.ImageAnalysisSkill' # type: str self.default_language_code = default_language_code @@ -3184,72 +2128,6 @@ def __init__( self.details = details -class IndexerCurrentState(msrest.serialization.Model): - """Represents all of the state that defines and dictates the indexer's current execution. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar mode: The mode the indexer is running in. Possible values include: "indexingAllDocs", - "indexingResetDocs". - :vartype mode: str or ~azure.search.documents.indexes.models.IndexingMode - :ivar all_docs_initial_change_tracking_state: Change tracking state used when indexing starts - on all documents in the datasource. - :vartype all_docs_initial_change_tracking_state: str - :ivar all_docs_final_change_tracking_state: Change tracking state value when indexing finishes - on all documents in the datasource. - :vartype all_docs_final_change_tracking_state: str - :ivar reset_docs_initial_change_tracking_state: Change tracking state used when indexing starts - on select, reset documents in the datasource. - :vartype reset_docs_initial_change_tracking_state: str - :ivar reset_docs_final_change_tracking_state: Change tracking state value when indexing - finishes on select, reset documents in the datasource. - :vartype reset_docs_final_change_tracking_state: str - :ivar reset_document_keys: The list of document keys that have been reset. The document key is - the document's unique identifier for the data in the search index. The indexer will prioritize - selectively re-ingesting these keys. - :vartype reset_document_keys: list[str] - :ivar reset_datasource_document_ids: The list of datasource document ids that have been reset. - The datasource document id is the unique identifier for the data in the datasource. The indexer - will prioritize selectively re-ingesting these ids. - :vartype reset_datasource_document_ids: list[str] - """ - - _validation = { - 'mode': {'readonly': True}, - 'all_docs_initial_change_tracking_state': {'readonly': True}, - 'all_docs_final_change_tracking_state': {'readonly': True}, - 'reset_docs_initial_change_tracking_state': {'readonly': True}, - 'reset_docs_final_change_tracking_state': {'readonly': True}, - 'reset_document_keys': {'readonly': True}, - 'reset_datasource_document_ids': {'readonly': True}, - } - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'all_docs_initial_change_tracking_state': {'key': 'allDocsInitialChangeTrackingState', 'type': 'str'}, - 'all_docs_final_change_tracking_state': {'key': 'allDocsFinalChangeTrackingState', 'type': 'str'}, - 'reset_docs_initial_change_tracking_state': {'key': 'resetDocsInitialChangeTrackingState', 'type': 'str'}, - 'reset_docs_final_change_tracking_state': {'key': 'resetDocsFinalChangeTrackingState', 'type': 'str'}, - 'reset_document_keys': {'key': 'resetDocumentKeys', 'type': '[str]'}, - 'reset_datasource_document_ids': {'key': 'resetDatasourceDocumentIds', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(IndexerCurrentState, self).__init__(**kwargs) - self.mode = None - self.all_docs_initial_change_tracking_state = None - self.all_docs_final_change_tracking_state = None - self.reset_docs_initial_change_tracking_state = None - self.reset_docs_final_change_tracking_state = None - self.reset_document_keys = None - self.reset_datasource_document_ids = None - - class IndexerExecutionResult(msrest.serialization.Model): """Represents the result of an individual indexer execution. @@ -3260,13 +2138,6 @@ class IndexerExecutionResult(msrest.serialization.Model): :ivar status: Required. The outcome of this indexer execution. Possible values include: "transientFailure", "success", "inProgress", "reset". :vartype status: str or ~azure.search.documents.indexes.models.IndexerExecutionStatus - :ivar status_detail: The outcome of this indexer execution. Possible values include: - "resetDocs". - :vartype status_detail: str or - ~azure.search.documents.indexes.models.IndexerExecutionStatusDetail - :ivar current_state: All of the state that defines and dictates the indexer's current - execution. - :vartype current_state: ~azure.search.documents.indexes.models.IndexerCurrentState :ivar error_message: The error message indicating the top-level error, if any. :vartype error_message: str :ivar start_time: The start time of this indexer execution. @@ -3292,8 +2163,6 @@ class IndexerExecutionResult(msrest.serialization.Model): _validation = { 'status': {'required': True, 'readonly': True}, - 'status_detail': {'readonly': True}, - 'current_state': {'readonly': True}, 'error_message': {'readonly': True}, 'start_time': {'readonly': True}, 'end_time': {'readonly': True}, @@ -3307,8 +2176,6 @@ class IndexerExecutionResult(msrest.serialization.Model): _attribute_map = { 'status': {'key': 'status', 'type': 'str'}, - 'status_detail': {'key': 'statusDetail', 'type': 'str'}, - 'current_state': {'key': 'currentState', 'type': 'IndexerCurrentState'}, 'error_message': {'key': 'errorMessage', 'type': 'str'}, 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, @@ -3324,12 +2191,8 @@ def __init__( self, **kwargs ): - """ - """ super(IndexerExecutionResult, self).__init__(**kwargs) self.status = None - self.status_detail = None - self.current_state = None self.error_message = None self.start_time = None self.end_time = None @@ -3344,18 +2207,18 @@ def __init__( class IndexingParameters(msrest.serialization.Model): """Represents parameters for indexer execution. - :ivar batch_size: The number of items that are read from the data source and indexed as a + :param batch_size: The number of items that are read from the data source and indexed as a single batch in order to improve performance. The default depends on the data source type. - :vartype batch_size: int - :ivar max_failed_items: The maximum number of items that can fail indexing for indexer + :type batch_size: int + :param max_failed_items: The maximum number of items that can fail indexing for indexer execution to still be considered successful. -1 means no limit. Default is 0. - :vartype max_failed_items: int - :ivar max_failed_items_per_batch: The maximum number of items in a single batch that can fail + :type max_failed_items: int + :param max_failed_items_per_batch: The maximum number of items in a single batch that can fail indexing for the batch to still be considered successful. -1 means no limit. Default is 0. - :vartype max_failed_items_per_batch: int - :ivar configuration: A dictionary of indexer-specific configuration properties. Each name is + :type max_failed_items_per_batch: int + :param configuration: A dictionary of indexer-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. - :vartype configuration: ~azure.search.documents.indexes.models.IndexingParametersConfiguration + :type configuration: ~azure.search.documents.indexes.models.IndexingParametersConfiguration """ _attribute_map = { @@ -3374,21 +2237,6 @@ def __init__( configuration: Optional["IndexingParametersConfiguration"] = None, **kwargs ): - """ - :keyword batch_size: The number of items that are read from the data source and indexed as a - single batch in order to improve performance. The default depends on the data source type. - :paramtype batch_size: int - :keyword max_failed_items: The maximum number of items that can fail indexing for indexer - execution to still be considered successful. -1 means no limit. Default is 0. - :paramtype max_failed_items: int - :keyword max_failed_items_per_batch: The maximum number of items in a single batch that can - fail indexing for the batch to still be considered successful. -1 means no limit. Default is 0. - :paramtype max_failed_items_per_batch: int - :keyword configuration: A dictionary of indexer-specific configuration properties. Each name is - the name of a specific property. Each value must be of a primitive type. - :paramtype configuration: - ~azure.search.documents.indexes.models.IndexingParametersConfiguration - """ super(IndexingParameters, self).__init__(**kwargs) self.batch_size = batch_size self.max_failed_items = max_failed_items @@ -3399,73 +2247,72 @@ def __init__( class IndexingParametersConfiguration(msrest.serialization.Model): """A dictionary of indexer-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. - :ivar additional_properties: Unmatched properties from the message are deserialized to this + :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :vartype additional_properties: dict[str, any] - :ivar parsing_mode: Represents the parsing mode for indexing from an Azure blob data source. + :type additional_properties: dict[str, any] + :param parsing_mode: Represents the parsing mode for indexing from an Azure blob data source. Possible values include: "default", "text", "delimitedText", "json", "jsonArray", "jsonLines". Default value: "default". - :vartype parsing_mode: str or ~azure.search.documents.indexes.models.BlobIndexerParsingMode - :ivar excluded_file_name_extensions: Comma-delimited list of filename extensions to ignore when - processing from Azure blob storage. For example, you could exclude ".png, .mp4" to skip over - those files during indexing. - :vartype excluded_file_name_extensions: str - :ivar indexed_file_name_extensions: Comma-delimited list of filename extensions to select when + :type parsing_mode: str or ~azure.search.documents.indexes.models.BlobIndexerParsingMode + :param excluded_file_name_extensions: Comma-delimited list of filename extensions to ignore + when processing from Azure blob storage. For example, you could exclude ".png, .mp4" to skip + over those files during indexing. + :type excluded_file_name_extensions: str + :param indexed_file_name_extensions: Comma-delimited list of filename extensions to select when processing from Azure blob storage. For example, you could focus indexing on specific application files ".docx, .pptx, .msg" to specifically include those file types. - :vartype indexed_file_name_extensions: str - :ivar fail_on_unsupported_content_type: For Azure blobs, set to false if you want to continue + :type indexed_file_name_extensions: str + :param fail_on_unsupported_content_type: For Azure blobs, set to false if you want to continue indexing when an unsupported content type is encountered, and you don't know all the content types (file extensions) in advance. - :vartype fail_on_unsupported_content_type: bool - :ivar fail_on_unprocessable_document: For Azure blobs, set to false if you want to continue + :type fail_on_unsupported_content_type: bool + :param fail_on_unprocessable_document: For Azure blobs, set to false if you want to continue indexing if a document fails indexing. - :vartype fail_on_unprocessable_document: bool - :ivar index_storage_metadata_only_for_oversized_documents: For Azure blobs, set this property + :type fail_on_unprocessable_document: bool + :param index_storage_metadata_only_for_oversized_documents: For Azure blobs, set this property to true to still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors by default. For limits on blob size, see https://docs.microsoft.com/azure/search/search-limits-quotas-capacity. - :vartype index_storage_metadata_only_for_oversized_documents: bool - :ivar delimited_text_headers: For CSV blobs, specifies a comma-delimited list of column + :type index_storage_metadata_only_for_oversized_documents: bool + :param delimited_text_headers: For CSV blobs, specifies a comma-delimited list of column headers, useful for mapping source fields to destination fields in an index. - :vartype delimited_text_headers: str - :ivar delimited_text_delimiter: For CSV blobs, specifies the end-of-line single-character + :type delimited_text_headers: str + :param delimited_text_delimiter: For CSV blobs, specifies the end-of-line single-character delimiter for CSV files where each line starts a new document (for example, "|"). - :vartype delimited_text_delimiter: str - :ivar first_line_contains_headers: For CSV blobs, indicates that the first (non-blank) line of + :type delimited_text_delimiter: str + :param first_line_contains_headers: For CSV blobs, indicates that the first (non-blank) line of each blob contains headers. - :vartype first_line_contains_headers: bool - :ivar document_root: For JSON arrays, given a structured or semi-structured document, you can + :type first_line_contains_headers: bool + :param document_root: For JSON arrays, given a structured or semi-structured document, you can specify a path to the array using this property. - :vartype document_root: str - :ivar data_to_extract: Specifies the data to extract from Azure blob storage and tells the + :type document_root: str + :param data_to_extract: Specifies the data to extract from Azure blob storage and tells the indexer which data to extract from image content when "imageAction" is set to a value other than "none". This applies to embedded image content in a .PDF or other application, or image files such as .jpg and .png, in Azure blobs. Possible values include: "storageMetadata", "allMetadata", "contentAndMetadata". Default value: "contentAndMetadata". - :vartype data_to_extract: str or - ~azure.search.documents.indexes.models.BlobIndexerDataToExtract - :ivar image_action: Determines how to process embedded images and image files in Azure blob + :type data_to_extract: str or ~azure.search.documents.indexes.models.BlobIndexerDataToExtract + :param image_action: Determines how to process embedded images and image files in Azure blob storage. Setting the "imageAction" configuration to any value other than "none" requires that a skillset also be attached to that indexer. Possible values include: "none", "generateNormalizedImages", "generateNormalizedImagePerPage". Default value: "none". - :vartype image_action: str or ~azure.search.documents.indexes.models.BlobIndexerImageAction - :ivar allow_skillset_to_read_file_data: If true, will create a path //document//file_data that + :type image_action: str or ~azure.search.documents.indexes.models.BlobIndexerImageAction + :param allow_skillset_to_read_file_data: If true, will create a path //document//file_data that is an object representing the original file data downloaded from your blob data source. This allows you to pass the original file data to a custom skill for processing within the enrichment pipeline, or to the Document Extraction skill. - :vartype allow_skillset_to_read_file_data: bool - :ivar pdf_text_rotation_algorithm: Determines algorithm for text extraction from PDF files in + :type allow_skillset_to_read_file_data: bool + :param pdf_text_rotation_algorithm: Determines algorithm for text extraction from PDF files in Azure blob storage. Possible values include: "none", "detectAngles". Default value: "none". - :vartype pdf_text_rotation_algorithm: str or + :type pdf_text_rotation_algorithm: str or ~azure.search.documents.indexes.models.BlobIndexerPDFTextRotationAlgorithm - :ivar execution_environment: Specifies the environment in which the indexer should execute. + :param execution_environment: Specifies the environment in which the indexer should execute. Possible values include: "standard", "private". Default value: "standard". - :vartype execution_environment: str or + :type execution_environment: str or ~azure.search.documents.indexes.models.IndexerExecutionEnvironment - :ivar query_timeout: Increases the timeout beyond the 5-minute default for Azure SQL database + :param query_timeout: Increases the timeout beyond the 5-minute default for Azure SQL database data sources, specified in the format "hh:mm:ss". - :vartype query_timeout: str + :type query_timeout: str """ _attribute_map = { @@ -3510,75 +2357,6 @@ def __init__( query_timeout: Optional[str] = "00:05:00", **kwargs ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - :keyword parsing_mode: Represents the parsing mode for indexing from an Azure blob data source. - Possible values include: "default", "text", "delimitedText", "json", "jsonArray", "jsonLines". - Default value: "default". - :paramtype parsing_mode: str or ~azure.search.documents.indexes.models.BlobIndexerParsingMode - :keyword excluded_file_name_extensions: Comma-delimited list of filename extensions to ignore - when processing from Azure blob storage. For example, you could exclude ".png, .mp4" to skip - over those files during indexing. - :paramtype excluded_file_name_extensions: str - :keyword indexed_file_name_extensions: Comma-delimited list of filename extensions to select - when processing from Azure blob storage. For example, you could focus indexing on specific - application files ".docx, .pptx, .msg" to specifically include those file types. - :paramtype indexed_file_name_extensions: str - :keyword fail_on_unsupported_content_type: For Azure blobs, set to false if you want to - continue indexing when an unsupported content type is encountered, and you don't know all the - content types (file extensions) in advance. - :paramtype fail_on_unsupported_content_type: bool - :keyword fail_on_unprocessable_document: For Azure blobs, set to false if you want to continue - indexing if a document fails indexing. - :paramtype fail_on_unprocessable_document: bool - :keyword index_storage_metadata_only_for_oversized_documents: For Azure blobs, set this - property to true to still index storage metadata for blob content that is too large to process. - Oversized blobs are treated as errors by default. For limits on blob size, see - https://docs.microsoft.com/azure/search/search-limits-quotas-capacity. - :paramtype index_storage_metadata_only_for_oversized_documents: bool - :keyword delimited_text_headers: For CSV blobs, specifies a comma-delimited list of column - headers, useful for mapping source fields to destination fields in an index. - :paramtype delimited_text_headers: str - :keyword delimited_text_delimiter: For CSV blobs, specifies the end-of-line single-character - delimiter for CSV files where each line starts a new document (for example, "|"). - :paramtype delimited_text_delimiter: str - :keyword first_line_contains_headers: For CSV blobs, indicates that the first (non-blank) line - of each blob contains headers. - :paramtype first_line_contains_headers: bool - :keyword document_root: For JSON arrays, given a structured or semi-structured document, you - can specify a path to the array using this property. - :paramtype document_root: str - :keyword data_to_extract: Specifies the data to extract from Azure blob storage and tells the - indexer which data to extract from image content when "imageAction" is set to a value other - than "none". This applies to embedded image content in a .PDF or other application, or image - files such as .jpg and .png, in Azure blobs. Possible values include: "storageMetadata", - "allMetadata", "contentAndMetadata". Default value: "contentAndMetadata". - :paramtype data_to_extract: str or - ~azure.search.documents.indexes.models.BlobIndexerDataToExtract - :keyword image_action: Determines how to process embedded images and image files in Azure blob - storage. Setting the "imageAction" configuration to any value other than "none" requires that - a skillset also be attached to that indexer. Possible values include: "none", - "generateNormalizedImages", "generateNormalizedImagePerPage". Default value: "none". - :paramtype image_action: str or ~azure.search.documents.indexes.models.BlobIndexerImageAction - :keyword allow_skillset_to_read_file_data: If true, will create a path //document//file_data - that is an object representing the original file data downloaded from your blob data source. - This allows you to pass the original file data to a custom skill for processing within the - enrichment pipeline, or to the Document Extraction skill. - :paramtype allow_skillset_to_read_file_data: bool - :keyword pdf_text_rotation_algorithm: Determines algorithm for text extraction from PDF files - in Azure blob storage. Possible values include: "none", "detectAngles". Default value: "none". - :paramtype pdf_text_rotation_algorithm: str or - ~azure.search.documents.indexes.models.BlobIndexerPDFTextRotationAlgorithm - :keyword execution_environment: Specifies the environment in which the indexer should execute. - Possible values include: "standard", "private". Default value: "standard". - :paramtype execution_environment: str or - ~azure.search.documents.indexes.models.IndexerExecutionEnvironment - :keyword query_timeout: Increases the timeout beyond the 5-minute default for Azure SQL - database data sources, specified in the format "hh:mm:ss". - :paramtype query_timeout: str - """ super(IndexingParametersConfiguration, self).__init__(**kwargs) self.additional_properties = additional_properties self.parsing_mode = parsing_mode @@ -3604,10 +2382,10 @@ class IndexingSchedule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar interval: Required. The interval of time between indexer executions. - :vartype interval: ~datetime.timedelta - :ivar start_time: The time when an indexer should start running. - :vartype start_time: ~datetime.datetime + :param interval: Required. The interval of time between indexer executions. + :type interval: ~datetime.timedelta + :param start_time: The time when an indexer should start running. + :type start_time: ~datetime.datetime """ _validation = { @@ -3626,12 +2404,6 @@ def __init__( start_time: Optional[datetime.datetime] = None, **kwargs ): - """ - :keyword interval: Required. The interval of time between indexer executions. - :paramtype interval: ~datetime.timedelta - :keyword start_time: The time when an indexer should start running. - :paramtype start_time: ~datetime.datetime - """ super(IndexingSchedule, self).__init__(**kwargs) self.interval = interval self.start_time = start_time @@ -3642,14 +2414,14 @@ class InputFieldMappingEntry(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the input. - :vartype name: str - :ivar source: The source of the input. - :vartype source: str - :ivar source_context: The source context used for selecting recursive inputs. - :vartype source_context: str - :ivar inputs: The recursive inputs used when creating a complex type. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param name: Required. The name of the input. + :type name: str + :param source: The source of the input. + :type source: str + :param source_context: The source context used for selecting recursive inputs. + :type source_context: str + :param inputs: The recursive inputs used when creating a complex type. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] """ _validation = { @@ -3672,16 +2444,6 @@ def __init__( inputs: Optional[List["InputFieldMappingEntry"]] = None, **kwargs ): - """ - :keyword name: Required. The name of the input. - :paramtype name: str - :keyword source: The source of the input. - :paramtype source: str - :keyword source_context: The source context used for selecting recursive inputs. - :paramtype source_context: str - :keyword inputs: The recursive inputs used when creating a complex type. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - """ super(InputFieldMappingEntry, self).__init__(**kwargs) self.name = name self.source = source @@ -3694,18 +2456,18 @@ class KeepTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar keep_words: Required. The list of words to keep. - :vartype keep_words: list[str] - :ivar lower_case_keep_words: A value indicating whether to lower case all words first. Default + :type name: str + :param keep_words: Required. The list of words to keep. + :type keep_words: list[str] + :param lower_case_keep_words: A value indicating whether to lower case all words first. Default is false. - :vartype lower_case_keep_words: bool + :type lower_case_keep_words: bool """ _validation = { @@ -3729,17 +2491,6 @@ def __init__( lower_case_keep_words: Optional[bool] = False, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword keep_words: Required. The list of words to keep. - :paramtype keep_words: list[str] - :keyword lower_case_keep_words: A value indicating whether to lower case all words first. - Default is false. - :paramtype lower_case_keep_words: bool - """ super(KeepTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.KeepTokenFilter' # type: str self.keep_words = keep_words @@ -3751,37 +2502,37 @@ class KeyPhraseExtractionSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "nl", "en", "fi", "fr", "de", "it", "ja", "ko", "no", "pl", "pt-PT", "pt-BR", "ru", "es", "sv". - :vartype default_language_code: str or + :type default_language_code: str or ~azure.search.documents.indexes.models.KeyPhraseExtractionSkillLanguage - :ivar max_key_phrase_count: A number indicating how many key phrases to return. If absent, all + :param max_key_phrase_count: A number indicating how many key phrases to return. If absent, all identified key phrases will be returned. - :vartype max_key_phrase_count: int - :ivar model_version: The version of the model to use when calling the Text Analytics service. + :type max_key_phrase_count: int + :param model_version: The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary. - :vartype model_version: str + :type model_version: str """ _validation = { @@ -3815,37 +2566,6 @@ def __init__( model_version: Optional[str] = None, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "da", "nl", "en", "fi", "fr", "de", "it", "ja", "ko", "no", "pl", - "pt-PT", "pt-BR", "ru", "es", "sv". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.KeyPhraseExtractionSkillLanguage - :keyword max_key_phrase_count: A number indicating how many key phrases to return. If absent, - all identified key phrases will be returned. - :paramtype max_key_phrase_count: int - :keyword model_version: The version of the model to use when calling the Text Analytics - service. It will default to the latest available when not specified. We recommend you do not - specify this value unless absolutely necessary. - :paramtype model_version: str - """ super(KeyPhraseExtractionSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Text.KeyPhraseExtractionSkill' # type: str self.default_language_code = default_language_code @@ -3858,18 +2578,18 @@ class KeywordMarkerTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar keywords: Required. A list of words to mark as keywords. - :vartype keywords: list[str] - :ivar ignore_case: A value indicating whether to ignore case. If true, all words are converted + :type name: str + :param keywords: Required. A list of words to mark as keywords. + :type keywords: list[str] + :param ignore_case: A value indicating whether to ignore case. If true, all words are converted to lower case first. Default is false. - :vartype ignore_case: bool + :type ignore_case: bool """ _validation = { @@ -3893,17 +2613,6 @@ def __init__( ignore_case: Optional[bool] = False, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword keywords: Required. A list of words to mark as keywords. - :paramtype keywords: list[str] - :keyword ignore_case: A value indicating whether to ignore case. If true, all words are - converted to lower case first. Default is false. - :paramtype ignore_case: bool - """ super(KeywordMarkerTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.KeywordMarkerTokenFilter' # type: str self.keywords = keywords @@ -3915,15 +2624,15 @@ class KeywordTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar buffer_size: The read buffer size in bytes. Default is 256. - :vartype buffer_size: int + :type name: str + :param buffer_size: The read buffer size in bytes. Default is 256. + :type buffer_size: int """ _validation = { @@ -3944,14 +2653,6 @@ def __init__( buffer_size: Optional[int] = 256, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword buffer_size: The read buffer size in bytes. Default is 256. - :paramtype buffer_size: int - """ super(KeywordTokenizer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.KeywordTokenizer' # type: str self.buffer_size = buffer_size @@ -3962,16 +2663,16 @@ class KeywordTokenizerV2(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Default is 256. Tokens longer than the + :type name: str + :param max_token_length: The maximum token length. Default is 256. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters. - :vartype max_token_length: int + :type max_token_length: int """ _validation = { @@ -3993,15 +2694,6 @@ def __init__( max_token_length: Optional[int] = 256, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Default is 256. Tokens longer than the - maximum length are split. The maximum token length that can be used is 300 characters. - :paramtype max_token_length: int - """ super(KeywordTokenizerV2, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.KeywordTokenizerV2' # type: str self.max_token_length = max_token_length @@ -4012,32 +2704,32 @@ class LanguageDetectionSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_country_hint: A country code to use as a hint to the language detection model if + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_country_hint: A country code to use as a hint to the language detection model if it cannot disambiguate the language. - :vartype default_country_hint: str - :ivar model_version: The version of the model to use when calling the Text Analytics service. + :type default_country_hint: str + :param model_version: The version of the model to use when calling the Text Analytics service. It will default to the latest available when not specified. We recommend you do not specify this value unless absolutely necessary. - :vartype model_version: str + :type model_version: str """ _validation = { @@ -4069,32 +2761,6 @@ def __init__( model_version: Optional[str] = None, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_country_hint: A country code to use as a hint to the language detection model - if it cannot disambiguate the language. - :paramtype default_country_hint: str - :keyword model_version: The version of the model to use when calling the Text Analytics - service. It will default to the latest available when not specified. We recommend you do not - specify this value unless absolutely necessary. - :paramtype model_version: str - """ super(LanguageDetectionSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Text.LanguageDetectionSkill' # type: str self.default_country_hint = default_country_hint @@ -4106,18 +2772,18 @@ class LengthTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_length: The minimum length in characters. Default is 0. Maximum is 300. Must be less + :type name: str + :param min_length: The minimum length in characters. Default is 0. Maximum is 300. Must be less than the value of max. - :vartype min_length: int - :ivar max_length: The maximum length in characters. Default and maximum is 300. - :vartype max_length: int + :type min_length: int + :param max_length: The maximum length in characters. Default and maximum is 300. + :type max_length: int """ _validation = { @@ -4142,17 +2808,6 @@ def __init__( max_length: Optional[int] = 300, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_length: The minimum length in characters. Default is 0. Maximum is 300. Must be - less than the value of max. - :paramtype min_length: int - :keyword max_length: The maximum length in characters. Default and maximum is 300. - :paramtype max_length: int - """ super(LengthTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.LengthTokenFilter' # type: str self.min_length = min_length @@ -4164,18 +2819,18 @@ class LimitTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_count: The maximum number of tokens to produce. Default is 1. - :vartype max_token_count: int - :ivar consume_all_tokens: A value indicating whether all tokens from the input must be consumed - even if maxTokenCount is reached. Default is false. - :vartype consume_all_tokens: bool + :type name: str + :param max_token_count: The maximum number of tokens to produce. Default is 1. + :type max_token_count: int + :param consume_all_tokens: A value indicating whether all tokens from the input must be + consumed even if maxTokenCount is reached. Default is false. + :type consume_all_tokens: bool """ _validation = { @@ -4198,52 +2853,12 @@ def __init__( consume_all_tokens: Optional[bool] = False, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_count: The maximum number of tokens to produce. Default is 1. - :paramtype max_token_count: int - :keyword consume_all_tokens: A value indicating whether all tokens from the input must be - consumed even if maxTokenCount is reached. Default is false. - :paramtype consume_all_tokens: bool - """ super(LimitTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.LimitTokenFilter' # type: str self.max_token_count = max_token_count self.consume_all_tokens = consume_all_tokens -class ListAliasesResult(msrest.serialization.Model): - """Response from a List Aliases request. If successful, it includes the associated index mappings for all aliases. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar aliases: Required. The aliases in the Search service. - :vartype aliases: list[~azure.search.documents.indexes.models.SearchAlias] - """ - - _validation = { - 'aliases': {'required': True, 'readonly': True}, - } - - _attribute_map = { - 'aliases': {'key': 'value', 'type': '[SearchAlias]'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ListAliasesResult, self).__init__(**kwargs) - self.aliases = None - - class ListDataSourcesResult(msrest.serialization.Model): """Response from a List Datasources request. If successful, it includes the full definitions of all datasources. @@ -4267,8 +2882,6 @@ def __init__( self, **kwargs ): - """ - """ super(ListDataSourcesResult, self).__init__(**kwargs) self.data_sources = None @@ -4296,8 +2909,6 @@ def __init__( self, **kwargs ): - """ - """ super(ListIndexersResult, self).__init__(**kwargs) self.indexers = None @@ -4325,8 +2936,6 @@ def __init__( self, **kwargs ): - """ - """ super(ListIndexesResult, self).__init__(**kwargs) self.indexes = None @@ -4354,8 +2963,6 @@ def __init__( self, **kwargs ): - """ - """ super(ListSkillsetsResult, self).__init__(**kwargs) self.skillsets = None @@ -4383,8 +2990,6 @@ def __init__( self, **kwargs ): - """ - """ super(ListSynonymMapsResult, self).__init__(**kwargs) self.synonym_maps = None @@ -4394,18 +2999,18 @@ class LuceneStandardAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the analyzer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the + :type name: str + :param max_token_length: The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters. - :vartype max_token_length: int - :ivar stopwords: A list of stopwords. - :vartype stopwords: list[str] + :type max_token_length: int + :param stopwords: A list of stopwords. + :type stopwords: list[str] """ _validation = { @@ -4429,17 +3034,6 @@ def __init__( stopwords: Optional[List[str]] = None, **kwargs ): - """ - :keyword name: Required. The name of the analyzer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the - maximum length are split. The maximum token length that can be used is 300 characters. - :paramtype max_token_length: int - :keyword stopwords: A list of stopwords. - :paramtype stopwords: list[str] - """ super(LuceneStandardAnalyzer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.StandardAnalyzer' # type: str self.max_token_length = max_token_length @@ -4451,16 +3045,16 @@ class LuceneStandardTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the + :type name: str + :param max_token_length: The maximum token length. Default is 255. Tokens longer than the maximum length are split. - :vartype max_token_length: int + :type max_token_length: int """ _validation = { @@ -4481,15 +3075,6 @@ def __init__( max_token_length: Optional[int] = 255, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the - maximum length are split. - :paramtype max_token_length: int - """ super(LuceneStandardTokenizer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.StandardTokenizer' # type: str self.max_token_length = max_token_length @@ -4500,16 +3085,16 @@ class LuceneStandardTokenizerV2(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the + :type name: str + :param max_token_length: The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters. - :vartype max_token_length: int + :type max_token_length: int """ _validation = { @@ -4531,15 +3116,6 @@ def __init__( max_token_length: Optional[int] = 255, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the - maximum length are split. The maximum token length that can be used is 300 characters. - :paramtype max_token_length: int - """ super(LuceneStandardTokenizerV2, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.StandardTokenizerV2' # type: str self.max_token_length = max_token_length @@ -4550,21 +3126,20 @@ class MagnitudeScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Indicates the type of function to use. Valid values include magnitude, + :param type: Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server. - :vartype type: str - :ivar field_name: Required. The name of the field used as input to the scoring function. - :vartype field_name: str - :ivar boost: Required. A multiplier for the raw score. Must be a positive number not equal to + :type type: str + :param field_name: Required. The name of the field used as input to the scoring function. + :type field_name: str + :param boost: Required. A multiplier for the raw score. Must be a positive number not equal to 1.0. - :vartype boost: float - :ivar interpolation: A value indicating how boosting will be interpolated across document + :type boost: float + :param interpolation: A value indicating how boosting will be interpolated across document scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", "logarithmic". - :vartype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :ivar parameters: Required. Parameter values for the magnitude scoring function. - :vartype parameters: ~azure.search.documents.indexes.models.MagnitudeScoringParameters + :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation + :param parameters: Required. Parameter values for the magnitude scoring function. + :type parameters: ~azure.search.documents.indexes.models.MagnitudeScoringParameters """ _validation = { @@ -4591,20 +3166,6 @@ def __init__( interpolation: Optional[Union[str, "ScoringFunctionInterpolation"]] = None, **kwargs ): - """ - :keyword field_name: Required. The name of the field used as input to the scoring function. - :paramtype field_name: str - :keyword boost: Required. A multiplier for the raw score. Must be a positive number not equal - to 1.0. - :paramtype boost: float - :keyword interpolation: A value indicating how boosting will be interpolated across document - scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", - "logarithmic". - :paramtype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :keyword parameters: Required. Parameter values for the magnitude scoring function. - :paramtype parameters: ~azure.search.documents.indexes.models.MagnitudeScoringParameters - """ super(MagnitudeScoringFunction, self).__init__(field_name=field_name, boost=boost, interpolation=interpolation, **kwargs) self.type = 'magnitude' # type: str self.parameters = parameters @@ -4615,13 +3176,13 @@ class MagnitudeScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar boosting_range_start: Required. The field value at which boosting starts. - :vartype boosting_range_start: float - :ivar boosting_range_end: Required. The field value at which boosting ends. - :vartype boosting_range_end: float - :ivar should_boost_beyond_range_by_constant: A value indicating whether to apply a constant + :param boosting_range_start: Required. The field value at which boosting starts. + :type boosting_range_start: float + :param boosting_range_end: Required. The field value at which boosting ends. + :type boosting_range_end: float + :param should_boost_beyond_range_by_constant: A value indicating whether to apply a constant boost for field values beyond the range end value; default is false. - :vartype should_boost_beyond_range_by_constant: bool + :type should_boost_beyond_range_by_constant: bool """ _validation = { @@ -4643,15 +3204,6 @@ def __init__( should_boost_beyond_range_by_constant: Optional[bool] = None, **kwargs ): - """ - :keyword boosting_range_start: Required. The field value at which boosting starts. - :paramtype boosting_range_start: float - :keyword boosting_range_end: Required. The field value at which boosting ends. - :paramtype boosting_range_end: float - :keyword should_boost_beyond_range_by_constant: A value indicating whether to apply a constant - boost for field values beyond the range end value; default is false. - :paramtype should_boost_beyond_range_by_constant: bool - """ super(MagnitudeScoringParameters, self).__init__(**kwargs) self.boosting_range_start = boosting_range_start self.boosting_range_end = boosting_range_end @@ -4663,16 +3215,16 @@ class MappingCharFilter(CharFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the char filter.Constant filled by + :param odata_type: Required. Identifies the concrete type of the char filter.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the char filter. It must only contain letters, digits, + :type odata_type: str + :param name: Required. The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar mappings: Required. A list of mappings of the following format: "a=>b" (all occurrences + :type name: str + :param mappings: Required. A list of mappings of the following format: "a=>b" (all occurrences of the character "a" will be replaced with character "b"). - :vartype mappings: list[str] + :type mappings: list[str] """ _validation = { @@ -4694,15 +3246,6 @@ def __init__( mappings: List[str], **kwargs ): - """ - :keyword name: Required. The name of the char filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword mappings: Required. A list of mappings of the following format: "a=>b" (all - occurrences of the character "a" will be replaced with character "b"). - :paramtype mappings: list[str] - """ super(MappingCharFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.MappingCharFilter' # type: str self.mappings = mappings @@ -4713,31 +3256,31 @@ class MergeSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar insert_pre_tag: The tag indicates the start of the merged text. By default, the tag is an + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param insert_pre_tag: The tag indicates the start of the merged text. By default, the tag is + an empty space. + :type insert_pre_tag: str + :param insert_post_tag: The tag indicates the end of the merged text. By default, the tag is an empty space. - :vartype insert_pre_tag: str - :ivar insert_post_tag: The tag indicates the end of the merged text. By default, the tag is an - empty space. - :vartype insert_post_tag: str + :type insert_post_tag: str """ _validation = { @@ -4769,31 +3312,6 @@ def __init__( insert_post_tag: Optional[str] = " ", **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword insert_pre_tag: The tag indicates the start of the merged text. By default, the tag is - an empty space. - :paramtype insert_pre_tag: str - :keyword insert_post_tag: The tag indicates the end of the merged text. By default, the tag is - an empty space. - :paramtype insert_post_tag: str - """ super(MergeSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Text.MergeSkill' # type: str self.insert_pre_tag = insert_pre_tag @@ -4805,29 +3323,29 @@ class MicrosoftLanguageStemmingTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Tokens longer than the maximum length are + :type name: str + :param max_token_length: The maximum token length. Tokens longer than the maximum length are split. Maximum token length that can be used is 300 characters. Tokens longer than 300 characters are first split into tokens of length 300 and then each of those tokens is split based on the max token length set. Default is 255. - :vartype max_token_length: int - :ivar is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used as - the search tokenizer, set to false if used as the indexing tokenizer. Default is false. - :vartype is_search_tokenizer: bool - :ivar language: The language to use. The default is English. Possible values include: "arabic", - "bangla", "bulgarian", "catalan", "croatian", "czech", "danish", "dutch", "english", + :type max_token_length: int + :param is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used + as the search tokenizer, set to false if used as the indexing tokenizer. Default is false. + :type is_search_tokenizer: bool + :param language: The language to use. The default is English. Possible values include: + "arabic", "bangla", "bulgarian", "catalan", "croatian", "czech", "danish", "dutch", "english", "estonian", "finnish", "french", "german", "greek", "gujarati", "hebrew", "hindi", "hungarian", "icelandic", "indonesian", "italian", "kannada", "latvian", "lithuanian", "malay", "malayalam", "marathi", "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", "romanian", "russian", "serbianCyrillic", "serbianLatin", "slovak", "slovenian", "spanish", "swedish", "tamil", "telugu", "turkish", "ukrainian", "urdu". - :vartype language: str or + :type language: str or ~azure.search.documents.indexes.models.MicrosoftStemmingTokenizerLanguage """ @@ -4854,29 +3372,6 @@ def __init__( language: Optional[Union[str, "MicrosoftStemmingTokenizerLanguage"]] = None, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Tokens longer than the maximum length are - split. Maximum token length that can be used is 300 characters. Tokens longer than 300 - characters are first split into tokens of length 300 and then each of those tokens is split - based on the max token length set. Default is 255. - :paramtype max_token_length: int - :keyword is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used - as the search tokenizer, set to false if used as the indexing tokenizer. Default is false. - :paramtype is_search_tokenizer: bool - :keyword language: The language to use. The default is English. Possible values include: - "arabic", "bangla", "bulgarian", "catalan", "croatian", "czech", "danish", "dutch", "english", - "estonian", "finnish", "french", "german", "greek", "gujarati", "hebrew", "hindi", "hungarian", - "icelandic", "indonesian", "italian", "kannada", "latvian", "lithuanian", "malay", "malayalam", - "marathi", "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", - "romanian", "russian", "serbianCyrillic", "serbianLatin", "slovak", "slovenian", "spanish", - "swedish", "tamil", "telugu", "turkish", "ukrainian", "urdu". - :paramtype language: str or - ~azure.search.documents.indexes.models.MicrosoftStemmingTokenizerLanguage - """ super(MicrosoftLanguageStemmingTokenizer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.MicrosoftLanguageStemmingTokenizer' # type: str self.max_token_length = max_token_length @@ -4889,29 +3384,29 @@ class MicrosoftLanguageTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Tokens longer than the maximum length are + :type name: str + :param max_token_length: The maximum token length. Tokens longer than the maximum length are split. Maximum token length that can be used is 300 characters. Tokens longer than 300 characters are first split into tokens of length 300 and then each of those tokens is split based on the max token length set. Default is 255. - :vartype max_token_length: int - :ivar is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used as - the search tokenizer, set to false if used as the indexing tokenizer. Default is false. - :vartype is_search_tokenizer: bool - :ivar language: The language to use. The default is English. Possible values include: "bangla", - "bulgarian", "catalan", "chineseSimplified", "chineseTraditional", "croatian", "czech", - "danish", "dutch", "english", "french", "german", "greek", "gujarati", "hindi", "icelandic", - "indonesian", "italian", "japanese", "kannada", "korean", "malay", "malayalam", "marathi", - "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", "romanian", - "russian", "serbianCyrillic", "serbianLatin", "slovenian", "spanish", "swedish", "tamil", - "telugu", "thai", "ukrainian", "urdu", "vietnamese". - :vartype language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage + :type max_token_length: int + :param is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used + as the search tokenizer, set to false if used as the indexing tokenizer. Default is false. + :type is_search_tokenizer: bool + :param language: The language to use. The default is English. Possible values include: + "bangla", "bulgarian", "catalan", "chineseSimplified", "chineseTraditional", "croatian", + "czech", "danish", "dutch", "english", "french", "german", "greek", "gujarati", "hindi", + "icelandic", "indonesian", "italian", "japanese", "kannada", "korean", "malay", "malayalam", + "marathi", "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", + "romanian", "russian", "serbianCyrillic", "serbianLatin", "slovenian", "spanish", "swedish", + "tamil", "telugu", "thai", "ukrainian", "urdu", "vietnamese". + :type language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage """ _validation = { @@ -4937,28 +3432,6 @@ def __init__( language: Optional[Union[str, "MicrosoftTokenizerLanguage"]] = None, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Tokens longer than the maximum length are - split. Maximum token length that can be used is 300 characters. Tokens longer than 300 - characters are first split into tokens of length 300 and then each of those tokens is split - based on the max token length set. Default is 255. - :paramtype max_token_length: int - :keyword is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used - as the search tokenizer, set to false if used as the indexing tokenizer. Default is false. - :paramtype is_search_tokenizer: bool - :keyword language: The language to use. The default is English. Possible values include: - "bangla", "bulgarian", "catalan", "chineseSimplified", "chineseTraditional", "croatian", - "czech", "danish", "dutch", "english", "french", "german", "greek", "gujarati", "hindi", - "icelandic", "indonesian", "italian", "japanese", "kannada", "korean", "malay", "malayalam", - "marathi", "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", - "romanian", "russian", "serbianCyrillic", "serbianLatin", "slovenian", "spanish", "swedish", - "tamil", "telugu", "thai", "ukrainian", "urdu", "vietnamese". - :paramtype language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage - """ super(MicrosoftLanguageTokenizer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.MicrosoftLanguageTokenizer' # type: str self.max_token_length = max_token_length @@ -4971,18 +3444,18 @@ class NGramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_gram: The minimum n-gram length. Default is 1. Must be less than the value of + :type name: str + :param min_gram: The minimum n-gram length. Default is 1. Must be less than the value of maxGram. - :vartype min_gram: int - :ivar max_gram: The maximum n-gram length. Default is 2. - :vartype max_gram: int + :type min_gram: int + :param max_gram: The maximum n-gram length. Default is 2. + :type max_gram: int """ _validation = { @@ -5005,17 +3478,6 @@ def __init__( max_gram: Optional[int] = 2, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_gram: The minimum n-gram length. Default is 1. Must be less than the value of - maxGram. - :paramtype min_gram: int - :keyword max_gram: The maximum n-gram length. Default is 2. - :paramtype max_gram: int - """ super(NGramTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.NGramTokenFilter' # type: str self.min_gram = min_gram @@ -5027,18 +3489,18 @@ class NGramTokenFilterV2(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the + :type name: str + :param min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram. - :vartype min_gram: int - :ivar max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :vartype max_gram: int + :type min_gram: int + :param max_gram: The maximum n-gram length. Default is 2. Maximum is 300. + :type max_gram: int """ _validation = { @@ -5063,17 +3525,6 @@ def __init__( max_gram: Optional[int] = 2, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than - the value of maxGram. - :paramtype min_gram: int - :keyword max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :paramtype max_gram: int - """ super(NGramTokenFilterV2, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.NGramTokenFilterV2' # type: str self.min_gram = min_gram @@ -5085,20 +3536,20 @@ class NGramTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the + :type name: str + :param min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than the value of maxGram. - :vartype min_gram: int - :ivar max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :vartype max_gram: int - :ivar token_chars: Character classes to keep in the tokens. - :vartype token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] + :type min_gram: int + :param max_gram: The maximum n-gram length. Default is 2. Maximum is 300. + :type max_gram: int + :param token_chars: Character classes to keep in the tokens. + :type token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] """ _validation = { @@ -5125,19 +3576,6 @@ def __init__( token_chars: Optional[List[Union[str, "TokenCharacterKind"]]] = None, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword min_gram: The minimum n-gram length. Default is 1. Maximum is 300. Must be less than - the value of maxGram. - :paramtype min_gram: int - :keyword max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :paramtype max_gram: int - :keyword token_chars: Character classes to keep in the tokens. - :paramtype token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] - """ super(NGramTokenizer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.NGramTokenizer' # type: str self.min_gram = min_gram @@ -5150,37 +3588,33 @@ class OcrSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "zh-Hans", "zh-Hant", "cs", "da", "nl", "en", "fi", "fr", "de", "el", "hu", "it", "ja", "ko", "nb", "pl", "pt", "ru", "es", "sv", "tr", "ar", "ro", "sr-Cyrl", - "sr-Latn", "sk", "unk". - :vartype default_language_code: str or ~azure.search.documents.indexes.models.OcrSkillLanguage - :ivar should_detect_orientation: A value indicating to turn orientation detection on or not. + "sr-Latn", "sk". + :type default_language_code: str or ~azure.search.documents.indexes.models.OcrSkillLanguage + :param should_detect_orientation: A value indicating to turn orientation detection on or not. Default is false. - :vartype should_detect_orientation: bool - :ivar line_ending: Defines the sequence of characters to use between the lines of text - recognized by the OCR skill. The default value is "space". Possible values include: "space", - "carriageReturn", "lineFeed", "carriageReturnLineFeed". - :vartype line_ending: str or ~azure.search.documents.indexes.models.LineEnding + :type should_detect_orientation: bool """ _validation = { @@ -5198,7 +3632,6 @@ class OcrSkill(SearchIndexerSkill): 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, 'default_language_code': {'key': 'defaultLanguageCode', 'type': 'str'}, 'should_detect_orientation': {'key': 'detectOrientation', 'type': 'bool'}, - 'line_ending': {'key': 'lineEnding', 'type': 'str'}, } def __init__( @@ -5211,46 +3644,12 @@ def __init__( context: Optional[str] = None, default_language_code: Optional[Union[str, "OcrSkillLanguage"]] = None, should_detect_orientation: Optional[bool] = False, - line_ending: Optional[Union[str, "LineEnding"]] = None, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "zh-Hans", "zh-Hant", "cs", "da", "nl", "en", "fi", "fr", "de", "el", - "hu", "it", "ja", "ko", "nb", "pl", "pt", "ru", "es", "sv", "tr", "ar", "ro", "sr-Cyrl", - "sr-Latn", "sk", "unk". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.OcrSkillLanguage - :keyword should_detect_orientation: A value indicating to turn orientation detection on or not. - Default is false. - :paramtype should_detect_orientation: bool - :keyword line_ending: Defines the sequence of characters to use between the lines of text - recognized by the OCR skill. The default value is "space". Possible values include: "space", - "carriageReturn", "lineFeed", "carriageReturnLineFeed". - :paramtype line_ending: str or ~azure.search.documents.indexes.models.LineEnding - """ + **kwargs + ): super(OcrSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Vision.OcrSkill' # type: str self.default_language_code = default_language_code self.should_detect_orientation = should_detect_orientation - self.line_ending = line_ending class OutputFieldMappingEntry(msrest.serialization.Model): @@ -5258,10 +3657,10 @@ class OutputFieldMappingEntry(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the output defined by the skill. - :vartype name: str - :ivar target_name: The target name of the output. It is optional and default to name. - :vartype target_name: str + :param name: Required. The name of the output defined by the skill. + :type name: str + :param target_name: The target name of the output. It is optional and default to name. + :type target_name: str """ _validation = { @@ -5280,12 +3679,6 @@ def __init__( target_name: Optional[str] = None, **kwargs ): - """ - :keyword name: Required. The name of the output defined by the skill. - :paramtype name: str - :keyword target_name: The target name of the output. It is optional and default to name. - :paramtype target_name: str - """ super(OutputFieldMappingEntry, self).__init__(**kwargs) self.name = name self.target_name = target_name @@ -5296,24 +3689,24 @@ class PathHierarchyTokenizerV2(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar delimiter: The delimiter character to use. Default is "/". - :vartype delimiter: str - :ivar replacement: A value that, if set, replaces the delimiter character. Default is "/". - :vartype replacement: str - :ivar max_token_length: The maximum token length. Default and maximum is 300. - :vartype max_token_length: int - :ivar reverse_token_order: A value indicating whether to generate tokens in reverse order. + :type name: str + :param delimiter: The delimiter character to use. Default is "/". + :type delimiter: str + :param replacement: A value that, if set, replaces the delimiter character. Default is "/". + :type replacement: str + :param max_token_length: The maximum token length. Default and maximum is 300. + :type max_token_length: int + :param reverse_token_order: A value indicating whether to generate tokens in reverse order. Default is false. - :vartype reverse_token_order: bool - :ivar number_of_tokens_to_skip: The number of initial tokens to skip. Default is 0. - :vartype number_of_tokens_to_skip: int + :type reverse_token_order: bool + :param number_of_tokens_to_skip: The number of initial tokens to skip. Default is 0. + :type number_of_tokens_to_skip: int """ _validation = { @@ -5343,23 +3736,6 @@ def __init__( number_of_tokens_to_skip: Optional[int] = 0, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword delimiter: The delimiter character to use. Default is "/". - :paramtype delimiter: str - :keyword replacement: A value that, if set, replaces the delimiter character. Default is "/". - :paramtype replacement: str - :keyword max_token_length: The maximum token length. Default and maximum is 300. - :paramtype max_token_length: int - :keyword reverse_token_order: A value indicating whether to generate tokens in reverse order. - Default is false. - :paramtype reverse_token_order: bool - :keyword number_of_tokens_to_skip: The number of initial tokens to skip. Default is 0. - :paramtype number_of_tokens_to_skip: int - """ super(PathHierarchyTokenizerV2, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.PathHierarchyTokenizerV2' # type: str self.delimiter = delimiter @@ -5374,24 +3750,24 @@ class PatternAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the analyzer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar lower_case_terms: A value indicating whether terms should be lower-cased. Default is + :type name: str + :param lower_case_terms: A value indicating whether terms should be lower-cased. Default is true. - :vartype lower_case_terms: bool - :ivar pattern: A regular expression pattern to match token separators. Default is an expression - that matches one or more non-word characters. - :vartype pattern: str - :ivar flags: Regular expression flags. Possible values include: "CANON_EQ", "CASE_INSENSITIVE", - "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". - :vartype flags: str or ~azure.search.documents.indexes.models.RegexFlags - :ivar stopwords: A list of stopwords. - :vartype stopwords: list[str] + :type lower_case_terms: bool + :param pattern: A regular expression pattern to match token separators. Default is an + expression that matches one or more non-word characters. + :type pattern: str + :param flags: Regular expression flags. Possible values include: "CANON_EQ", + "CASE_INSENSITIVE", "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". + :type flags: str or ~azure.search.documents.indexes.models.RegexFlags + :param stopwords: A list of stopwords. + :type stopwords: list[str] """ _validation = { @@ -5418,23 +3794,6 @@ def __init__( stopwords: Optional[List[str]] = None, **kwargs ): - """ - :keyword name: Required. The name of the analyzer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword lower_case_terms: A value indicating whether terms should be lower-cased. Default is - true. - :paramtype lower_case_terms: bool - :keyword pattern: A regular expression pattern to match token separators. Default is an - expression that matches one or more non-word characters. - :paramtype pattern: str - :keyword flags: Regular expression flags. Possible values include: "CANON_EQ", - "CASE_INSENSITIVE", "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". - :paramtype flags: str or ~azure.search.documents.indexes.models.RegexFlags - :keyword stopwords: A list of stopwords. - :paramtype stopwords: list[str] - """ super(PatternAnalyzer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.PatternAnalyzer' # type: str self.lower_case_terms = lower_case_terms @@ -5448,18 +3807,18 @@ class PatternCaptureTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar patterns: Required. A list of patterns to match against each token. - :vartype patterns: list[str] - :ivar preserve_original: A value indicating whether to return the original token even if one of - the patterns matches. Default is true. - :vartype preserve_original: bool + :type name: str + :param patterns: Required. A list of patterns to match against each token. + :type patterns: list[str] + :param preserve_original: A value indicating whether to return the original token even if one + of the patterns matches. Default is true. + :type preserve_original: bool """ _validation = { @@ -5483,17 +3842,6 @@ def __init__( preserve_original: Optional[bool] = True, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword patterns: Required. A list of patterns to match against each token. - :paramtype patterns: list[str] - :keyword preserve_original: A value indicating whether to return the original token even if one - of the patterns matches. Default is true. - :paramtype preserve_original: bool - """ super(PatternCaptureTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.PatternCaptureTokenFilter' # type: str self.patterns = patterns @@ -5505,17 +3853,17 @@ class PatternReplaceCharFilter(CharFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the char filter.Constant filled by + :param odata_type: Required. Identifies the concrete type of the char filter.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the char filter. It must only contain letters, digits, + :type odata_type: str + :param name: Required. The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar pattern: Required. A regular expression pattern. - :vartype pattern: str - :ivar replacement: Required. The replacement text. - :vartype replacement: str + :type name: str + :param pattern: Required. A regular expression pattern. + :type pattern: str + :param replacement: Required. The replacement text. + :type replacement: str """ _validation = { @@ -5540,16 +3888,6 @@ def __init__( replacement: str, **kwargs ): - """ - :keyword name: Required. The name of the char filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword pattern: Required. A regular expression pattern. - :paramtype pattern: str - :keyword replacement: Required. The replacement text. - :paramtype replacement: str - """ super(PatternReplaceCharFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.PatternReplaceCharFilter' # type: str self.pattern = pattern @@ -5561,17 +3899,17 @@ class PatternReplaceTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar pattern: Required. A regular expression pattern. - :vartype pattern: str - :ivar replacement: Required. The replacement text. - :vartype replacement: str + :type name: str + :param pattern: Required. A regular expression pattern. + :type pattern: str + :param replacement: Required. The replacement text. + :type replacement: str """ _validation = { @@ -5596,16 +3934,6 @@ def __init__( replacement: str, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword pattern: Required. A regular expression pattern. - :paramtype pattern: str - :keyword replacement: Required. The replacement text. - :paramtype replacement: str - """ super(PatternReplaceTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.PatternReplaceTokenFilter' # type: str self.pattern = pattern @@ -5617,23 +3945,23 @@ class PatternTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar pattern: A regular expression pattern to match token separators. Default is an expression - that matches one or more non-word characters. - :vartype pattern: str - :ivar flags: Regular expression flags. Possible values include: "CANON_EQ", "CASE_INSENSITIVE", - "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". - :vartype flags: str or ~azure.search.documents.indexes.models.RegexFlags - :ivar group: The zero-based ordinal of the matching group in the regular expression pattern to + :type name: str + :param pattern: A regular expression pattern to match token separators. Default is an + expression that matches one or more non-word characters. + :type pattern: str + :param flags: Regular expression flags. Possible values include: "CANON_EQ", + "CASE_INSENSITIVE", "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". + :type flags: str or ~azure.search.documents.indexes.models.RegexFlags + :param group: The zero-based ordinal of the matching group in the regular expression pattern to extract into tokens. Use -1 if you want to use the entire pattern to split the input into tokens, irrespective of matching groups. Default is -1. - :vartype group: int + :type group: int """ _validation = { @@ -5658,22 +3986,6 @@ def __init__( group: Optional[int] = -1, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword pattern: A regular expression pattern to match token separators. Default is an - expression that matches one or more non-word characters. - :paramtype pattern: str - :keyword flags: Regular expression flags. Possible values include: "CANON_EQ", - "CASE_INSENSITIVE", "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". - :paramtype flags: str or ~azure.search.documents.indexes.models.RegexFlags - :keyword group: The zero-based ordinal of the matching group in the regular expression pattern - to extract into tokens. Use -1 if you want to use the entire pattern to split the input into - tokens, irrespective of matching groups. Default is -1. - :paramtype group: int - """ super(PatternTokenizer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.PatternTokenizer' # type: str self.pattern = pattern @@ -5686,20 +3998,20 @@ class PhoneticTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar encoder: The phonetic encoder to use. Default is "metaphone". Possible values include: + :type name: str + :param encoder: The phonetic encoder to use. Default is "metaphone". Possible values include: "metaphone", "doubleMetaphone", "soundex", "refinedSoundex", "caverphone1", "caverphone2", "cologne", "nysiis", "koelnerPhonetik", "haasePhonetik", "beiderMorse". - :vartype encoder: str or ~azure.search.documents.indexes.models.PhoneticEncoder - :ivar replace_original_tokens: A value indicating whether encoded tokens should replace + :type encoder: str or ~azure.search.documents.indexes.models.PhoneticEncoder + :param replace_original_tokens: A value indicating whether encoded tokens should replace original tokens. If false, encoded tokens are added as synonyms. Default is true. - :vartype replace_original_tokens: bool + :type replace_original_tokens: bool """ _validation = { @@ -5722,227 +4034,17 @@ def __init__( replace_original_tokens: Optional[bool] = True, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword encoder: The phonetic encoder to use. Default is "metaphone". Possible values include: - "metaphone", "doubleMetaphone", "soundex", "refinedSoundex", "caverphone1", "caverphone2", - "cologne", "nysiis", "koelnerPhonetik", "haasePhonetik", "beiderMorse". - :paramtype encoder: str or ~azure.search.documents.indexes.models.PhoneticEncoder - :keyword replace_original_tokens: A value indicating whether encoded tokens should replace - original tokens. If false, encoded tokens are added as synonyms. Default is true. - :paramtype replace_original_tokens: bool - """ super(PhoneticTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.PhoneticTokenFilter' # type: str - self.encoder = encoder - self.replace_original_tokens = replace_original_tokens - - -class PIIDetectionSkill(SearchIndexerSkill): - """Using the Text Analytics API, extracts personal information from an input text and gives you the option of masking it. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. - :vartype default_language_code: str - :ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :vartype minimum_precision: float - :ivar masking_mode: A parameter that provides various ways to mask the personal information - detected in the input text. Default is 'none'. Possible values include: "none", "replace". - :vartype masking_mode: str or - ~azure.search.documents.indexes.models.PIIDetectionSkillMaskingMode - :ivar masking_character: The character used to mask the text if the maskingMode parameter is - set to replace. Default is '*'. - :vartype masking_character: str - :ivar model_version: The version of the model to use when calling the Text Analytics service. - It will default to the latest available when not specified. We recommend you do not specify - this value unless absolutely necessary. - :vartype model_version: str - :ivar pii_categories: A list of PII entity categories that should be extracted and masked. - :vartype pii_categories: list[str] - :ivar domain: If specified, will set the PII domain to include only a subset of the entity - categories. Possible values include: 'phi', 'none'. Default is 'none'. - :vartype domain: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - 'minimum_precision': {'maximum': 1, 'minimum': 0}, - 'masking_character': {'max_length': 1, 'min_length': 0}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - 'default_language_code': {'key': 'defaultLanguageCode', 'type': 'str'}, - 'minimum_precision': {'key': 'minimumPrecision', 'type': 'float'}, - 'masking_mode': {'key': 'maskingMode', 'type': 'str'}, - 'masking_character': {'key': 'maskingCharacter', 'type': 'str'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - 'pii_categories': {'key': 'piiCategories', 'type': '[str]'}, - 'domain': {'key': 'domain', 'type': 'str'}, - } - - def __init__( - self, - *, - inputs: List["InputFieldMappingEntry"], - outputs: List["OutputFieldMappingEntry"], - name: Optional[str] = None, - description: Optional[str] = None, - context: Optional[str] = None, - default_language_code: Optional[str] = None, - minimum_precision: Optional[float] = None, - masking_mode: Optional[Union[str, "PIIDetectionSkillMaskingMode"]] = None, - masking_character: Optional[str] = None, - model_version: Optional[str] = None, - pii_categories: Optional[List[str]] = None, - domain: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - :paramtype default_language_code: str - :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :paramtype minimum_precision: float - :keyword masking_mode: A parameter that provides various ways to mask the personal information - detected in the input text. Default is 'none'. Possible values include: "none", "replace". - :paramtype masking_mode: str or - ~azure.search.documents.indexes.models.PIIDetectionSkillMaskingMode - :keyword masking_character: The character used to mask the text if the maskingMode parameter is - set to replace. Default is '*'. - :paramtype masking_character: str - :keyword model_version: The version of the model to use when calling the Text Analytics - service. It will default to the latest available when not specified. We recommend you do not - specify this value unless absolutely necessary. - :paramtype model_version: str - :keyword pii_categories: A list of PII entity categories that should be extracted and masked. - :paramtype pii_categories: list[str] - :keyword domain: If specified, will set the PII domain to include only a subset of the entity - categories. Possible values include: 'phi', 'none'. Default is 'none'. - :paramtype domain: str - """ - super(PIIDetectionSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) - self.odata_type = '#Microsoft.Skills.Text.PIIDetectionSkill' # type: str - self.default_language_code = default_language_code - self.minimum_precision = minimum_precision - self.masking_mode = masking_mode - self.masking_character = masking_character - self.model_version = model_version - self.pii_categories = pii_categories - self.domain = domain - - -class PrioritizedFields(msrest.serialization.Model): - """Describes the title, content, and keywords fields to be used for semantic ranking, captions, highlights, and answers. - - :ivar title_field: Defines the title field to be used for semantic ranking, captions, - highlights, and answers. If you don't have a title field in your index, leave this blank. - :vartype title_field: ~azure.search.documents.indexes.models.SemanticField - :ivar prioritized_content_fields: Defines the content fields to be used for semantic ranking, - captions, highlights, and answers. For the best result, the selected fields should contain text - in natural language form. The order of the fields in the array represents their priority. - Fields with lower priority may get truncated if the content is long. - :vartype prioritized_content_fields: list[~azure.search.documents.indexes.models.SemanticField] - :ivar prioritized_keywords_fields: Defines the keyword fields to be used for semantic ranking, - captions, highlights, and answers. For the best result, the selected fields should contain a - list of keywords. The order of the fields in the array represents their priority. Fields with - lower priority may get truncated if the content is long. - :vartype prioritized_keywords_fields: - list[~azure.search.documents.indexes.models.SemanticField] - """ - - _attribute_map = { - 'title_field': {'key': 'titleField', 'type': 'SemanticField'}, - 'prioritized_content_fields': {'key': 'prioritizedContentFields', 'type': '[SemanticField]'}, - 'prioritized_keywords_fields': {'key': 'prioritizedKeywordsFields', 'type': '[SemanticField]'}, - } - - def __init__( - self, - *, - title_field: Optional["SemanticField"] = None, - prioritized_content_fields: Optional[List["SemanticField"]] = None, - prioritized_keywords_fields: Optional[List["SemanticField"]] = None, - **kwargs - ): - """ - :keyword title_field: Defines the title field to be used for semantic ranking, captions, - highlights, and answers. If you don't have a title field in your index, leave this blank. - :paramtype title_field: ~azure.search.documents.indexes.models.SemanticField - :keyword prioritized_content_fields: Defines the content fields to be used for semantic - ranking, captions, highlights, and answers. For the best result, the selected fields should - contain text in natural language form. The order of the fields in the array represents their - priority. Fields with lower priority may get truncated if the content is long. - :paramtype prioritized_content_fields: - list[~azure.search.documents.indexes.models.SemanticField] - :keyword prioritized_keywords_fields: Defines the keyword fields to be used for semantic - ranking, captions, highlights, and answers. For the best result, the selected fields should - contain a list of keywords. The order of the fields in the array represents their priority. - Fields with lower priority may get truncated if the content is long. - :paramtype prioritized_keywords_fields: - list[~azure.search.documents.indexes.models.SemanticField] - """ - super(PrioritizedFields, self).__init__(**kwargs) - self.title_field = title_field - self.prioritized_content_fields = prioritized_content_fields - self.prioritized_keywords_fields = prioritized_keywords_fields + self.encoder = encoder + self.replace_original_tokens = replace_original_tokens class RequestOptions(msrest.serialization.Model): """Parameter group. - :ivar x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :vartype x_ms_client_request_id: str + :param x_ms_client_request_id: The tracking ID sent with the request to help with debugging. + :type x_ms_client_request_id: str """ _attribute_map = { @@ -5955,10 +4057,6 @@ def __init__( x_ms_client_request_id: Optional[str] = None, **kwargs ): - """ - :keyword x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :paramtype x_ms_client_request_id: str - """ super(RequestOptions, self).__init__(**kwargs) self.x_ms_client_request_id = x_ms_client_request_id @@ -5968,10 +4066,10 @@ class ResourceCounter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar usage: Required. The resource usage amount. - :vartype usage: long - :ivar quota: The resource amount quota. - :vartype quota: long + :param usage: Required. The resource usage amount. + :type usage: long + :param quota: The resource amount quota. + :type quota: long """ _validation = { @@ -5990,12 +4088,6 @@ def __init__( quota: Optional[int] = None, **kwargs ): - """ - :keyword usage: Required. The resource usage amount. - :paramtype usage: long - :keyword quota: The resource amount quota. - :paramtype quota: long - """ super(ResourceCounter, self).__init__(**kwargs) self.usage = usage self.quota = quota @@ -6006,17 +4098,17 @@ class ScoringProfile(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the scoring profile. - :vartype name: str - :ivar text_weights: Parameters that boost scoring based on text matches in certain index + :param name: Required. The name of the scoring profile. + :type name: str + :param text_weights: Parameters that boost scoring based on text matches in certain index fields. - :vartype text_weights: ~azure.search.documents.indexes.models.TextWeights - :ivar functions: The collection of functions that influence the scoring of documents. - :vartype functions: list[~azure.search.documents.indexes.models.ScoringFunction] - :ivar function_aggregation: A value indicating how the results of individual scoring functions + :type text_weights: ~azure.search.documents.indexes.models.TextWeights + :param functions: The collection of functions that influence the scoring of documents. + :type functions: list[~azure.search.documents.indexes.models.ScoringFunction] + :param function_aggregation: A value indicating how the results of individual scoring functions should be combined. Defaults to "Sum". Ignored if there are no scoring functions. Possible values include: "sum", "average", "minimum", "maximum", "firstMatching". - :vartype function_aggregation: str or + :type function_aggregation: str or ~azure.search.documents.indexes.models.ScoringFunctionAggregation """ @@ -6040,20 +4132,6 @@ def __init__( function_aggregation: Optional[Union[str, "ScoringFunctionAggregation"]] = None, **kwargs ): - """ - :keyword name: Required. The name of the scoring profile. - :paramtype name: str - :keyword text_weights: Parameters that boost scoring based on text matches in certain index - fields. - :paramtype text_weights: ~azure.search.documents.indexes.models.TextWeights - :keyword functions: The collection of functions that influence the scoring of documents. - :paramtype functions: list[~azure.search.documents.indexes.models.ScoringFunction] - :keyword function_aggregation: A value indicating how the results of individual scoring - functions should be combined. Defaults to "Sum". Ignored if there are no scoring functions. - Possible values include: "sum", "average", "minimum", "maximum", "firstMatching". - :paramtype function_aggregation: str or - ~azure.search.documents.indexes.models.ScoringFunctionAggregation - """ super(ScoringProfile, self).__init__(**kwargs) self.name = name self.text_weights = text_weights @@ -6061,54 +4139,6 @@ def __init__( self.function_aggregation = function_aggregation -class SearchAlias(msrest.serialization.Model): - """Represents an index alias, which describes a mapping from the alias name to an index. The alias name can be used in place of the index name for supported operations. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the alias. - :vartype name: str - :ivar indexes: Required. The name of the index this alias maps to. Only one index name may be - specified. - :vartype indexes: list[str] - :ivar e_tag: The ETag of the alias. - :vartype e_tag: str - """ - - _validation = { - 'name': {'required': True}, - 'indexes': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'indexes': {'key': 'indexes', 'type': '[str]'}, - 'e_tag': {'key': '@odata\\.etag', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - indexes: List[str], - e_tag: Optional[str] = None, - **kwargs - ): - """ - :keyword name: Required. The name of the alias. - :paramtype name: str - :keyword indexes: Required. The name of the index this alias maps to. Only one index name may - be specified. - :paramtype indexes: list[str] - :keyword e_tag: The ETag of the alias. - :paramtype e_tag: str - """ - super(SearchAlias, self).__init__(**kwargs) - self.name = name - self.indexes = indexes - self.e_tag = e_tag - - class SearchError(msrest.serialization.Model): """Describes an error condition for the Azure Cognitive Search API. @@ -6140,8 +4170,6 @@ def __init__( self, **kwargs ): - """ - """ super(SearchError, self).__init__(**kwargs) self.code = None self.message = None @@ -6153,26 +4181,26 @@ class SearchField(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the field, which must be unique within the fields collection + :param name: Required. The name of the field, which must be unique within the fields collection of the index or parent field. - :vartype name: str - :ivar type: Required. The data type of the field. Possible values include: "Edm.String", + :type name: str + :param type: Required. The data type of the field. Possible values include: "Edm.String", "Edm.Int32", "Edm.Int64", "Edm.Double", "Edm.Boolean", "Edm.DateTimeOffset", "Edm.GeographyPoint", "Edm.ComplexType". - :vartype type: str or ~azure.search.documents.indexes.models.SearchFieldDataType - :ivar key: A value indicating whether the field uniquely identifies documents in the index. + :type type: str or ~azure.search.documents.indexes.models.SearchFieldDataType + :param key: A value indicating whether the field uniquely identifies documents in the index. Exactly one top-level field in each index must be chosen as the key field and it must be of type Edm.String. Key fields can be used to look up documents directly and update or delete specific documents. Default is false for simple fields and null for complex fields. - :vartype key: bool - :ivar retrievable: A value indicating whether the field can be returned in a search result. You - can disable this option if you want to use a field (for example, margin) as a filter, sorting, - or scoring mechanism but do not want the field to be visible to the end user. This property - must be true for key fields, and it must be null for complex fields. This property can be - changed on existing fields. Enabling this property does not cause any increase in index storage - requirements. Default is true for simple fields and null for complex fields. - :vartype retrievable: bool - :ivar searchable: A value indicating whether the field is full-text searchable. This means it + :type key: bool + :param retrievable: A value indicating whether the field can be returned in a search result. + You can disable this option if you want to use a field (for example, margin) as a filter, + sorting, or scoring mechanism but do not want the field to be visible to the end user. This + property must be true for key fields, and it must be null for complex fields. This property can + be changed on existing fields. Enabling this property does not cause any increase in index + storage requirements. Default is true for simple fields and null for complex fields. + :type retrievable: bool + :param searchable: A value indicating whether the field is full-text searchable. This means it will undergo analysis such as word-breaking during indexing. If you set a searchable field to a value like "sunny day", internally it will be split into the individual tokens "sunny" and "day". This enables full-text searches for these terms. Fields of type Edm.String or @@ -6181,15 +4209,15 @@ class SearchField(msrest.serialization.Model): consume extra space in your index since Azure Cognitive Search will store an additional tokenized version of the field value for full-text searches. If you want to save space in your index and you don't need a field to be included in searches, set searchable to false. - :vartype searchable: bool - :ivar filterable: A value indicating whether to enable the field to be referenced in $filter + :type searchable: bool + :param filterable: A value indicating whether to enable the field to be referenced in $filter queries. filterable differs from searchable in how strings are handled. Fields of type Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are for exact matches only. For example, if you set such a field f to "sunny day", $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. This property must be null for complex fields. Default is true for simple fields and null for complex fields. - :vartype filterable: bool - :ivar sortable: A value indicating whether to enable the field to be referenced in $orderby + :type filterable: bool + :param sortable: A value indicating whether to enable the field to be referenced in $orderby expressions. By default Azure Cognitive Search sorts results by score, but in many experiences users will want to sort by fields in the documents. A simple field can be sortable only if it is single-valued (it has a single value in the scope of the parent document). Simple collection @@ -6199,15 +4227,15 @@ class SearchField(msrest.serialization.Model): cannot be sortable and the sortable property must be null for such fields. The default for sortable is true for single-valued simple fields, false for multi-valued simple fields, and null for complex fields. - :vartype sortable: bool - :ivar facetable: A value indicating whether to enable the field to be referenced in facet + :type sortable: bool + :param facetable: A value indicating whether to enable the field to be referenced in facet queries. Typically used in a presentation of search results that includes hit count by category (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple fields. - :vartype facetable: bool - :ivar analyzer: The name of the analyzer to use for the field. This option can be used only + :type facetable: bool + :param analyzer: The name of the analyzer to use for the field. This option can be used only with searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", @@ -6227,8 +4255,8 @@ class SearchField(msrest.serialization.Model): "th.microsoft", "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", "whitespace". - :vartype analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :ivar search_analyzer: The name of the analyzer used at search time for the field. This option + :type analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName + :param search_analyzer: The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. This @@ -6250,12 +4278,12 @@ class SearchField(msrest.serialization.Model): "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", "whitespace". - :vartype search_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :ivar index_analyzer: The name of the analyzer used at indexing time for the field. This option - can be used only with searchable fields. It must be set together with searchAnalyzer and it - cannot be set together with the analyzer option. This property cannot be set to the name of a - language analyzer; use the analyzer property instead if you need a language analyzer. Once the - analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. + :type search_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName + :param index_analyzer: The name of the analyzer used at indexing time for the field. This + option can be used only with searchable fields. It must be set together with searchAnalyzer and + it cannot be set together with the analyzer option. This property cannot be set to the name of + a language analyzer; use the analyzer property instead if you need a language analyzer. Once + the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", @@ -6273,21 +4301,16 @@ class SearchField(msrest.serialization.Model): "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", "whitespace". - :vartype index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :ivar normalizer: The name of the normalizer to use for the field. This option can be used only - with fields with filterable, sortable, or facetable enabled. Once the normalizer is chosen, it - cannot be changed for the field. Must be null for complex fields. Possible values include: - "asciifolding", "elision", "lowercase", "standard", "uppercase". - :vartype normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :ivar synonym_maps: A list of the names of synonym maps to associate with this field. This + :type index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName + :param synonym_maps: A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules in the synonym map. This attribute can be changed on existing fields. Must be null or an empty collection for complex fields. - :vartype synonym_maps: list[str] - :ivar fields: A list of sub-fields if this is a field of type Edm.ComplexType or + :type synonym_maps: list[str] + :param fields: A list of sub-fields if this is a field of type Edm.ComplexType or Collection(Edm.ComplexType). Must be null or empty for simple fields. - :vartype fields: list[~azure.search.documents.indexes.models.SearchField] + :type fields: list[~azure.search.documents.indexes.models.SearchField] """ _validation = { @@ -6307,7 +4330,6 @@ class SearchField(msrest.serialization.Model): 'analyzer': {'key': 'analyzer', 'type': 'str'}, 'search_analyzer': {'key': 'searchAnalyzer', 'type': 'str'}, 'index_analyzer': {'key': 'indexAnalyzer', 'type': 'str'}, - 'normalizer': {'key': 'normalizer', 'type': 'str'}, 'synonym_maps': {'key': 'synonymMaps', 'type': '[str]'}, 'fields': {'key': 'fields', 'type': '[SearchField]'}, } @@ -6326,148 +4348,10 @@ def __init__( analyzer: Optional[Union[str, "LexicalAnalyzerName"]] = None, search_analyzer: Optional[Union[str, "LexicalAnalyzerName"]] = None, index_analyzer: Optional[Union[str, "LexicalAnalyzerName"]] = None, - normalizer: Optional[Union[str, "LexicalNormalizerName"]] = None, synonym_maps: Optional[List[str]] = None, fields: Optional[List["SearchField"]] = None, **kwargs ): - """ - :keyword name: Required. The name of the field, which must be unique within the fields - collection of the index or parent field. - :paramtype name: str - :keyword type: Required. The data type of the field. Possible values include: "Edm.String", - "Edm.Int32", "Edm.Int64", "Edm.Double", "Edm.Boolean", "Edm.DateTimeOffset", - "Edm.GeographyPoint", "Edm.ComplexType". - :paramtype type: str or ~azure.search.documents.indexes.models.SearchFieldDataType - :keyword key: A value indicating whether the field uniquely identifies documents in the index. - Exactly one top-level field in each index must be chosen as the key field and it must be of - type Edm.String. Key fields can be used to look up documents directly and update or delete - specific documents. Default is false for simple fields and null for complex fields. - :paramtype key: bool - :keyword retrievable: A value indicating whether the field can be returned in a search result. - You can disable this option if you want to use a field (for example, margin) as a filter, - sorting, or scoring mechanism but do not want the field to be visible to the end user. This - property must be true for key fields, and it must be null for complex fields. This property can - be changed on existing fields. Enabling this property does not cause any increase in index - storage requirements. Default is true for simple fields and null for complex fields. - :paramtype retrievable: bool - :keyword searchable: A value indicating whether the field is full-text searchable. This means - it will undergo analysis such as word-breaking during indexing. If you set a searchable field - to a value like "sunny day", internally it will be split into the individual tokens "sunny" and - "day". This enables full-text searches for these terms. Fields of type Edm.String or - Collection(Edm.String) are searchable by default. This property must be false for simple fields - of other non-string data types, and it must be null for complex fields. Note: searchable fields - consume extra space in your index since Azure Cognitive Search will store an additional - tokenized version of the field value for full-text searches. If you want to save space in your - index and you don't need a field to be included in searches, set searchable to false. - :paramtype searchable: bool - :keyword filterable: A value indicating whether to enable the field to be referenced in $filter - queries. filterable differs from searchable in how strings are handled. Fields of type - Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so - comparisons are for exact matches only. For example, if you set such a field f to "sunny day", - $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. This property - must be null for complex fields. Default is true for simple fields and null for complex fields. - :paramtype filterable: bool - :keyword sortable: A value indicating whether to enable the field to be referenced in $orderby - expressions. By default Azure Cognitive Search sorts results by score, but in many experiences - users will want to sort by fields in the documents. A simple field can be sortable only if it - is single-valued (it has a single value in the scope of the parent document). Simple collection - fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex - collections are also multi-valued, and therefore cannot be sortable. This is true whether it's - an immediate parent field, or an ancestor field, that's the complex collection. Complex fields - cannot be sortable and the sortable property must be null for such fields. The default for - sortable is true for single-valued simple fields, false for multi-valued simple fields, and - null for complex fields. - :paramtype sortable: bool - :keyword facetable: A value indicating whether to enable the field to be referenced in facet - queries. Typically used in a presentation of search results that includes hit count by category - (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so - on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or - Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple - fields. - :paramtype facetable: bool - :keyword analyzer: The name of the analyzer to use for the field. This option can be used only - with searchable fields and it can't be set together with either searchAnalyzer or - indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null - for complex fields. Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", - "bn.microsoft", "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", - "zh-Hans.microsoft", "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", - "cs.microsoft", "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", - "en.microsoft", "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", - "fr.lucene", "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", - "gu.microsoft", "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", - "is.microsoft", "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", - "ja.microsoft", "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", - "lv.lucene", "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", - "no.lucene", "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", - "pt-PT.microsoft", "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", - "ru.lucene", "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", - "es.microsoft", "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", - "th.microsoft", "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", - "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", - "simple", "stop", "whitespace". - :paramtype analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :keyword search_analyzer: The name of the analyzer used at search time for the field. This - option can be used only with searchable fields. It must be set together with indexAnalyzer and - it cannot be set together with the analyzer option. This property cannot be set to the name of - a language analyzer; use the analyzer property instead if you need a language analyzer. This - analyzer can be updated on an existing field. Must be null for complex fields. Possible values - include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft", - "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", "zh-Hans.lucene", - "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", "cs.lucene", - "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", "en.lucene", - "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", "gl.lucene", - "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", "he.microsoft", - "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", "id.microsoft", - "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", "ja.lucene", - "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", "lt.microsoft", - "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", "fa.lucene", - "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft", - "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene", - "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft", - "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft", - "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", - "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", - "whitespace". - :paramtype search_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :keyword index_analyzer: The name of the analyzer used at indexing time for the field. This - option can be used only with searchable fields. It must be set together with searchAnalyzer and - it cannot be set together with the analyzer option. This property cannot be set to the name of - a language analyzer; use the analyzer property instead if you need a language analyzer. Once - the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. - Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", - "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh-Hans.microsoft", - "zh-Hans.lucene", "zh-Hant.microsoft", "zh-Hant.lucene", "hr.microsoft", "cs.microsoft", - "cs.lucene", "da.microsoft", "da.lucene", "nl.microsoft", "nl.lucene", "en.microsoft", - "en.lucene", "et.microsoft", "fi.microsoft", "fi.lucene", "fr.microsoft", "fr.lucene", - "gl.lucene", "de.microsoft", "de.lucene", "el.microsoft", "el.lucene", "gu.microsoft", - "he.microsoft", "hi.microsoft", "hi.lucene", "hu.microsoft", "hu.lucene", "is.microsoft", - "id.microsoft", "id.lucene", "ga.lucene", "it.microsoft", "it.lucene", "ja.microsoft", - "ja.lucene", "kn.microsoft", "ko.microsoft", "ko.lucene", "lv.microsoft", "lv.lucene", - "lt.microsoft", "ml.microsoft", "ms.microsoft", "mr.microsoft", "nb.microsoft", "no.lucene", - "fa.lucene", "pl.microsoft", "pl.lucene", "pt-BR.microsoft", "pt-BR.lucene", "pt-PT.microsoft", - "pt-PT.lucene", "pa.microsoft", "ro.microsoft", "ro.lucene", "ru.microsoft", "ru.lucene", - "sr-cyrillic.microsoft", "sr-latin.microsoft", "sk.microsoft", "sl.microsoft", "es.microsoft", - "es.lucene", "sv.microsoft", "sv.lucene", "ta.microsoft", "te.microsoft", "th.microsoft", - "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", - "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", - "whitespace". - :paramtype index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :keyword normalizer: The name of the normalizer to use for the field. This option can be used - only with fields with filterable, sortable, or facetable enabled. Once the normalizer is - chosen, it cannot be changed for the field. Must be null for complex fields. Possible values - include: "asciifolding", "elision", "lowercase", "standard", "uppercase". - :paramtype normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :keyword synonym_maps: A list of the names of synonym maps to associate with this field. This - option can be used only with searchable fields. Currently only one synonym map per field is - supported. Assigning a synonym map to a field ensures that query terms targeting that field are - expanded at query-time using the rules in the synonym map. This attribute can be changed on - existing fields. Must be null or an empty collection for complex fields. - :paramtype synonym_maps: list[str] - :keyword fields: A list of sub-fields if this is a field of type Edm.ComplexType or - Collection(Edm.ComplexType). Must be null or empty for simple fields. - :paramtype fields: list[~azure.search.documents.indexes.models.SearchField] - """ super(SearchField, self).__init__(**kwargs) self.name = name self.type = type @@ -6480,7 +4364,6 @@ def __init__( self.analyzer = analyzer self.search_analyzer = search_analyzer self.index_analyzer = index_analyzer - self.normalizer = normalizer self.synonym_maps = synonym_maps self.fields = fields @@ -6490,31 +4373,29 @@ class SearchIndex(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the index. - :vartype name: str - :ivar fields: Required. The fields of the index. - :vartype fields: list[~azure.search.documents.indexes.models.SearchField] - :ivar scoring_profiles: The scoring profiles for the index. - :vartype scoring_profiles: list[~azure.search.documents.indexes.models.ScoringProfile] - :ivar default_scoring_profile: The name of the scoring profile to use if none is specified in + :param name: Required. The name of the index. + :type name: str + :param fields: Required. The fields of the index. + :type fields: list[~azure.search.documents.indexes.models.SearchField] + :param scoring_profiles: The scoring profiles for the index. + :type scoring_profiles: list[~azure.search.documents.indexes.models.ScoringProfile] + :param default_scoring_profile: The name of the scoring profile to use if none is specified in the query. If this property is not set and no scoring profile is specified in the query, then default scoring (tf-idf) will be used. - :vartype default_scoring_profile: str - :ivar cors_options: Options to control Cross-Origin Resource Sharing (CORS) for the index. - :vartype cors_options: ~azure.search.documents.indexes.models.CorsOptions - :ivar suggesters: The suggesters for the index. - :vartype suggesters: list[~azure.search.documents.indexes.models.Suggester] - :ivar analyzers: The analyzers for the index. - :vartype analyzers: list[~azure.search.documents.indexes.models.LexicalAnalyzer] - :ivar tokenizers: The tokenizers for the index. - :vartype tokenizers: list[~azure.search.documents.indexes.models.LexicalTokenizer] - :ivar token_filters: The token filters for the index. - :vartype token_filters: list[~azure.search.documents.indexes.models.TokenFilter] - :ivar char_filters: The character filters for the index. - :vartype char_filters: list[~azure.search.documents.indexes.models.CharFilter] - :ivar normalizers: The normalizers for the index. - :vartype normalizers: list[~azure.search.documents.indexes.models.LexicalNormalizer] - :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault. + :type default_scoring_profile: str + :param cors_options: Options to control Cross-Origin Resource Sharing (CORS) for the index. + :type cors_options: ~azure.search.documents.indexes.models.CorsOptions + :param suggesters: The suggesters for the index. + :type suggesters: list[~azure.search.documents.indexes.models.Suggester] + :param analyzers: The analyzers for the index. + :type analyzers: list[~azure.search.documents.indexes.models.LexicalAnalyzer] + :param tokenizers: The tokenizers for the index. + :type tokenizers: list[~azure.search.documents.indexes.models.LexicalTokenizer] + :param token_filters: The token filters for the index. + :type token_filters: list[~azure.search.documents.indexes.models.TokenFilter] + :param char_filters: The character filters for the index. + :type char_filters: list[~azure.search.documents.indexes.models.CharFilter] + :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive @@ -6522,17 +4403,14 @@ class SearchIndex(msrest.serialization.Model): needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :ivar similarity: The type of similarity algorithm to be used when scoring and ranking the + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :param similarity: The type of similarity algorithm to be used when scoring and ranking the documents matching a search query. The similarity algorithm can only be defined at index creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity algorithm is used. - :vartype similarity: ~azure.search.documents.indexes.models.Similarity - :ivar semantic_settings: Defines parameters for a search index that influence semantic - capabilities. - :vartype semantic_settings: ~azure.search.documents.indexes.models.SemanticSettings - :ivar e_tag: The ETag of the index. - :vartype e_tag: str + :type similarity: ~azure.search.documents.indexes.models.Similarity + :param e_tag: The ETag of the index. + :type e_tag: str """ _validation = { @@ -6551,10 +4429,8 @@ class SearchIndex(msrest.serialization.Model): 'tokenizers': {'key': 'tokenizers', 'type': '[LexicalTokenizer]'}, 'token_filters': {'key': 'tokenFilters', 'type': '[TokenFilter]'}, 'char_filters': {'key': 'charFilters', 'type': '[CharFilter]'}, - 'normalizers': {'key': 'normalizers', 'type': '[LexicalNormalizer]'}, 'encryption_key': {'key': 'encryptionKey', 'type': 'SearchResourceEncryptionKey'}, 'similarity': {'key': 'similarity', 'type': 'Similarity'}, - 'semantic_settings': {'key': 'semantic', 'type': 'SemanticSettings'}, 'e_tag': {'key': '@odata\\.etag', 'type': 'str'}, } @@ -6571,58 +4447,11 @@ def __init__( tokenizers: Optional[List["LexicalTokenizer"]] = None, token_filters: Optional[List["TokenFilter"]] = None, char_filters: Optional[List["CharFilter"]] = None, - normalizers: Optional[List["LexicalNormalizer"]] = None, encryption_key: Optional["SearchResourceEncryptionKey"] = None, similarity: Optional["Similarity"] = None, - semantic_settings: Optional["SemanticSettings"] = None, e_tag: Optional[str] = None, **kwargs ): - """ - :keyword name: Required. The name of the index. - :paramtype name: str - :keyword fields: Required. The fields of the index. - :paramtype fields: list[~azure.search.documents.indexes.models.SearchField] - :keyword scoring_profiles: The scoring profiles for the index. - :paramtype scoring_profiles: list[~azure.search.documents.indexes.models.ScoringProfile] - :keyword default_scoring_profile: The name of the scoring profile to use if none is specified - in the query. If this property is not set and no scoring profile is specified in the query, - then default scoring (tf-idf) will be used. - :paramtype default_scoring_profile: str - :keyword cors_options: Options to control Cross-Origin Resource Sharing (CORS) for the index. - :paramtype cors_options: ~azure.search.documents.indexes.models.CorsOptions - :keyword suggesters: The suggesters for the index. - :paramtype suggesters: list[~azure.search.documents.indexes.models.Suggester] - :keyword analyzers: The analyzers for the index. - :paramtype analyzers: list[~azure.search.documents.indexes.models.LexicalAnalyzer] - :keyword tokenizers: The tokenizers for the index. - :paramtype tokenizers: list[~azure.search.documents.indexes.models.LexicalTokenizer] - :keyword token_filters: The token filters for the index. - :paramtype token_filters: list[~azure.search.documents.indexes.models.TokenFilter] - :keyword char_filters: The character filters for the index. - :paramtype char_filters: list[~azure.search.documents.indexes.models.CharFilter] - :keyword normalizers: The normalizers for the index. - :paramtype normalizers: list[~azure.search.documents.indexes.models.LexicalNormalizer] - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your data when you - want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive - Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive - Search will ignore attempts to set this property to null. You can change this property as - needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with - customer-managed keys is not available for free search services, and is only available for paid - services created on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :keyword similarity: The type of similarity algorithm to be used when scoring and ranking the - documents matching a search query. The similarity algorithm can only be defined at index - creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity - algorithm is used. - :paramtype similarity: ~azure.search.documents.indexes.models.Similarity - :keyword semantic_settings: Defines parameters for a search index that influence semantic - capabilities. - :paramtype semantic_settings: ~azure.search.documents.indexes.models.SemanticSettings - :keyword e_tag: The ETag of the index. - :paramtype e_tag: str - """ super(SearchIndex, self).__init__(**kwargs) self.name = name self.fields = fields @@ -6634,10 +4463,8 @@ def __init__( self.tokenizers = tokenizers self.token_filters = token_filters self.char_filters = char_filters - self.normalizers = normalizers self.encryption_key = encryption_key self.similarity = similarity - self.semantic_settings = semantic_settings self.e_tag = e_tag @@ -6646,32 +4473,32 @@ class SearchIndexer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the indexer. - :vartype name: str - :ivar description: The description of the indexer. - :vartype description: str - :ivar data_source_name: Required. The name of the datasource from which this indexer reads + :param name: Required. The name of the indexer. + :type name: str + :param description: The description of the indexer. + :type description: str + :param data_source_name: Required. The name of the datasource from which this indexer reads data. - :vartype data_source_name: str - :ivar skillset_name: The name of the skillset executing with this indexer. - :vartype skillset_name: str - :ivar target_index_name: Required. The name of the index to which this indexer writes data. - :vartype target_index_name: str - :ivar schedule: The schedule for this indexer. - :vartype schedule: ~azure.search.documents.indexes.models.IndexingSchedule - :ivar parameters: Parameters for indexer execution. - :vartype parameters: ~azure.search.documents.indexes.models.IndexingParameters - :ivar field_mappings: Defines mappings between fields in the data source and corresponding + :type data_source_name: str + :param skillset_name: The name of the skillset executing with this indexer. + :type skillset_name: str + :param target_index_name: Required. The name of the index to which this indexer writes data. + :type target_index_name: str + :param schedule: The schedule for this indexer. + :type schedule: ~azure.search.documents.indexes.models.IndexingSchedule + :param parameters: Parameters for indexer execution. + :type parameters: ~azure.search.documents.indexes.models.IndexingParameters + :param field_mappings: Defines mappings between fields in the data source and corresponding target fields in the index. - :vartype field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] - :ivar output_field_mappings: Output field mappings are applied after enrichment and immediately - before indexing. - :vartype output_field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] - :ivar is_disabled: A value indicating whether the indexer is disabled. Default is false. - :vartype is_disabled: bool - :ivar e_tag: The ETag of the indexer. - :vartype e_tag: str - :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault. + :type field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] + :param output_field_mappings: Output field mappings are applied after enrichment and + immediately before indexing. + :type output_field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] + :param is_disabled: A value indicating whether the indexer is disabled. Default is false. + :type is_disabled: bool + :param e_tag: The ETag of the indexer. + :type e_tag: str + :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your indexer definition (as well as indexer execution status) when you want full assurance that no one, not even Microsoft, can decrypt them in Azure Cognitive Search. Once you have encrypted your @@ -6680,10 +4507,7 @@ class SearchIndexer(msrest.serialization.Model): rotate your encryption key; Your indexer definition (and indexer execution status) will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :ivar cache: Adds caching to an enrichment pipeline to allow for incremental modification steps - without having to rebuild the index every time. - :vartype cache: ~azure.search.documents.indexes.models.SearchIndexerCache + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey """ _validation = { @@ -6705,7 +4529,6 @@ class SearchIndexer(msrest.serialization.Model): 'is_disabled': {'key': 'disabled', 'type': 'bool'}, 'e_tag': {'key': '@odata\\.etag', 'type': 'str'}, 'encryption_key': {'key': 'encryptionKey', 'type': 'SearchResourceEncryptionKey'}, - 'cache': {'key': 'cache', 'type': 'SearchIndexerCache'}, } def __init__( @@ -6723,49 +4546,8 @@ def __init__( is_disabled: Optional[bool] = False, e_tag: Optional[str] = None, encryption_key: Optional["SearchResourceEncryptionKey"] = None, - cache: Optional["SearchIndexerCache"] = None, - **kwargs - ): - """ - :keyword name: Required. The name of the indexer. - :paramtype name: str - :keyword description: The description of the indexer. - :paramtype description: str - :keyword data_source_name: Required. The name of the datasource from which this indexer reads - data. - :paramtype data_source_name: str - :keyword skillset_name: The name of the skillset executing with this indexer. - :paramtype skillset_name: str - :keyword target_index_name: Required. The name of the index to which this indexer writes data. - :paramtype target_index_name: str - :keyword schedule: The schedule for this indexer. - :paramtype schedule: ~azure.search.documents.indexes.models.IndexingSchedule - :keyword parameters: Parameters for indexer execution. - :paramtype parameters: ~azure.search.documents.indexes.models.IndexingParameters - :keyword field_mappings: Defines mappings between fields in the data source and corresponding - target fields in the index. - :paramtype field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] - :keyword output_field_mappings: Output field mappings are applied after enrichment and - immediately before indexing. - :paramtype output_field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] - :keyword is_disabled: A value indicating whether the indexer is disabled. Default is false. - :paramtype is_disabled: bool - :keyword e_tag: The ETag of the indexer. - :paramtype e_tag: str - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your indexer - definition (as well as indexer execution status) when you want full assurance that no one, not - even Microsoft, can decrypt them in Azure Cognitive Search. Once you have encrypted your - indexer definition, it will always remain encrypted. Azure Cognitive Search will ignore - attempts to set this property to null. You can change this property as needed if you want to - rotate your encryption key; Your indexer definition (and indexer execution status) will be - unaffected. Encryption with customer-managed keys is not available for free search services, - and is only available for paid services created on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :keyword cache: Adds caching to an enrichment pipeline to allow for incremental modification - steps without having to rebuild the index every time. - :paramtype cache: ~azure.search.documents.indexes.models.SearchIndexerCache - """ + **kwargs + ): super(SearchIndexer, self).__init__(**kwargs) self.name = name self.description = description @@ -6779,41 +4561,6 @@ def __init__( self.is_disabled = is_disabled self.e_tag = e_tag self.encryption_key = encryption_key - self.cache = cache - - -class SearchIndexerCache(msrest.serialization.Model): - """SearchIndexerCache. - - :ivar storage_connection_string: The connection string to the storage account where the cache - data will be persisted. - :vartype storage_connection_string: str - :ivar enable_reprocessing: Specifies whether incremental reprocessing is enabled. - :vartype enable_reprocessing: bool - """ - - _attribute_map = { - 'storage_connection_string': {'key': 'storageConnectionString', 'type': 'str'}, - 'enable_reprocessing': {'key': 'enableReprocessing', 'type': 'bool'}, - } - - def __init__( - self, - *, - storage_connection_string: Optional[str] = None, - enable_reprocessing: Optional[bool] = None, - **kwargs - ): - """ - :keyword storage_connection_string: The connection string to the storage account where the - cache data will be persisted. - :paramtype storage_connection_string: str - :keyword enable_reprocessing: Specifies whether incremental reprocessing is enabled. - :paramtype enable_reprocessing: bool - """ - super(SearchIndexerCache, self).__init__(**kwargs) - self.storage_connection_string = storage_connection_string - self.enable_reprocessing = enable_reprocessing class SearchIndexerDataContainer(msrest.serialization.Model): @@ -6821,12 +4568,12 @@ class SearchIndexerDataContainer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the table or view (for Azure SQL data source) or collection + :param name: Required. The name of the table or view (for Azure SQL data source) or collection (for CosmosDB data source) that will be indexed. - :vartype name: str - :ivar query: A query that is applied to this data container. The syntax and meaning of this + :type name: str + :param query: A query that is applied to this data container. The syntax and meaning of this parameter is datasource-specific. Not supported by Azure SQL datasources. - :vartype query: str + :type query: str """ _validation = { @@ -6845,112 +4592,36 @@ def __init__( query: Optional[str] = None, **kwargs ): - """ - :keyword name: Required. The name of the table or view (for Azure SQL data source) or - collection (for CosmosDB data source) that will be indexed. - :paramtype name: str - :keyword query: A query that is applied to this data container. The syntax and meaning of this - parameter is datasource-specific. Not supported by Azure SQL datasources. - :paramtype query: str - """ super(SearchIndexerDataContainer, self).__init__(**kwargs) self.name = name self.query = query -class SearchIndexerDataIdentity(msrest.serialization.Model): - """Abstract base type for data identities. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SearchIndexerDataNoneIdentity, SearchIndexerDataUserAssignedIdentity. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the identity.Constant filled by - server. - :vartype odata_type: str - """ - - _validation = { - 'odata_type': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - } - - _subtype_map = { - 'odata_type': {'#Microsoft.Azure.Search.SearchIndexerDataNoneIdentity': 'SearchIndexerDataNoneIdentity', '#Microsoft.Azure.Search.SearchIndexerDataUserAssignedIdentity': 'SearchIndexerDataUserAssignedIdentity'} - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SearchIndexerDataIdentity, self).__init__(**kwargs) - self.odata_type = None # type: Optional[str] - - -class SearchIndexerDataNoneIdentity(SearchIndexerDataIdentity): - """Clears the identity property of a datasource. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the identity.Constant filled by - server. - :vartype odata_type: str - """ - - _validation = { - 'odata_type': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(SearchIndexerDataNoneIdentity, self).__init__(**kwargs) - self.odata_type = '#Microsoft.Azure.Search.SearchIndexerDataNoneIdentity' # type: str - - class SearchIndexerDataSource(msrest.serialization.Model): """Represents a datasource definition, which can be used to configure an indexer. All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the datasource. - :vartype name: str - :ivar description: The description of the datasource. - :vartype description: str - :ivar type: Required. The type of the datasource. Possible values include: "azuresql", + :param name: Required. The name of the datasource. + :type name: str + :param description: The description of the datasource. + :type description: str + :param type: Required. The type of the datasource. Possible values include: "azuresql", "cosmosdb", "azureblob", "azuretable", "mysql", "adlsgen2". - :vartype type: str or ~azure.search.documents.indexes.models.SearchIndexerDataSourceType - :ivar credentials: Required. Credentials for the datasource. - :vartype credentials: ~azure.search.documents.indexes.models.DataSourceCredentials - :ivar container: Required. The data container for the datasource. - :vartype container: ~azure.search.documents.indexes.models.SearchIndexerDataContainer - :ivar identity: An explicit managed identity to use for this datasource. If not specified and - the connection string is a managed identity, the system-assigned managed identity is used. If - not specified, the value remains unchanged. If "none" is specified, the value of this property - is cleared. - :vartype identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity - :ivar data_change_detection_policy: The data change detection policy for the datasource. - :vartype data_change_detection_policy: + :type type: str or ~azure.search.documents.indexes.models.SearchIndexerDataSourceType + :param credentials: Required. Credentials for the datasource. + :type credentials: ~azure.search.documents.indexes.models.DataSourceCredentials + :param container: Required. The data container for the datasource. + :type container: ~azure.search.documents.indexes.models.SearchIndexerDataContainer + :param data_change_detection_policy: The data change detection policy for the datasource. + :type data_change_detection_policy: ~azure.search.documents.indexes.models.DataChangeDetectionPolicy - :ivar data_deletion_detection_policy: The data deletion detection policy for the datasource. - :vartype data_deletion_detection_policy: + :param data_deletion_detection_policy: The data deletion detection policy for the datasource. + :type data_deletion_detection_policy: ~azure.search.documents.indexes.models.DataDeletionDetectionPolicy - :ivar e_tag: The ETag of the data source. - :vartype e_tag: str - :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault. + :param e_tag: The ETag of the data source. + :type e_tag: str + :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your datasource definition when you want full assurance that no one, not even Microsoft, can decrypt your data source definition in Azure Cognitive Search. Once you have encrypted your data source @@ -6959,7 +4630,7 @@ class SearchIndexerDataSource(msrest.serialization.Model): encryption key; Your datasource definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey """ _validation = { @@ -6975,7 +4646,6 @@ class SearchIndexerDataSource(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, 'credentials': {'key': 'credentials', 'type': 'DataSourceCredentials'}, 'container': {'key': 'container', 'type': 'SearchIndexerDataContainer'}, - 'identity': {'key': 'identity', 'type': 'SearchIndexerDataIdentity'}, 'data_change_detection_policy': {'key': 'dataChangeDetectionPolicy', 'type': 'DataChangeDetectionPolicy'}, 'data_deletion_detection_policy': {'key': 'dataDeletionDetectionPolicy', 'type': 'DataDeletionDetectionPolicy'}, 'e_tag': {'key': '@odata\\.etag', 'type': 'str'}, @@ -6990,105 +4660,24 @@ def __init__( credentials: "DataSourceCredentials", container: "SearchIndexerDataContainer", description: Optional[str] = None, - identity: Optional["SearchIndexerDataIdentity"] = None, data_change_detection_policy: Optional["DataChangeDetectionPolicy"] = None, data_deletion_detection_policy: Optional["DataDeletionDetectionPolicy"] = None, e_tag: Optional[str] = None, encryption_key: Optional["SearchResourceEncryptionKey"] = None, **kwargs ): - """ - :keyword name: Required. The name of the datasource. - :paramtype name: str - :keyword description: The description of the datasource. - :paramtype description: str - :keyword type: Required. The type of the datasource. Possible values include: "azuresql", - "cosmosdb", "azureblob", "azuretable", "mysql", "adlsgen2". - :paramtype type: str or ~azure.search.documents.indexes.models.SearchIndexerDataSourceType - :keyword credentials: Required. Credentials for the datasource. - :paramtype credentials: ~azure.search.documents.indexes.models.DataSourceCredentials - :keyword container: Required. The data container for the datasource. - :paramtype container: ~azure.search.documents.indexes.models.SearchIndexerDataContainer - :keyword identity: An explicit managed identity to use for this datasource. If not specified - and the connection string is a managed identity, the system-assigned managed identity is used. - If not specified, the value remains unchanged. If "none" is specified, the value of this - property is cleared. - :paramtype identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity - :keyword data_change_detection_policy: The data change detection policy for the datasource. - :paramtype data_change_detection_policy: - ~azure.search.documents.indexes.models.DataChangeDetectionPolicy - :keyword data_deletion_detection_policy: The data deletion detection policy for the datasource. - :paramtype data_deletion_detection_policy: - ~azure.search.documents.indexes.models.DataDeletionDetectionPolicy - :keyword e_tag: The ETag of the data source. - :paramtype e_tag: str - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your datasource - definition when you want full assurance that no one, not even Microsoft, can decrypt your data - source definition in Azure Cognitive Search. Once you have encrypted your data source - definition, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set - this property to null. You can change this property as needed if you want to rotate your - encryption key; Your datasource definition will be unaffected. Encryption with customer-managed - keys is not available for free search services, and is only available for paid services created - on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - """ super(SearchIndexerDataSource, self).__init__(**kwargs) self.name = name self.description = description self.type = type self.credentials = credentials self.container = container - self.identity = identity self.data_change_detection_policy = data_change_detection_policy self.data_deletion_detection_policy = data_deletion_detection_policy self.e_tag = e_tag self.encryption_key = encryption_key -class SearchIndexerDataUserAssignedIdentity(SearchIndexerDataIdentity): - """Specifies the identity for a datasource to use. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the identity.Constant filled by - server. - :vartype odata_type: str - :ivar user_assigned_identity: Required. The fully qualified Azure resource Id of a user - assigned managed identity typically in the form - "/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId" - that should have been assigned to the search service. - :vartype user_assigned_identity: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'user_assigned_identity': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, - } - - def __init__( - self, - *, - user_assigned_identity: str, - **kwargs - ): - """ - :keyword user_assigned_identity: Required. The fully qualified Azure resource Id of a user - assigned managed identity typically in the form - "/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId" - that should have been assigned to the search service. - :paramtype user_assigned_identity: str - """ - super(SearchIndexerDataUserAssignedIdentity, self).__init__(**kwargs) - self.odata_type = '#Microsoft.Azure.Search.SearchIndexerDataUserAssignedIdentity' # type: str - self.user_assigned_identity = user_assigned_identity - - class SearchIndexerError(msrest.serialization.Model): """Represents an item- or document-level indexing error. @@ -7139,8 +4728,6 @@ def __init__( self, **kwargs ): - """ - """ super(SearchIndexerError, self).__init__(**kwargs) self.key = None self.error_message = None @@ -7155,11 +4742,11 @@ class SearchIndexerKnowledgeStore(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar storage_connection_string: Required. The connection string to the storage account + :param storage_connection_string: Required. The connection string to the storage account projections will be stored in. - :vartype storage_connection_string: str - :ivar projections: Required. A list of additional projections to perform during indexing. - :vartype projections: + :type storage_connection_string: str + :param projections: Required. A list of additional projections to perform during indexing. + :type projections: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreProjection] """ @@ -7180,14 +4767,6 @@ def __init__( projections: List["SearchIndexerKnowledgeStoreProjection"], **kwargs ): - """ - :keyword storage_connection_string: Required. The connection string to the storage account - projections will be stored in. - :paramtype storage_connection_string: str - :keyword projections: Required. A list of additional projections to perform during indexing. - :paramtype projections: - list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreProjection] - """ super(SearchIndexerKnowledgeStore, self).__init__(**kwargs) self.storage_connection_string = storage_connection_string self.projections = projections @@ -7196,16 +4775,16 @@ def __init__( class SearchIndexerKnowledgeStoreProjectionSelector(msrest.serialization.Model): """Abstract class to share properties between concrete selectors. - :ivar reference_key_name: Name of reference key to different projection. - :vartype reference_key_name: str - :ivar generated_key_name: Name of generated key to store projection under. - :vartype generated_key_name: str - :ivar source: Source data to project. - :vartype source: str - :ivar source_context: Source context for complex projections. - :vartype source_context: str - :ivar inputs: Nested inputs for complex projections. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param reference_key_name: Name of reference key to different projection. + :type reference_key_name: str + :param generated_key_name: Name of generated key to store projection under. + :type generated_key_name: str + :param source: Source data to project. + :type source: str + :param source_context: Source context for complex projections. + :type source_context: str + :param inputs: Nested inputs for complex projections. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] """ _attribute_map = { @@ -7226,18 +4805,6 @@ def __init__( inputs: Optional[List["InputFieldMappingEntry"]] = None, **kwargs ): - """ - :keyword reference_key_name: Name of reference key to different projection. - :paramtype reference_key_name: str - :keyword generated_key_name: Name of generated key to store projection under. - :paramtype generated_key_name: str - :keyword source: Source data to project. - :paramtype source: str - :keyword source_context: Source context for complex projections. - :paramtype source_context: str - :keyword inputs: Nested inputs for complex projections. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - """ super(SearchIndexerKnowledgeStoreProjectionSelector, self).__init__(**kwargs) self.reference_key_name = reference_key_name self.generated_key_name = generated_key_name @@ -7251,18 +4818,18 @@ class SearchIndexerKnowledgeStoreBlobProjectionSelector(SearchIndexerKnowledgeSt All required parameters must be populated in order to send to Azure. - :ivar reference_key_name: Name of reference key to different projection. - :vartype reference_key_name: str - :ivar generated_key_name: Name of generated key to store projection under. - :vartype generated_key_name: str - :ivar source: Source data to project. - :vartype source: str - :ivar source_context: Source context for complex projections. - :vartype source_context: str - :ivar inputs: Nested inputs for complex projections. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar storage_container: Required. Blob container to store projections in. - :vartype storage_container: str + :param reference_key_name: Name of reference key to different projection. + :type reference_key_name: str + :param generated_key_name: Name of generated key to store projection under. + :type generated_key_name: str + :param source: Source data to project. + :type source: str + :param source_context: Source context for complex projections. + :type source_context: str + :param inputs: Nested inputs for complex projections. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param storage_container: Required. Blob container to store projections in. + :type storage_container: str """ _validation = { @@ -7289,20 +4856,6 @@ def __init__( inputs: Optional[List["InputFieldMappingEntry"]] = None, **kwargs ): - """ - :keyword reference_key_name: Name of reference key to different projection. - :paramtype reference_key_name: str - :keyword generated_key_name: Name of generated key to store projection under. - :paramtype generated_key_name: str - :keyword source: Source data to project. - :paramtype source: str - :keyword source_context: Source context for complex projections. - :paramtype source_context: str - :keyword inputs: Nested inputs for complex projections. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword storage_container: Required. Blob container to store projections in. - :paramtype storage_container: str - """ super(SearchIndexerKnowledgeStoreBlobProjectionSelector, self).__init__(reference_key_name=reference_key_name, generated_key_name=generated_key_name, source=source, source_context=source_context, inputs=inputs, **kwargs) self.storage_container = storage_container @@ -7312,18 +4865,18 @@ class SearchIndexerKnowledgeStoreFileProjectionSelector(SearchIndexerKnowledgeSt All required parameters must be populated in order to send to Azure. - :ivar reference_key_name: Name of reference key to different projection. - :vartype reference_key_name: str - :ivar generated_key_name: Name of generated key to store projection under. - :vartype generated_key_name: str - :ivar source: Source data to project. - :vartype source: str - :ivar source_context: Source context for complex projections. - :vartype source_context: str - :ivar inputs: Nested inputs for complex projections. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar storage_container: Required. Blob container to store projections in. - :vartype storage_container: str + :param reference_key_name: Name of reference key to different projection. + :type reference_key_name: str + :param generated_key_name: Name of generated key to store projection under. + :type generated_key_name: str + :param source: Source data to project. + :type source: str + :param source_context: Source context for complex projections. + :type source_context: str + :param inputs: Nested inputs for complex projections. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param storage_container: Required. Blob container to store projections in. + :type storage_container: str """ _validation = { @@ -7350,20 +4903,6 @@ def __init__( inputs: Optional[List["InputFieldMappingEntry"]] = None, **kwargs ): - """ - :keyword reference_key_name: Name of reference key to different projection. - :paramtype reference_key_name: str - :keyword generated_key_name: Name of generated key to store projection under. - :paramtype generated_key_name: str - :keyword source: Source data to project. - :paramtype source: str - :keyword source_context: Source context for complex projections. - :paramtype source_context: str - :keyword inputs: Nested inputs for complex projections. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword storage_container: Required. Blob container to store projections in. - :paramtype storage_container: str - """ super(SearchIndexerKnowledgeStoreFileProjectionSelector, self).__init__(reference_key_name=reference_key_name, generated_key_name=generated_key_name, source=source, source_context=source_context, inputs=inputs, storage_container=storage_container, **kwargs) @@ -7372,18 +4911,18 @@ class SearchIndexerKnowledgeStoreObjectProjectionSelector(SearchIndexerKnowledge All required parameters must be populated in order to send to Azure. - :ivar reference_key_name: Name of reference key to different projection. - :vartype reference_key_name: str - :ivar generated_key_name: Name of generated key to store projection under. - :vartype generated_key_name: str - :ivar source: Source data to project. - :vartype source: str - :ivar source_context: Source context for complex projections. - :vartype source_context: str - :ivar inputs: Nested inputs for complex projections. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar storage_container: Required. Blob container to store projections in. - :vartype storage_container: str + :param reference_key_name: Name of reference key to different projection. + :type reference_key_name: str + :param generated_key_name: Name of generated key to store projection under. + :type generated_key_name: str + :param source: Source data to project. + :type source: str + :param source_context: Source context for complex projections. + :type source_context: str + :param inputs: Nested inputs for complex projections. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param storage_container: Required. Blob container to store projections in. + :type storage_container: str """ _validation = { @@ -7410,34 +4949,20 @@ def __init__( inputs: Optional[List["InputFieldMappingEntry"]] = None, **kwargs ): - """ - :keyword reference_key_name: Name of reference key to different projection. - :paramtype reference_key_name: str - :keyword generated_key_name: Name of generated key to store projection under. - :paramtype generated_key_name: str - :keyword source: Source data to project. - :paramtype source: str - :keyword source_context: Source context for complex projections. - :paramtype source_context: str - :keyword inputs: Nested inputs for complex projections. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword storage_container: Required. Blob container to store projections in. - :paramtype storage_container: str - """ super(SearchIndexerKnowledgeStoreObjectProjectionSelector, self).__init__(reference_key_name=reference_key_name, generated_key_name=generated_key_name, source=source, source_context=source_context, inputs=inputs, storage_container=storage_container, **kwargs) class SearchIndexerKnowledgeStoreProjection(msrest.serialization.Model): """Container object for various projection selectors. - :ivar tables: Projections to Azure Table storage. - :vartype tables: + :param tables: Projections to Azure Table storage. + :type tables: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreTableProjectionSelector] - :ivar objects: Projections to Azure Blob storage. - :vartype objects: + :param objects: Projections to Azure Blob storage. + :type objects: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreObjectProjectionSelector] - :ivar files: Projections to Azure File storage. - :vartype files: + :param files: Projections to Azure File storage. + :type files: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreFileProjectionSelector] """ @@ -7455,17 +4980,6 @@ def __init__( files: Optional[List["SearchIndexerKnowledgeStoreFileProjectionSelector"]] = None, **kwargs ): - """ - :keyword tables: Projections to Azure Table storage. - :paramtype tables: - list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreTableProjectionSelector] - :keyword objects: Projections to Azure Blob storage. - :paramtype objects: - list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreObjectProjectionSelector] - :keyword files: Projections to Azure File storage. - :paramtype files: - list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreFileProjectionSelector] - """ super(SearchIndexerKnowledgeStoreProjection, self).__init__(**kwargs) self.tables = tables self.objects = objects @@ -7477,18 +4991,18 @@ class SearchIndexerKnowledgeStoreTableProjectionSelector(SearchIndexerKnowledgeS All required parameters must be populated in order to send to Azure. - :ivar reference_key_name: Name of reference key to different projection. - :vartype reference_key_name: str - :ivar generated_key_name: Name of generated key to store projection under. - :vartype generated_key_name: str - :ivar source: Source data to project. - :vartype source: str - :ivar source_context: Source context for complex projections. - :vartype source_context: str - :ivar inputs: Nested inputs for complex projections. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar table_name: Required. Name of the Azure table to store projected data in. - :vartype table_name: str + :param reference_key_name: Name of reference key to different projection. + :type reference_key_name: str + :param generated_key_name: Name of generated key to store projection under. + :type generated_key_name: str + :param source: Source data to project. + :type source: str + :param source_context: Source context for complex projections. + :type source_context: str + :param inputs: Nested inputs for complex projections. + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param table_name: Required. Name of the Azure table to store projected data in. + :type table_name: str """ _validation = { @@ -7515,20 +5029,6 @@ def __init__( inputs: Optional[List["InputFieldMappingEntry"]] = None, **kwargs ): - """ - :keyword reference_key_name: Name of reference key to different projection. - :paramtype reference_key_name: str - :keyword generated_key_name: Name of generated key to store projection under. - :paramtype generated_key_name: str - :keyword source: Source data to project. - :paramtype source: str - :keyword source_context: Source context for complex projections. - :paramtype source_context: str - :keyword inputs: Nested inputs for complex projections. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword table_name: Required. Name of the Azure table to store projected data in. - :paramtype table_name: str - """ super(SearchIndexerKnowledgeStoreTableProjectionSelector, self).__init__(reference_key_name=reference_key_name, generated_key_name=generated_key_name, source=source, source_context=source_context, inputs=inputs, **kwargs) self.table_name = table_name @@ -7565,8 +5065,6 @@ def __init__( self, **kwargs ): - """ - """ super(SearchIndexerLimits, self).__init__(**kwargs) self.max_run_time = None self.max_document_extraction_size = None @@ -7578,22 +5076,22 @@ class SearchIndexerSkillset(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the skillset. - :vartype name: str - :ivar description: The description of the skillset. - :vartype description: str - :ivar skills: Required. A list of skills in the skillset. - :vartype skills: list[~azure.search.documents.indexes.models.SearchIndexerSkill] - :ivar cognitive_services_account: Details about cognitive services to be used when running + :param name: Required. The name of the skillset. + :type name: str + :param description: The description of the skillset. + :type description: str + :param skills: Required. A list of skills in the skillset. + :type skills: list[~azure.search.documents.indexes.models.SearchIndexerSkill] + :param cognitive_services_account: Details about cognitive services to be used when running skills. - :vartype cognitive_services_account: + :type cognitive_services_account: ~azure.search.documents.indexes.models.CognitiveServicesAccount - :ivar knowledge_store: Definition of additional projections to azure blob, table, or files, of + :param knowledge_store: Definition of additional projections to azure blob, table, or files, of enriched data. - :vartype knowledge_store: ~azure.search.documents.indexes.models.SearchIndexerKnowledgeStore - :ivar e_tag: The ETag of the skillset. - :vartype e_tag: str - :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault. + :type knowledge_store: ~azure.search.documents.indexes.models.SearchIndexerKnowledgeStore + :param e_tag: The ETag of the skillset. + :type e_tag: str + :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your skillset definition when you want full assurance that no one, not even Microsoft, can decrypt your skillset definition in Azure Cognitive Search. Once you have encrypted your skillset @@ -7602,7 +5100,7 @@ class SearchIndexerSkillset(msrest.serialization.Model): encryption key; Your skillset definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey """ _validation = { @@ -7632,33 +5130,6 @@ def __init__( encryption_key: Optional["SearchResourceEncryptionKey"] = None, **kwargs ): - """ - :keyword name: Required. The name of the skillset. - :paramtype name: str - :keyword description: The description of the skillset. - :paramtype description: str - :keyword skills: Required. A list of skills in the skillset. - :paramtype skills: list[~azure.search.documents.indexes.models.SearchIndexerSkill] - :keyword cognitive_services_account: Details about cognitive services to be used when running - skills. - :paramtype cognitive_services_account: - ~azure.search.documents.indexes.models.CognitiveServicesAccount - :keyword knowledge_store: Definition of additional projections to azure blob, table, or files, - of enriched data. - :paramtype knowledge_store: ~azure.search.documents.indexes.models.SearchIndexerKnowledgeStore - :keyword e_tag: The ETag of the skillset. - :paramtype e_tag: str - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your skillset - definition when you want full assurance that no one, not even Microsoft, can decrypt your - skillset definition in Azure Cognitive Search. Once you have encrypted your skillset - definition, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set - this property to null. You can change this property as needed if you want to rotate your - encryption key; Your skillset definition will be unaffected. Encryption with customer-managed - keys is not available for free search services, and is only available for paid services created - on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - """ super(SearchIndexerSkillset, self).__init__(**kwargs) self.name = name self.description = description @@ -7706,8 +5177,6 @@ def __init__( self, **kwargs ): - """ - """ super(SearchIndexerStatus, self).__init__(**kwargs) self.status = None self.last_result = None @@ -7758,8 +5227,6 @@ def __init__( self, **kwargs ): - """ - """ super(SearchIndexerWarning, self).__init__(**kwargs) self.key = None self.message = None @@ -7773,25 +5240,20 @@ class SearchResourceEncryptionKey(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar key_name: Required. The name of your Azure Key Vault key to be used to encrypt your data + :param key_name: Required. The name of your Azure Key Vault key to be used to encrypt your data at rest. - :vartype key_name: str - :ivar key_version: Required. The version of your Azure Key Vault key to be used to encrypt your - data at rest. - :vartype key_version: str - :ivar vault_uri: Required. The URI of your Azure Key Vault, also referred to as DNS name, that + :type key_name: str + :param key_version: Required. The version of your Azure Key Vault key to be used to encrypt + your data at rest. + :type key_version: str + :param vault_uri: Required. The URI of your Azure Key Vault, also referred to as DNS name, that contains the key to be used to encrypt your data at rest. An example URI might be https://my-keyvault-name.vault.azure.net. - :vartype vault_uri: str - :ivar access_credentials: Optional Azure Active Directory credentials used for accessing your + :type vault_uri: str + :param access_credentials: Optional Azure Active Directory credentials used for accessing your Azure Key Vault. Not required if using managed identity instead. - :vartype access_credentials: + :type access_credentials: ~azure.search.documents.indexes.models.AzureActiveDirectoryApplicationCredentials - :ivar identity: An explicit managed identity to use for this encryption key. If not specified - and the access credentials property is null, the system-assigned managed identity is used. On - update to the resource, if the explicit identity is unspecified, it remains unchanged. If - "none" is specified, the value of this property is cleared. - :vartype identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity """ _validation = { @@ -7805,7 +5267,6 @@ class SearchResourceEncryptionKey(msrest.serialization.Model): 'key_version': {'key': 'keyVaultKeyVersion', 'type': 'str'}, 'vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, 'access_credentials': {'key': 'accessCredentials', 'type': 'AzureActiveDirectoryApplicationCredentials'}, - 'identity': {'key': 'identity', 'type': 'SearchIndexerDataIdentity'}, } def __init__( @@ -7815,129 +5276,13 @@ def __init__( key_version: str, vault_uri: str, access_credentials: Optional["AzureActiveDirectoryApplicationCredentials"] = None, - identity: Optional["SearchIndexerDataIdentity"] = None, - **kwargs - ): - """ - :keyword key_name: Required. The name of your Azure Key Vault key to be used to encrypt your - data at rest. - :paramtype key_name: str - :keyword key_version: Required. The version of your Azure Key Vault key to be used to encrypt - your data at rest. - :paramtype key_version: str - :keyword vault_uri: Required. The URI of your Azure Key Vault, also referred to as DNS name, - that contains the key to be used to encrypt your data at rest. An example URI might be - https://my-keyvault-name.vault.azure.net. - :paramtype vault_uri: str - :keyword access_credentials: Optional Azure Active Directory credentials used for accessing - your Azure Key Vault. Not required if using managed identity instead. - :paramtype access_credentials: - ~azure.search.documents.indexes.models.AzureActiveDirectoryApplicationCredentials - :keyword identity: An explicit managed identity to use for this encryption key. If not - specified and the access credentials property is null, the system-assigned managed identity is - used. On update to the resource, if the explicit identity is unspecified, it remains unchanged. - If "none" is specified, the value of this property is cleared. - :paramtype identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity - """ + **kwargs + ): super(SearchResourceEncryptionKey, self).__init__(**kwargs) self.key_name = key_name self.key_version = key_version self.vault_uri = vault_uri self.access_credentials = access_credentials - self.identity = identity - - -class SemanticConfiguration(msrest.serialization.Model): - """Defines a specific configuration to be used in the context of semantic capabilities. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The name of the semantic configuration. - :vartype name: str - :ivar prioritized_fields: Required. Describes the title, content, and keyword fields to be used - for semantic ranking, captions, highlights, and answers. At least one of the three sub - properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. - :vartype prioritized_fields: ~azure.search.documents.indexes.models.PrioritizedFields - """ - - _validation = { - 'name': {'required': True}, - 'prioritized_fields': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'prioritized_fields': {'key': 'prioritizedFields', 'type': 'PrioritizedFields'}, - } - - def __init__( - self, - *, - name: str, - prioritized_fields: "PrioritizedFields", - **kwargs - ): - """ - :keyword name: Required. The name of the semantic configuration. - :paramtype name: str - :keyword prioritized_fields: Required. Describes the title, content, and keyword fields to be - used for semantic ranking, captions, highlights, and answers. At least one of the three sub - properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. - :paramtype prioritized_fields: ~azure.search.documents.indexes.models.PrioritizedFields - """ - super(SemanticConfiguration, self).__init__(**kwargs) - self.name = name - self.prioritized_fields = prioritized_fields - - -class SemanticField(msrest.serialization.Model): - """A field that is used as part of the semantic configuration. - - :ivar field_name: - :vartype field_name: str - """ - - _attribute_map = { - 'field_name': {'key': 'fieldName', 'type': 'str'}, - } - - def __init__( - self, - *, - field_name: Optional[str] = None, - **kwargs - ): - """ - :keyword field_name: - :paramtype field_name: str - """ - super(SemanticField, self).__init__(**kwargs) - self.field_name = field_name - - -class SemanticSettings(msrest.serialization.Model): - """Defines parameters for a search index that influence semantic capabilities. - - :ivar configurations: The semantic configurations for the index. - :vartype configurations: list[~azure.search.documents.indexes.models.SemanticConfiguration] - """ - - _attribute_map = { - 'configurations': {'key': 'configurations', 'type': '[SemanticConfiguration]'}, - } - - def __init__( - self, - *, - configurations: Optional[List["SemanticConfiguration"]] = None, - **kwargs - ): - """ - :keyword configurations: The semantic configurations for the index. - :paramtype configurations: list[~azure.search.documents.indexes.models.SemanticConfiguration] - """ - super(SemanticSettings, self).__init__(**kwargs) - self.configurations = configurations class SentimentSkill(SearchIndexerSkill): @@ -7945,29 +5290,29 @@ class SentimentSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "nl", "en", "fi", "fr", "de", "el", "it", "no", "pl", "pt-PT", "ru", "es", "sv", "tr". - :vartype default_language_code: str or + :type default_language_code: str or ~azure.search.documents.indexes.models.SentimentSkillLanguage """ @@ -7998,159 +5343,30 @@ def __init__( default_language_code: Optional[Union[str, "SentimentSkillLanguage"]] = None, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "da", "nl", "en", "fi", "fr", "de", "el", "it", "no", "pl", "pt-PT", - "ru", "es", "sv", "tr". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.SentimentSkillLanguage - """ super(SentimentSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Text.SentimentSkill' # type: str self.default_language_code = default_language_code -class SentimentSkillV3(SearchIndexerSkill): - """Using the Text Analytics API, evaluates unstructured text and for each record, provides sentiment labels (such as "negative", "neutral" and "positive") based on the highest confidence score found by the service at a sentence and document-level. - - All required parameters must be populated in order to send to Azure. - - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. - :vartype default_language_code: str - :ivar include_opinion_mining: If set to true, the skill output will include information from - Text Analytics for opinion mining, namely targets (nouns or verbs) and their associated - assessment (adjective) in the text. Default is false. - :vartype include_opinion_mining: bool - :ivar model_version: The version of the model to use when calling the Text Analytics service. - It will default to the latest available when not specified. We recommend you do not specify - this value unless absolutely necessary. - :vartype model_version: str - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - 'default_language_code': {'key': 'defaultLanguageCode', 'type': 'str'}, - 'include_opinion_mining': {'key': 'includeOpinionMining', 'type': 'bool'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - inputs: List["InputFieldMappingEntry"], - outputs: List["OutputFieldMappingEntry"], - name: Optional[str] = None, - description: Optional[str] = None, - context: Optional[str] = None, - default_language_code: Optional[str] = None, - include_opinion_mining: Optional[bool] = False, - model_version: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - :paramtype default_language_code: str - :keyword include_opinion_mining: If set to true, the skill output will include information from - Text Analytics for opinion mining, namely targets (nouns or verbs) and their associated - assessment (adjective) in the text. Default is false. - :paramtype include_opinion_mining: bool - :keyword model_version: The version of the model to use when calling the Text Analytics - service. It will default to the latest available when not specified. We recommend you do not - specify this value unless absolutely necessary. - :paramtype model_version: str - """ - super(SentimentSkillV3, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) - self.odata_type = '#Microsoft.Skills.Text.V3.SentimentSkill' # type: str - self.default_language_code = default_language_code - self.include_opinion_mining = include_opinion_mining - self.model_version = model_version - - class ServiceCounters(msrest.serialization.Model): """Represents service-level resource counters and quotas. All required parameters must be populated in order to send to Azure. - :ivar alias_counter: Total number of aliases. - :vartype alias_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar document_counter: Required. Total number of documents across all indexes in the service. - :vartype document_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar index_counter: Required. Total number of indexes. - :vartype index_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar indexer_counter: Required. Total number of indexers. - :vartype indexer_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar data_source_counter: Required. Total number of data sources. - :vartype data_source_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar storage_size_counter: Required. Total size of used storage in bytes. - :vartype storage_size_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar synonym_map_counter: Required. Total number of synonym maps. - :vartype synonym_map_counter: ~azure.search.documents.indexes.models.ResourceCounter - :ivar skillset_counter: Total number of skillsets. - :vartype skillset_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param document_counter: Required. Total number of documents across all indexes in the service. + :type document_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param index_counter: Required. Total number of indexes. + :type index_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param indexer_counter: Required. Total number of indexers. + :type indexer_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param data_source_counter: Required. Total number of data sources. + :type data_source_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param storage_size_counter: Required. Total size of used storage in bytes. + :type storage_size_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param synonym_map_counter: Required. Total number of synonym maps. + :type synonym_map_counter: ~azure.search.documents.indexes.models.ResourceCounter + :param skillset_counter: Total number of skillsets. + :type skillset_counter: ~azure.search.documents.indexes.models.ResourceCounter """ _validation = { @@ -8163,7 +5379,6 @@ class ServiceCounters(msrest.serialization.Model): } _attribute_map = { - 'alias_counter': {'key': 'aliasesCount', 'type': 'ResourceCounter'}, 'document_counter': {'key': 'documentCount', 'type': 'ResourceCounter'}, 'index_counter': {'key': 'indexesCount', 'type': 'ResourceCounter'}, 'indexer_counter': {'key': 'indexersCount', 'type': 'ResourceCounter'}, @@ -8182,31 +5397,10 @@ def __init__( data_source_counter: "ResourceCounter", storage_size_counter: "ResourceCounter", synonym_map_counter: "ResourceCounter", - alias_counter: Optional["ResourceCounter"] = None, skillset_counter: Optional["ResourceCounter"] = None, **kwargs ): - """ - :keyword alias_counter: Total number of aliases. - :paramtype alias_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword document_counter: Required. Total number of documents across all indexes in the - service. - :paramtype document_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword index_counter: Required. Total number of indexes. - :paramtype index_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword indexer_counter: Required. Total number of indexers. - :paramtype indexer_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword data_source_counter: Required. Total number of data sources. - :paramtype data_source_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword storage_size_counter: Required. Total size of used storage in bytes. - :paramtype storage_size_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword synonym_map_counter: Required. Total number of synonym maps. - :paramtype synonym_map_counter: ~azure.search.documents.indexes.models.ResourceCounter - :keyword skillset_counter: Total number of skillsets. - :paramtype skillset_counter: ~azure.search.documents.indexes.models.ResourceCounter - """ super(ServiceCounters, self).__init__(**kwargs) - self.alias_counter = alias_counter self.document_counter = document_counter self.index_counter = index_counter self.indexer_counter = indexer_counter @@ -8219,17 +5413,17 @@ def __init__( class ServiceLimits(msrest.serialization.Model): """Represents various service level limits. - :ivar max_fields_per_index: The maximum allowed fields per index. - :vartype max_fields_per_index: int - :ivar max_field_nesting_depth_per_index: The maximum depth which you can nest sub-fields in an + :param max_fields_per_index: The maximum allowed fields per index. + :type max_fields_per_index: int + :param max_field_nesting_depth_per_index: The maximum depth which you can nest sub-fields in an index, including the top-level complex field. For example, a/b/c has a nesting depth of 3. - :vartype max_field_nesting_depth_per_index: int - :ivar max_complex_collection_fields_per_index: The maximum number of fields of type + :type max_field_nesting_depth_per_index: int + :param max_complex_collection_fields_per_index: The maximum number of fields of type Collection(Edm.ComplexType) allowed in an index. - :vartype max_complex_collection_fields_per_index: int - :ivar max_complex_objects_in_collections_per_document: The maximum number of objects in complex - collections allowed per document. - :vartype max_complex_objects_in_collections_per_document: int + :type max_complex_collection_fields_per_index: int + :param max_complex_objects_in_collections_per_document: The maximum number of objects in + complex collections allowed per document. + :type max_complex_objects_in_collections_per_document: int """ _attribute_map = { @@ -8248,19 +5442,6 @@ def __init__( max_complex_objects_in_collections_per_document: Optional[int] = None, **kwargs ): - """ - :keyword max_fields_per_index: The maximum allowed fields per index. - :paramtype max_fields_per_index: int - :keyword max_field_nesting_depth_per_index: The maximum depth which you can nest sub-fields in - an index, including the top-level complex field. For example, a/b/c has a nesting depth of 3. - :paramtype max_field_nesting_depth_per_index: int - :keyword max_complex_collection_fields_per_index: The maximum number of fields of type - Collection(Edm.ComplexType) allowed in an index. - :paramtype max_complex_collection_fields_per_index: int - :keyword max_complex_objects_in_collections_per_document: The maximum number of objects in - complex collections allowed per document. - :paramtype max_complex_objects_in_collections_per_document: int - """ super(ServiceLimits, self).__init__(**kwargs) self.max_fields_per_index = max_fields_per_index self.max_field_nesting_depth_per_index = max_field_nesting_depth_per_index @@ -8273,10 +5454,10 @@ class ServiceStatistics(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar counters: Required. Service level resource counters. - :vartype counters: ~azure.search.documents.indexes.models.ServiceCounters - :ivar limits: Required. Service level general limits. - :vartype limits: ~azure.search.documents.indexes.models.ServiceLimits + :param counters: Required. Service level resource counters. + :type counters: ~azure.search.documents.indexes.models.ServiceCounters + :param limits: Required. Service level general limits. + :type limits: ~azure.search.documents.indexes.models.ServiceLimits """ _validation = { @@ -8296,12 +5477,6 @@ def __init__( limits: "ServiceLimits", **kwargs ): - """ - :keyword counters: Required. Service level resource counters. - :paramtype counters: ~azure.search.documents.indexes.models.ServiceCounters - :keyword limits: Required. Service level general limits. - :paramtype limits: ~azure.search.documents.indexes.models.ServiceLimits - """ super(ServiceStatistics, self).__init__(**kwargs) self.counters = counters self.limits = limits @@ -8312,25 +5487,25 @@ class ShaperSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] """ _validation = { @@ -8358,25 +5533,6 @@ def __init__( context: Optional[str] = None, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - """ super(ShaperSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Util.ShaperSkill' # type: str @@ -8386,31 +5542,31 @@ class ShingleTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_shingle_size: The maximum shingle size. Default and minimum value is 2. - :vartype max_shingle_size: int - :ivar min_shingle_size: The minimum shingle size. Default and minimum value is 2. Must be less + :type name: str + :param max_shingle_size: The maximum shingle size. Default and minimum value is 2. + :type max_shingle_size: int + :param min_shingle_size: The minimum shingle size. Default and minimum value is 2. Must be less than the value of maxShingleSize. - :vartype min_shingle_size: int - :ivar output_unigrams: A value indicating whether the output stream will contain the input + :type min_shingle_size: int + :param output_unigrams: A value indicating whether the output stream will contain the input tokens (unigrams) as well as shingles. Default is true. - :vartype output_unigrams: bool - :ivar output_unigrams_if_no_shingles: A value indicating whether to output unigrams for those + :type output_unigrams: bool + :param output_unigrams_if_no_shingles: A value indicating whether to output unigrams for those times when no shingles are available. This property takes precedence when outputUnigrams is set to false. Default is false. - :vartype output_unigrams_if_no_shingles: bool - :ivar token_separator: The string to use when joining adjacent tokens to form a shingle. + :type output_unigrams_if_no_shingles: bool + :param token_separator: The string to use when joining adjacent tokens to form a shingle. Default is a single space (" "). - :vartype token_separator: str - :ivar filter_token: The string to insert for each position at which there is no token. Default + :type token_separator: str + :param filter_token: The string to insert for each position at which there is no token. Default is an underscore ("_"). - :vartype filter_token: str + :type filter_token: str """ _validation = { @@ -8443,30 +5599,6 @@ def __init__( filter_token: Optional[str] = "_", **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_shingle_size: The maximum shingle size. Default and minimum value is 2. - :paramtype max_shingle_size: int - :keyword min_shingle_size: The minimum shingle size. Default and minimum value is 2. Must be - less than the value of maxShingleSize. - :paramtype min_shingle_size: int - :keyword output_unigrams: A value indicating whether the output stream will contain the input - tokens (unigrams) as well as shingles. Default is true. - :paramtype output_unigrams: bool - :keyword output_unigrams_if_no_shingles: A value indicating whether to output unigrams for - those times when no shingles are available. This property takes precedence when outputUnigrams - is set to false. Default is false. - :paramtype output_unigrams_if_no_shingles: bool - :keyword token_separator: The string to use when joining adjacent tokens to form a shingle. - Default is a single space (" "). - :paramtype token_separator: str - :keyword filter_token: The string to insert for each position at which there is no token. - Default is an underscore ("_"). - :paramtype filter_token: str - """ super(ShingleTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.ShingleTokenFilter' # type: str self.max_shingle_size = max_shingle_size @@ -8477,48 +5609,23 @@ def __init__( self.filter_token = filter_token -class SkillNames(msrest.serialization.Model): - """SkillNames. - - :ivar skill_names: the names of skills to be reset. - :vartype skill_names: list[str] - """ - - _attribute_map = { - 'skill_names': {'key': 'skillNames', 'type': '[str]'}, - } - - def __init__( - self, - *, - skill_names: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword skill_names: the names of skills to be reset. - :paramtype skill_names: list[str] - """ - super(SkillNames, self).__init__(**kwargs) - self.skill_names = skill_names - - class SnowballTokenFilter(TokenFilter): """A filter that stems words using a Snowball-generated stemmer. This token filter is implemented using Apache Lucene. All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar language: Required. The language to use. Possible values include: "armenian", "basque", + :type name: str + :param language: Required. The language to use. Possible values include: "armenian", "basque", "catalan", "danish", "dutch", "english", "finnish", "french", "german", "german2", "hungarian", "italian", "kp", "lovins", "norwegian", "porter", "portuguese", "romanian", "russian", "spanish", "swedish", "turkish". - :vartype language: str or ~azure.search.documents.indexes.models.SnowballTokenFilterLanguage + :type language: str or ~azure.search.documents.indexes.models.SnowballTokenFilterLanguage """ _validation = { @@ -8540,17 +5647,6 @@ def __init__( language: Union[str, "SnowballTokenFilterLanguage"], **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword language: Required. The language to use. Possible values include: "armenian", - "basque", "catalan", "danish", "dutch", "english", "finnish", "french", "german", "german2", - "hungarian", "italian", "kp", "lovins", "norwegian", "porter", "portuguese", "romanian", - "russian", "spanish", "swedish", "turkish". - :paramtype language: str or ~azure.search.documents.indexes.models.SnowballTokenFilterLanguage - """ super(SnowballTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.SnowballTokenFilter' # type: str self.language = language @@ -8561,13 +5657,13 @@ class SoftDeleteColumnDeletionDetectionPolicy(DataDeletionDetectionPolicy): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the data deletion detection + :param odata_type: Required. Identifies the concrete type of the data deletion detection policy.Constant filled by server. - :vartype odata_type: str - :ivar soft_delete_column_name: The name of the column to use for soft-deletion detection. - :vartype soft_delete_column_name: str - :ivar soft_delete_marker_value: The marker value that identifies an item as deleted. - :vartype soft_delete_marker_value: str + :type odata_type: str + :param soft_delete_column_name: The name of the column to use for soft-deletion detection. + :type soft_delete_column_name: str + :param soft_delete_marker_value: The marker value that identifies an item as deleted. + :type soft_delete_marker_value: str """ _validation = { @@ -8587,12 +5683,6 @@ def __init__( soft_delete_marker_value: Optional[str] = None, **kwargs ): - """ - :keyword soft_delete_column_name: The name of the column to use for soft-deletion detection. - :paramtype soft_delete_column_name: str - :keyword soft_delete_marker_value: The marker value that identifies an item as deleted. - :paramtype soft_delete_marker_value: str - """ super(SoftDeleteColumnDeletionDetectionPolicy, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy' # type: str self.soft_delete_column_name = soft_delete_column_name @@ -8604,34 +5694,33 @@ class SplitSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_language_code: A value indicating which language code to use. Default is en. + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "de", "en", "es", "fi", "fr", "it", "ko", "pt". - :vartype default_language_code: str or - ~azure.search.documents.indexes.models.SplitSkillLanguage - :ivar text_split_mode: A value indicating which split mode to perform. Possible values include: - "pages", "sentences". - :vartype text_split_mode: str or ~azure.search.documents.indexes.models.TextSplitMode - :ivar maximum_page_length: The desired maximum page length. Default is 10000. - :vartype maximum_page_length: int + :type default_language_code: str or ~azure.search.documents.indexes.models.SplitSkillLanguage + :param text_split_mode: A value indicating which split mode to perform. Possible values + include: "pages", "sentences". + :type text_split_mode: str or ~azure.search.documents.indexes.models.TextSplitMode + :param maximum_page_length: The desired maximum page length. Default is 10000. + :type maximum_page_length: int """ _validation = { @@ -8665,34 +5754,6 @@ def __init__( maximum_page_length: Optional[int] = None, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "da", "de", "en", "es", "fi", "fr", "it", "ko", "pt". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.SplitSkillLanguage - :keyword text_split_mode: A value indicating which split mode to perform. Possible values - include: "pages", "sentences". - :paramtype text_split_mode: str or ~azure.search.documents.indexes.models.TextSplitMode - :keyword maximum_page_length: The desired maximum page length. Default is 10000. - :paramtype maximum_page_length: int - """ super(SplitSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Text.SplitSkill' # type: str self.default_language_code = default_language_code @@ -8705,9 +5766,9 @@ class SqlIntegratedChangeTrackingPolicy(DataChangeDetectionPolicy): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the data change detection + :param odata_type: Required. Identifies the concrete type of the data change detection policy.Constant filled by server. - :vartype odata_type: str + :type odata_type: str """ _validation = { @@ -8722,8 +5783,6 @@ def __init__( self, **kwargs ): - """ - """ super(SqlIntegratedChangeTrackingPolicy, self).__init__(**kwargs) self.odata_type = '#Microsoft.Azure.Search.SqlIntegratedChangeTrackingPolicy' # type: str @@ -8733,16 +5792,16 @@ class StemmerOverrideTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar rules: Required. A list of stemming rules in the following format: "word => stem", for + :type name: str + :param rules: Required. A list of stemming rules in the following format: "word => stem", for example: "ran => run". - :vartype rules: list[str] + :type rules: list[str] """ _validation = { @@ -8764,15 +5823,6 @@ def __init__( rules: List[str], **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword rules: Required. A list of stemming rules in the following format: "word => stem", for - example: "ran => run". - :paramtype rules: list[str] - """ super(StemmerOverrideTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.StemmerOverrideTokenFilter' # type: str self.rules = rules @@ -8783,14 +5833,14 @@ class StemmerTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar language: Required. The language to use. Possible values include: "arabic", "armenian", + :type name: str + :param language: Required. The language to use. Possible values include: "arabic", "armenian", "basque", "brazilian", "bulgarian", "catalan", "czech", "danish", "dutch", "dutchKp", "english", "lightEnglish", "minimalEnglish", "possessiveEnglish", "porter2", "lovins", "finnish", "lightFinnish", "french", "lightFrench", "minimalFrench", "galician", @@ -8799,7 +5849,7 @@ class StemmerTokenFilter(TokenFilter): "latvian", "norwegian", "lightNorwegian", "minimalNorwegian", "lightNynorsk", "minimalNynorsk", "portuguese", "lightPortuguese", "minimalPortuguese", "portugueseRslp", "romanian", "russian", "lightRussian", "spanish", "lightSpanish", "swedish", "lightSwedish", "turkish". - :vartype language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage + :type language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage """ _validation = { @@ -8821,22 +5871,6 @@ def __init__( language: Union[str, "StemmerTokenFilterLanguage"], **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword language: Required. The language to use. Possible values include: "arabic", - "armenian", "basque", "brazilian", "bulgarian", "catalan", "czech", "danish", "dutch", - "dutchKp", "english", "lightEnglish", "minimalEnglish", "possessiveEnglish", "porter2", - "lovins", "finnish", "lightFinnish", "french", "lightFrench", "minimalFrench", "galician", - "minimalGalician", "german", "german2", "lightGerman", "minimalGerman", "greek", "hindi", - "hungarian", "lightHungarian", "indonesian", "irish", "italian", "lightItalian", "sorani", - "latvian", "norwegian", "lightNorwegian", "minimalNorwegian", "lightNynorsk", "minimalNynorsk", - "portuguese", "lightPortuguese", "minimalPortuguese", "portugueseRslp", "romanian", "russian", - "lightRussian", "spanish", "lightSpanish", "swedish", "lightSwedish", "turkish". - :paramtype language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage - """ super(StemmerTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.StemmerTokenFilter' # type: str self.language = language @@ -8847,15 +5881,15 @@ class StopAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the analyzer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar stopwords: A list of stopwords. - :vartype stopwords: list[str] + :type name: str + :param stopwords: A list of stopwords. + :type stopwords: list[str] """ _validation = { @@ -8876,14 +5910,6 @@ def __init__( stopwords: Optional[List[str]] = None, **kwargs ): - """ - :keyword name: Required. The name of the analyzer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword stopwords: A list of stopwords. - :paramtype stopwords: list[str] - """ super(StopAnalyzer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.StopAnalyzer' # type: str self.stopwords = stopwords @@ -8894,29 +5920,29 @@ class StopwordsTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar stopwords: The list of stopwords. This property and the stopwords list property cannot + :type name: str + :param stopwords: The list of stopwords. This property and the stopwords list property cannot both be set. - :vartype stopwords: list[str] - :ivar stopwords_list: A predefined list of stopwords to use. This property and the stopwords + :type stopwords: list[str] + :param stopwords_list: A predefined list of stopwords to use. This property and the stopwords property cannot both be set. Default is English. Possible values include: "arabic", "armenian", "basque", "brazilian", "bulgarian", "catalan", "czech", "danish", "dutch", "english", "finnish", "french", "galician", "german", "greek", "hindi", "hungarian", "indonesian", "irish", "italian", "latvian", "norwegian", "persian", "portuguese", "romanian", "russian", "sorani", "spanish", "swedish", "thai", "turkish". - :vartype stopwords_list: str or ~azure.search.documents.indexes.models.StopwordsList - :ivar ignore_case: A value indicating whether to ignore case. If true, all words are converted + :type stopwords_list: str or ~azure.search.documents.indexes.models.StopwordsList + :param ignore_case: A value indicating whether to ignore case. If true, all words are converted to lower case first. Default is false. - :vartype ignore_case: bool - :ivar remove_trailing_stop_words: A value indicating whether to ignore the last search term if + :type ignore_case: bool + :param remove_trailing_stop_words: A value indicating whether to ignore the last search term if it's a stop word. Default is true. - :vartype remove_trailing_stop_words: bool + :type remove_trailing_stop_words: bool """ _validation = { @@ -8943,28 +5969,6 @@ def __init__( remove_trailing_stop_words: Optional[bool] = True, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword stopwords: The list of stopwords. This property and the stopwords list property cannot - both be set. - :paramtype stopwords: list[str] - :keyword stopwords_list: A predefined list of stopwords to use. This property and the stopwords - property cannot both be set. Default is English. Possible values include: "arabic", "armenian", - "basque", "brazilian", "bulgarian", "catalan", "czech", "danish", "dutch", "english", - "finnish", "french", "galician", "german", "greek", "hindi", "hungarian", "indonesian", - "irish", "italian", "latvian", "norwegian", "persian", "portuguese", "romanian", "russian", - "sorani", "spanish", "swedish", "thai", "turkish". - :paramtype stopwords_list: str or ~azure.search.documents.indexes.models.StopwordsList - :keyword ignore_case: A value indicating whether to ignore case. If true, all words are - converted to lower case first. Default is false. - :paramtype ignore_case: bool - :keyword remove_trailing_stop_words: A value indicating whether to ignore the last search term - if it's a stop word. Default is true. - :paramtype remove_trailing_stop_words: bool - """ super(StopwordsTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.StopwordsTokenFilter' # type: str self.stopwords = stopwords @@ -8980,14 +5984,14 @@ class Suggester(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the suggester. - :vartype name: str - :ivar search_mode: A value indicating the capabilities of the suggester. Has constant value: - "analyzingInfixMatching". + :param name: Required. The name of the suggester. + :type name: str + :ivar search_mode: Required. A value indicating the capabilities of the suggester. Default + value: "analyzingInfixMatching". :vartype search_mode: str - :ivar source_fields: Required. The list of field names to which the suggester applies. Each + :param source_fields: Required. The list of field names to which the suggester applies. Each field must be searchable. - :vartype source_fields: list[str] + :type source_fields: list[str] """ _validation = { @@ -9011,13 +6015,6 @@ def __init__( source_fields: List[str], **kwargs ): - """ - :keyword name: Required. The name of the suggester. - :paramtype name: str - :keyword source_fields: Required. The list of field names to which the suggester applies. Each - field must be searchable. - :paramtype source_fields: list[str] - """ super(Suggester, self).__init__(**kwargs) self.name = name self.source_fields = source_fields @@ -9030,15 +6027,15 @@ class SynonymMap(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar name: Required. The name of the synonym map. - :vartype name: str - :ivar format: The format of the synonym map. Only the 'solr' format is currently supported. Has - constant value: "solr". + :param name: Required. The name of the synonym map. + :type name: str + :ivar format: Required. The format of the synonym map. Only the 'solr' format is currently + supported. Default value: "solr". :vartype format: str - :ivar synonyms: Required. A series of synonym rules in the specified synonym map format. The + :param synonyms: Required. A series of synonym rules in the specified synonym map format. The rules must be separated by newlines. - :vartype synonyms: str - :ivar encryption_key: A description of an encryption key that you create in Azure Key Vault. + :type synonyms: str + :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive @@ -9046,9 +6043,9 @@ class SynonymMap(msrest.serialization.Model): needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - :vartype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :ivar e_tag: The ETag of the synonym map. - :vartype e_tag: str + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :param e_tag: The ETag of the synonym map. + :type e_tag: str """ _validation = { @@ -9076,24 +6073,6 @@ def __init__( e_tag: Optional[str] = None, **kwargs ): - """ - :keyword name: Required. The name of the synonym map. - :paramtype name: str - :keyword synonyms: Required. A series of synonym rules in the specified synonym map format. The - rules must be separated by newlines. - :paramtype synonyms: str - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your data when you - want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive - Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive - Search will ignore attempts to set this property to null. You can change this property as - needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with - customer-managed keys is not available for free search services, and is only available for paid - services created on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :keyword e_tag: The ETag of the synonym map. - :paramtype e_tag: str - """ super(SynonymMap, self).__init__(**kwargs) self.name = name self.synonyms = synonyms @@ -9106,30 +6085,30 @@ class SynonymTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar synonyms: Required. A list of synonyms in following one of two formats: 1. incredible, + :type name: str + :param synonyms: Required. A list of synonyms in following one of two formats: 1. incredible, unbelievable, fabulous => amazing - all terms on the left side of => symbol will be replaced with all terms on its right side; 2. incredible, unbelievable, fabulous, amazing - comma separated list of equivalent words. Set the expand option to change how this list is interpreted. - :vartype synonyms: list[str] - :ivar ignore_case: A value indicating whether to case-fold input for matching. Default is + :type synonyms: list[str] + :param ignore_case: A value indicating whether to case-fold input for matching. Default is false. - :vartype ignore_case: bool - :ivar expand: A value indicating whether all words in the list of synonyms (if => notation is + :type ignore_case: bool + :param expand: A value indicating whether all words in the list of synonyms (if => notation is not used) will map to one another. If true, all words in the list of synonyms (if => notation is not used) will map to one another. The following list: incredible, unbelievable, fabulous, amazing is equivalent to: incredible, unbelievable, fabulous, amazing => incredible, unbelievable, fabulous, amazing. If false, the following list: incredible, unbelievable, fabulous, amazing will be equivalent to: incredible, unbelievable, fabulous, amazing => incredible. Default is true. - :vartype expand: bool + :type expand: bool """ _validation = { @@ -9155,29 +6134,6 @@ def __init__( expand: Optional[bool] = True, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword synonyms: Required. A list of synonyms in following one of two formats: 1. incredible, - unbelievable, fabulous => amazing - all terms on the left side of => symbol will be replaced - with all terms on its right side; 2. incredible, unbelievable, fabulous, amazing - comma - separated list of equivalent words. Set the expand option to change how this list is - interpreted. - :paramtype synonyms: list[str] - :keyword ignore_case: A value indicating whether to case-fold input for matching. Default is - false. - :paramtype ignore_case: bool - :keyword expand: A value indicating whether all words in the list of synonyms (if => notation - is not used) will map to one another. If true, all words in the list of synonyms (if => - notation is not used) will map to one another. The following list: incredible, unbelievable, - fabulous, amazing is equivalent to: incredible, unbelievable, fabulous, amazing => incredible, - unbelievable, fabulous, amazing. If false, the following list: incredible, unbelievable, - fabulous, amazing will be equivalent to: incredible, unbelievable, fabulous, amazing => - incredible. Default is true. - :paramtype expand: bool - """ super(SynonymTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.SynonymTokenFilter' # type: str self.synonyms = synonyms @@ -9190,21 +6146,20 @@ class TagScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :ivar type: Required. Indicates the type of function to use. Valid values include magnitude, + :param type: Required. Indicates the type of function to use. Valid values include magnitude, freshness, distance, and tag. The function type must be lower case.Constant filled by server. - :vartype type: str - :ivar field_name: Required. The name of the field used as input to the scoring function. - :vartype field_name: str - :ivar boost: Required. A multiplier for the raw score. Must be a positive number not equal to + :type type: str + :param field_name: Required. The name of the field used as input to the scoring function. + :type field_name: str + :param boost: Required. A multiplier for the raw score. Must be a positive number not equal to 1.0. - :vartype boost: float - :ivar interpolation: A value indicating how boosting will be interpolated across document + :type boost: float + :param interpolation: A value indicating how boosting will be interpolated across document scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", "logarithmic". - :vartype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :ivar parameters: Required. Parameter values for the tag scoring function. - :vartype parameters: ~azure.search.documents.indexes.models.TagScoringParameters + :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation + :param parameters: Required. Parameter values for the tag scoring function. + :type parameters: ~azure.search.documents.indexes.models.TagScoringParameters """ _validation = { @@ -9231,20 +6186,6 @@ def __init__( interpolation: Optional[Union[str, "ScoringFunctionInterpolation"]] = None, **kwargs ): - """ - :keyword field_name: Required. The name of the field used as input to the scoring function. - :paramtype field_name: str - :keyword boost: Required. A multiplier for the raw score. Must be a positive number not equal - to 1.0. - :paramtype boost: float - :keyword interpolation: A value indicating how boosting will be interpolated across document - scores; defaults to "Linear". Possible values include: "linear", "constant", "quadratic", - "logarithmic". - :paramtype interpolation: str or - ~azure.search.documents.indexes.models.ScoringFunctionInterpolation - :keyword parameters: Required. Parameter values for the tag scoring function. - :paramtype parameters: ~azure.search.documents.indexes.models.TagScoringParameters - """ super(TagScoringFunction, self).__init__(field_name=field_name, boost=boost, interpolation=interpolation, **kwargs) self.type = 'tag' # type: str self.parameters = parameters @@ -9255,9 +6196,9 @@ class TagScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar tags_parameter: Required. The name of the parameter passed in search queries to specify + :param tags_parameter: Required. The name of the parameter passed in search queries to specify the list of tags to compare against the target field. - :vartype tags_parameter: str + :type tags_parameter: str """ _validation = { @@ -9274,11 +6215,6 @@ def __init__( tags_parameter: str, **kwargs ): - """ - :keyword tags_parameter: Required. The name of the parameter passed in search queries to - specify the list of tags to compare against the target field. - :paramtype tags_parameter: str - """ super(TagScoringParameters, self).__init__(**kwargs) self.tags_parameter = tags_parameter @@ -9288,53 +6224,52 @@ class TextTranslationSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar default_to_language_code: Required. The language code to translate documents into for + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param default_to_language_code: Required. The language code to translate documents into for documents that don't specify the to language explicitly. Possible values include: "af", "ar", "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw", - "tlh", "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", - "pt-br", "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", - "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa". - :vartype default_to_language_code: str or + "tlh", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "otq", "ro", "ru", "sm", + "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", "ur", + "vi", "cy", "yua". + :type default_to_language_code: str or ~azure.search.documents.indexes.models.TextTranslationSkillLanguage - :ivar default_from_language_code: The language code to translate documents from for documents + :param default_from_language_code: The language code to translate documents from for documents that don't specify the from language explicitly. Possible values include: "af", "ar", "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw", "tlh", - "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "pt-br", - "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", - "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa". - :vartype default_from_language_code: str or + "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "otq", "ro", "ru", "sm", "sr-Cyrl", + "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", + "yua". + :type default_from_language_code: str or ~azure.search.documents.indexes.models.TextTranslationSkillLanguage - :ivar suggested_from: The language code to translate documents from when neither the + :param suggested_from: The language code to translate documents from when neither the fromLanguageCode input nor the defaultFromLanguageCode parameter are provided, and the automatic language detection is unsuccessful. Default is en. Possible values include: "af", "ar", "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", - "sw", "tlh", "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", - "pt", "pt-br", "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", - "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", - "pa". - :vartype suggested_from: str or + "sw", "tlh", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "otq", "ro", "ru", + "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", + "ur", "vi", "cy", "yua". + :type suggested_from: str or ~azure.search.documents.indexes.models.TextTranslationSkillLanguage """ @@ -9370,54 +6305,6 @@ def __init__( suggested_from: Optional[Union[str, "TextTranslationSkillLanguage"]] = None, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_to_language_code: Required. The language code to translate documents into for - documents that don't specify the to language explicitly. Possible values include: "af", "ar", - "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", - "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw", - "tlh", "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", - "pt-br", "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", - "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa". - :paramtype default_to_language_code: str or - ~azure.search.documents.indexes.models.TextTranslationSkillLanguage - :keyword default_from_language_code: The language code to translate documents from for - documents that don't specify the from language explicitly. Possible values include: "af", "ar", - "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", - "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", "sw", - "tlh", "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", - "pt-br", "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", - "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", "pa". - :paramtype default_from_language_code: str or - ~azure.search.documents.indexes.models.TextTranslationSkillLanguage - :keyword suggested_from: The language code to translate documents from when neither the - fromLanguageCode input nor the defaultFromLanguageCode parameter are provided, and the - automatic language detection is unsuccessful. Default is en. Possible values include: "af", - "ar", "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", - "fj", "fil", "fi", "fr", "de", "el", "ht", "he", "hi", "mww", "hu", "is", "id", "it", "ja", - "sw", "tlh", "tlh-Latn", "tlh-Piqd", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", - "pt", "pt-br", "pt-PT", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", - "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua", "ga", "kn", "mi", "ml", - "pa". - :paramtype suggested_from: str or - ~azure.search.documents.indexes.models.TextTranslationSkillLanguage - """ super(TextTranslationSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Text.TranslationSkill' # type: str self.default_to_language_code = default_to_language_code @@ -9430,9 +6317,9 @@ class TextWeights(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar weights: Required. The dictionary of per-field weights to boost document scoring. The + :param weights: Required. The dictionary of per-field weights to boost document scoring. The keys are field names and the values are the weights for each field. - :vartype weights: dict[str, float] + :type weights: dict[str, float] """ _validation = { @@ -9449,11 +6336,6 @@ def __init__( weights: Dict[str, float], **kwargs ): - """ - :keyword weights: Required. The dictionary of per-field weights to boost document scoring. The - keys are field names and the values are the weights for each field. - :paramtype weights: dict[str, float] - """ super(TextWeights, self).__init__(**kwargs) self.weights = weights @@ -9463,15 +6345,15 @@ class TruncateTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar length: The length at which terms will be truncated. Default and maximum is 300. - :vartype length: int + :type name: str + :param length: The length at which terms will be truncated. Default and maximum is 300. + :type length: int """ _validation = { @@ -9493,14 +6375,6 @@ def __init__( length: Optional[int] = 300, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword length: The length at which terms will be truncated. Default and maximum is 300. - :paramtype length: int - """ super(TruncateTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.TruncateTokenFilter' # type: str self.length = length @@ -9511,16 +6385,16 @@ class UaxUrlEmailTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :vartype odata_type: str - :ivar name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar max_token_length: The maximum token length. Default is 255. Tokens longer than the + :type name: str + :param max_token_length: The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters. - :vartype max_token_length: int + :type max_token_length: int """ _validation = { @@ -9542,15 +6416,6 @@ def __init__( max_token_length: Optional[int] = 255, **kwargs ): - """ - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword max_token_length: The maximum token length. Default is 255. Tokens longer than the - maximum length are split. The maximum token length that can be used is 300 characters. - :paramtype max_token_length: int - """ super(UaxUrlEmailTokenizer, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.UaxUrlEmailTokenizer' # type: str self.max_token_length = max_token_length @@ -9561,16 +6426,16 @@ class UniqueTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar only_on_same_position: A value indicating whether to remove duplicates only at the same + :type name: str + :param only_on_same_position: A value indicating whether to remove duplicates only at the same position. Default is false. - :vartype only_on_same_position: bool + :type only_on_same_position: bool """ _validation = { @@ -9591,15 +6456,6 @@ def __init__( only_on_same_position: Optional[bool] = False, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword only_on_same_position: A value indicating whether to remove duplicates only at the - same position. Default is false. - :paramtype only_on_same_position: bool - """ super(UniqueTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.UniqueTokenFilter' # type: str self.only_on_same_position = only_on_same_position @@ -9610,38 +6466,38 @@ class WebApiSkill(SearchIndexerSkill): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the skill.Constant filled by + :param odata_type: Required. Identifies the concrete type of the skill.Constant filled by server. - :vartype odata_type: str - :ivar name: The name of the skill which uniquely identifies it within the skillset. A skill + :type odata_type: str + :param name: The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - :vartype name: str - :ivar description: The description of the skill which describes the inputs, outputs, and usage + :type name: str + :param description: The description of the skill which describes the inputs, outputs, and usage of the skill. - :vartype description: str - :ivar context: Represents the level at which operations take place, such as the document root + :type description: str + :param context: Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - :vartype context: str - :ivar inputs: Required. Inputs of the skills could be a column in the source data set, or the + :type context: str + :param inputs: Required. Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - :vartype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :ivar outputs: Required. The output of a skill is either a field in a search index, or a value + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] + :param outputs: Required. The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - :vartype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :ivar uri: Required. The url for the Web API. - :vartype uri: str - :ivar http_headers: The headers required to make the http request. - :vartype http_headers: dict[str, str] - :ivar http_method: The method for the http request. - :vartype http_method: str - :ivar timeout: The desired timeout for the request. Default is 30 seconds. - :vartype timeout: ~datetime.timedelta - :ivar batch_size: The desired batch size which indicates number of documents. - :vartype batch_size: int - :ivar degree_of_parallelism: If set, the number of parallel calls that can be made to the Web + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] + :param uri: Required. The url for the Web API. + :type uri: str + :param http_headers: The headers required to make the http request. + :type http_headers: dict[str, str] + :param http_method: The method for the http request. + :type http_method: str + :param timeout: The desired timeout for the request. Default is 30 seconds. + :type timeout: ~datetime.timedelta + :param batch_size: The desired batch size which indicates number of documents. + :type batch_size: int + :param degree_of_parallelism: If set, the number of parallel calls that can be made to the Web API. - :vartype degree_of_parallelism: int + :type degree_of_parallelism: int """ _validation = { @@ -9682,38 +6538,6 @@ def __init__( degree_of_parallelism: Optional[int] = None, **kwargs ): - """ - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and - usage of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document - root or document content (for example, /document or /document/content). The default is - /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or - the output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a - value that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword uri: Required. The url for the Web API. - :paramtype uri: str - :keyword http_headers: The headers required to make the http request. - :paramtype http_headers: dict[str, str] - :keyword http_method: The method for the http request. - :paramtype http_method: str - :keyword timeout: The desired timeout for the request. Default is 30 seconds. - :paramtype timeout: ~datetime.timedelta - :keyword batch_size: The desired batch size which indicates number of documents. - :paramtype batch_size: int - :keyword degree_of_parallelism: If set, the number of parallel calls that can be made to the - Web API. - :paramtype degree_of_parallelism: int - """ super(WebApiSkill, self).__init__(name=name, description=description, context=context, inputs=inputs, outputs=outputs, **kwargs) self.odata_type = '#Microsoft.Skills.Custom.WebApiSkill' # type: str self.uri = uri @@ -9729,43 +6553,43 @@ class WordDelimiterTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :ivar odata_type: Required. Identifies the concrete type of the token filter.Constant filled by - server. - :vartype odata_type: str - :ivar name: Required. The name of the token filter. It must only contain letters, digits, + :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + by server. + :type odata_type: str + :param name: Required. The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :vartype name: str - :ivar generate_word_parts: A value indicating whether to generate part words. If set, causes + :type name: str + :param generate_word_parts: A value indicating whether to generate part words. If set, causes parts of words to be generated; for example "AzureSearch" becomes "Azure" "Search". Default is true. - :vartype generate_word_parts: bool - :ivar generate_number_parts: A value indicating whether to generate number subwords. Default is - true. - :vartype generate_number_parts: bool - :ivar catenate_words: A value indicating whether maximum runs of word parts will be catenated. + :type generate_word_parts: bool + :param generate_number_parts: A value indicating whether to generate number subwords. Default + is true. + :type generate_number_parts: bool + :param catenate_words: A value indicating whether maximum runs of word parts will be catenated. For example, if this is set to true, "Azure-Search" becomes "AzureSearch". Default is false. - :vartype catenate_words: bool - :ivar catenate_numbers: A value indicating whether maximum runs of number parts will be + :type catenate_words: bool + :param catenate_numbers: A value indicating whether maximum runs of number parts will be catenated. For example, if this is set to true, "1-2" becomes "12". Default is false. - :vartype catenate_numbers: bool - :ivar catenate_all: A value indicating whether all subword parts will be catenated. For + :type catenate_numbers: bool + :param catenate_all: A value indicating whether all subword parts will be catenated. For example, if this is set to true, "Azure-Search-1" becomes "AzureSearch1". Default is false. - :vartype catenate_all: bool - :ivar split_on_case_change: A value indicating whether to split words on caseChange. For + :type catenate_all: bool + :param split_on_case_change: A value indicating whether to split words on caseChange. For example, if this is set to true, "AzureSearch" becomes "Azure" "Search". Default is true. - :vartype split_on_case_change: bool - :ivar preserve_original: A value indicating whether original words will be preserved and added + :type split_on_case_change: bool + :param preserve_original: A value indicating whether original words will be preserved and added to the subword list. Default is false. - :vartype preserve_original: bool - :ivar split_on_numerics: A value indicating whether to split on numbers. For example, if this + :type preserve_original: bool + :param split_on_numerics: A value indicating whether to split on numbers. For example, if this is set to true, "Azure1Search" becomes "Azure" "1" "Search". Default is true. - :vartype split_on_numerics: bool - :ivar stem_english_possessive: A value indicating whether to remove trailing "'s" for each + :type split_on_numerics: bool + :param stem_english_possessive: A value indicating whether to remove trailing "'s" for each subword. Default is true. - :vartype stem_english_possessive: bool - :ivar protected_words: A list of tokens to protect from being delimited. - :vartype protected_words: list[str] + :type stem_english_possessive: bool + :param protected_words: A list of tokens to protect from being delimited. + :type protected_words: list[str] """ _validation = { @@ -9804,43 +6628,6 @@ def __init__( protected_words: Optional[List[str]] = None, **kwargs ): - """ - :keyword name: Required. The name of the token filter. It must only contain letters, digits, - spaces, dashes or underscores, can only start and end with alphanumeric characters, and is - limited to 128 characters. - :paramtype name: str - :keyword generate_word_parts: A value indicating whether to generate part words. If set, causes - parts of words to be generated; for example "AzureSearch" becomes "Azure" "Search". Default is - true. - :paramtype generate_word_parts: bool - :keyword generate_number_parts: A value indicating whether to generate number subwords. Default - is true. - :paramtype generate_number_parts: bool - :keyword catenate_words: A value indicating whether maximum runs of word parts will be - catenated. For example, if this is set to true, "Azure-Search" becomes "AzureSearch". Default - is false. - :paramtype catenate_words: bool - :keyword catenate_numbers: A value indicating whether maximum runs of number parts will be - catenated. For example, if this is set to true, "1-2" becomes "12". Default is false. - :paramtype catenate_numbers: bool - :keyword catenate_all: A value indicating whether all subword parts will be catenated. For - example, if this is set to true, "Azure-Search-1" becomes "AzureSearch1". Default is false. - :paramtype catenate_all: bool - :keyword split_on_case_change: A value indicating whether to split words on caseChange. For - example, if this is set to true, "AzureSearch" becomes "Azure" "Search". Default is true. - :paramtype split_on_case_change: bool - :keyword preserve_original: A value indicating whether original words will be preserved and - added to the subword list. Default is false. - :paramtype preserve_original: bool - :keyword split_on_numerics: A value indicating whether to split on numbers. For example, if - this is set to true, "Azure1Search" becomes "Azure" "1" "Search". Default is true. - :paramtype split_on_numerics: bool - :keyword stem_english_possessive: A value indicating whether to remove trailing "'s" for each - subword. Default is true. - :paramtype stem_english_possessive: bool - :keyword protected_words: A list of tokens to protect from being delimited. - :paramtype protected_words: list[str] - """ super(WordDelimiterTokenFilter, self).__init__(name=name, **kwargs) self.odata_type = '#Microsoft.Azure.Search.WordDelimiterTokenFilter' # type: str self.generate_word_parts = generate_word_parts diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_search_client_enums.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_search_client_enums.py index ebf99e514ceb..2b86a352a5c2 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_search_client_enums.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_search_client_enums.py @@ -6,12 +6,27 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum +from enum import Enum, EnumMeta from six import with_metaclass -from azure.core import CaseInsensitiveEnumMeta +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) -class BlobIndexerDataToExtract(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class BlobIndexerDataToExtract(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies the data to extract from Azure blob storage and tells the indexer which data to extract from image content when "imageAction" is set to a value other than "none". This applies to embedded image content in a .PDF or other application, or image files such as .jpg @@ -26,7 +41,7 @@ class BlobIndexerDataToExtract(with_metaclass(CaseInsensitiveEnumMeta, str, Enum #: Extracts all metadata and textual content from each blob. CONTENT_AND_METADATA = "contentAndMetadata" -class BlobIndexerImageAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class BlobIndexerImageAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Determines how to process embedded images and image files in Azure blob storage. Setting the "imageAction" configuration to any value other than "none" requires that a skillset also be attached to that indexer. @@ -46,7 +61,7 @@ class BlobIndexerImageAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)) #: types will be treated the same as if "generateNormalizedImages" was set. GENERATE_NORMALIZED_IMAGE_PER_PAGE = "generateNormalizedImagePerPage" -class BlobIndexerParsingMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class BlobIndexerParsingMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Represents the parsing mode for indexing from an Azure blob data source. """ @@ -65,7 +80,7 @@ class BlobIndexerParsingMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)) #: documents in Azure Cognitive Search. JSON_LINES = "jsonLines" -class BlobIndexerPDFTextRotationAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class BlobIndexerPDFTextRotationAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Determines algorithm for text extraction from PDF files in Azure blob storage. """ @@ -77,7 +92,7 @@ class BlobIndexerPDFTextRotationAlgorithm(with_metaclass(CaseInsensitiveEnumMeta #: rotated text appears within an embedded image in the PDF, this parameter does not apply. DETECT_ANGLES = "detectAngles" -class CharFilterName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class CharFilterName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Defines the names of all character filters supported by Azure Cognitive Search. """ @@ -85,7 +100,7 @@ class CharFilterName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: https://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.html. HTML_STRIP = "html_strip" -class CjkBigramTokenFilterScripts(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class CjkBigramTokenFilterScripts(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Scripts that can be ignored by CjkBigramTokenFilter. """ @@ -98,7 +113,7 @@ class CjkBigramTokenFilterScripts(with_metaclass(CaseInsensitiveEnumMeta, str, E #: Ignore Hangul script when forming bigrams of CJK terms. HANGUL = "hangul" -class CustomEntityLookupSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class CustomEntityLookupSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The language codes supported for input text by CustomEntityLookupSkill. """ @@ -121,7 +136,7 @@ class CustomEntityLookupSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, st #: Portuguese. PT = "pt" -class EdgeNGramTokenFilterSide(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class EdgeNGramTokenFilterSide(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies which side of the input an n-gram should be generated from. """ @@ -130,7 +145,7 @@ class EdgeNGramTokenFilterSide(with_metaclass(CaseInsensitiveEnumMeta, str, Enum #: Specifies that the n-gram should be generated from the back of the input. BACK = "back" -class EntityCategory(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class EntityCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """A string indicating what entity categories to return. """ @@ -149,7 +164,7 @@ class EntityCategory(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Entities describing an email address. EMAIL = "email" -class EntityRecognitionSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class EntityRecognitionSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The language codes supported for input text by EntityRecognitionSkill. """ @@ -200,7 +215,7 @@ class EntityRecognitionSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str #: Turkish. TR = "tr" -class ImageAnalysisSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class ImageAnalysisSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The language codes supported for input by ImageAnalysisSkill. """ @@ -215,7 +230,7 @@ class ImageAnalysisSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, En #: Chinese. ZH = "zh" -class ImageDetail(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class ImageDetail(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """A string indicating which domain-specific details to return. """ @@ -224,7 +239,7 @@ class ImageDetail(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Details recognized as landmarks. LANDMARKS = "landmarks" -class IndexerExecutionEnvironment(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class IndexerExecutionEnvironment(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies the environment in which the indexer should execute. """ @@ -236,7 +251,7 @@ class IndexerExecutionEnvironment(with_metaclass(CaseInsensitiveEnumMeta, str, E #: to access resources securely over shared private link resources. PRIVATE = "private" -class IndexerExecutionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class IndexerExecutionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Represents the status of an individual indexer execution. """ @@ -250,14 +265,7 @@ class IndexerExecutionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)) #: Indexer has been reset. RESET = "reset" -class IndexerExecutionStatusDetail(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Details the status of an individual indexer execution. - """ - - #: Indicates that the reset that occurred was for a call to ResetDocs. - RESET_DOCS = "resetDocs" - -class IndexerStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class IndexerStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Represents the overall indexer status. """ @@ -269,17 +277,7 @@ class IndexerStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Indicates that the indexer is running normally. RUNNING = "running" -class IndexingMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Represents the mode the indexer is executing in. - """ - - #: The indexer is indexing all documents in the datasource. - INDEXING_ALL_DOCS = "indexingAllDocs" - #: The indexer is indexing selective, reset documents in the datasource. The documents being - #: indexed are defined on indexer status. - INDEXING_RESET_DOCS = "indexingResetDocs" - -class KeyPhraseExtractionSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class KeyPhraseExtractionSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The language codes supported for input text by KeyPhraseExtractionSkill. """ @@ -316,7 +314,7 @@ class KeyPhraseExtractionSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, s #: Swedish. SV = "sv" -class LexicalAnalyzerName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class LexicalAnalyzerName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Defines the names of all text analyzers supported by Azure Cognitive Search. """ @@ -514,29 +512,7 @@ class LexicalAnalyzerName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/WhitespaceAnalyzer.html. WHITESPACE = "whitespace" -class LexicalNormalizerName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Defines the names of all text normalizers supported by Azure Cognitive Search. - """ - - #: Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 - #: ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if such - #: equivalents exist. See - #: http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ASCIIFoldingFilter.html. - ASCII_FOLDING = "asciifolding" - #: Removes elisions. For example, "l'avion" (the plane) will be converted to "avion" (plane). See - #: http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/util/ElisionFilter.html. - ELISION = "elision" - #: Normalizes token text to lowercase. See - #: https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/LowerCaseFilter.html. - LOWERCASE = "lowercase" - #: Standard normalizer, which consists of lowercase and asciifolding. See - #: http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/reverse/ReverseStringFilter.html. - STANDARD = "standard" - #: Normalizes token text to uppercase. See - #: https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/UpperCaseFilter.html. - UPPERCASE = "uppercase" - -class LexicalTokenizerName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class LexicalTokenizerName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Defines the names of all tokenizers supported by Azure Cognitive Search. """ @@ -579,21 +555,7 @@ class LexicalTokenizerName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/WhitespaceTokenizer.html. WHITESPACE = "whitespace" -class LineEnding(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Defines the sequence of characters to use between the lines of text recognized by the OCR - skill. The default value is "space". - """ - - #: Lines are separated by a single space character. - SPACE = "space" - #: Lines are separated by a carriage return ('\r') character. - CARRIAGE_RETURN = "carriageReturn" - #: Lines are separated by a single line feed ('\n') character. - LINE_FEED = "lineFeed" - #: Lines are separated by a carriage return and a line feed ('\r\n') character. - CARRIAGE_RETURN_LINE_FEED = "carriageReturnLineFeed" - -class MicrosoftStemmingTokenizerLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class MicrosoftStemmingTokenizerLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Lists the languages supported by the Microsoft language stemming tokenizer. """ @@ -688,7 +650,7 @@ class MicrosoftStemmingTokenizerLanguage(with_metaclass(CaseInsensitiveEnumMeta, #: Selects the Microsoft stemming tokenizer for Urdu. URDU = "urdu" -class MicrosoftTokenizerLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class MicrosoftTokenizerLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Lists the languages supported by the Microsoft language tokenizer. """ @@ -777,7 +739,7 @@ class MicrosoftTokenizerLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, En #: Selects the Microsoft tokenizer for Vietnamese. VIETNAMESE = "vietnamese" -class OcrSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class OcrSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The language codes supported for input by OcrSkill. """ @@ -833,10 +795,8 @@ class OcrSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): SR_LATN = "sr-Latn" #: Slovak. SK = "sk" - #: Unknown. If the language is explicitly set to "unk", the language will be auto-detected. - UNK = "unk" -class PhoneticEncoder(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class PhoneticEncoder(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Identifies the type of phonetic encoder to use with a PhoneticTokenFilter. """ @@ -863,19 +823,7 @@ class PhoneticEncoder(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Encodes a token into a Beider-Morse value. BEIDER_MORSE = "beiderMorse" -class PIIDetectionSkillMaskingMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """A string indicating what maskingMode to use to mask the personal information detected in the - input text. - """ - - #: No masking occurs and the maskedText output will not be returned. - NONE = "none" - #: Replaces the detected entities with the character given in the maskingCharacter parameter. The - #: character will be repeated to the length of the detected entity so that the offsets will - #: correctly correspond to both the input text as well as the output maskedText. - REPLACE = "replace" - -class RegexFlags(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class RegexFlags(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Defines flags that can be combined to control how regular expressions are used in the pattern analyzer and pattern tokenizer. """ @@ -897,7 +845,7 @@ class RegexFlags(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Enables Unix lines mode. UNIX_LINES = "UNIX_LINES" -class ScoringFunctionAggregation(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class ScoringFunctionAggregation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Defines the aggregation function used to combine the results of all the scoring functions in a scoring profile. """ @@ -913,7 +861,7 @@ class ScoringFunctionAggregation(with_metaclass(CaseInsensitiveEnumMeta, str, En #: Boost scores using the first applicable scoring function in the scoring profile. FIRST_MATCHING = "firstMatching" -class ScoringFunctionInterpolation(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class ScoringFunctionInterpolation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Defines the function used to interpolate score boosting across a range of documents. """ @@ -931,7 +879,7 @@ class ScoringFunctionInterpolation(with_metaclass(CaseInsensitiveEnumMeta, str, #: scoring functions. LOGARITHMIC = "logarithmic" -class SearchFieldDataType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class SearchFieldDataType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Defines the data type of a field in a search index. """ @@ -953,7 +901,7 @@ class SearchFieldDataType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: other types. COMPLEX = "Edm.ComplexType" -class SearchIndexerDataSourceType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class SearchIndexerDataSourceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Defines the type of a datasource. """ @@ -970,7 +918,7 @@ class SearchIndexerDataSourceType(with_metaclass(CaseInsensitiveEnumMeta, str, E #: Indicates an ADLS Gen2 datasource. ADLS_GEN2 = "adlsgen2" -class SentimentSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class SentimentSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The language codes supported for input text by SentimentSkill. """ @@ -1005,7 +953,7 @@ class SentimentSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)) #: Turkish. TR = "tr" -class SnowballTokenFilterLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class SnowballTokenFilterLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The language to use for a Snowball token filter. """ @@ -1057,7 +1005,7 @@ class SnowballTokenFilterLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, E #: Selects the Lucene Snowball stemming tokenizer for Turkish. TURKISH = "turkish" -class SplitSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class SplitSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The language codes supported for input text by SplitSkill. """ @@ -1080,7 +1028,7 @@ class SplitSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Portuguese. PT = "pt" -class StemmerTokenFilterLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class StemmerTokenFilterLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The language to use for a stemmer token filter. """ @@ -1194,7 +1142,7 @@ class StemmerTokenFilterLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, En #: Selects the Lucene stemming tokenizer for Turkish. TURKISH = "turkish" -class StopwordsList(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class StopwordsList(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Identifies a predefined list of language-specific stopwords. """ @@ -1261,7 +1209,7 @@ class StopwordsList(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Selects the stopword list for Turkish. TURKISH = "turkish" -class TextSplitMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class TextSplitMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """A value indicating which split mode to perform. """ @@ -1270,7 +1218,7 @@ class TextSplitMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Split the text into individual sentences. SENTENCES = "sentences" -class TextTranslationSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class TextTranslationSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The language codes supported for input text by TextTranslationSkill. """ @@ -1338,10 +1286,6 @@ class TextTranslationSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, SW = "sw" #: Klingon. TLH = "tlh" - #: Klingon (Latin script). - TLH_LATN = "tlh-Latn" - #: Klingon (Klingon script). - TLH_PIQD = "tlh-Piqd" #: Korean. KO = "ko" #: Latvian. @@ -1362,10 +1306,6 @@ class TextTranslationSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, PL = "pl" #: Portuguese. PT = "pt" - #: Portuguese (Brazil). - PT_BR = "pt-br" - #: Portuguese (Portugal). - PT_PT = "pt-PT" #: Queretaro Otomi. OTQ = "otq" #: Romanian. @@ -1408,18 +1348,8 @@ class TextTranslationSkillLanguage(with_metaclass(CaseInsensitiveEnumMeta, str, CY = "cy" #: Yucatec Maya. YUA = "yua" - #: Irish. - GA = "ga" - #: Kannada. - KN = "kn" - #: Maori. - MI = "mi" - #: Malayalam. - ML = "ml" - #: Punjabi. - PA = "pa" - -class TokenCharacterKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + +class TokenCharacterKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Represents classes of characters on which a token filter can operate. """ @@ -1434,7 +1364,7 @@ class TokenCharacterKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Keeps symbols in tokens. SYMBOL = "symbol" -class TokenFilterName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class TokenFilterName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Defines the names of all token filters supported by Azure Cognitive Search. """ @@ -1492,7 +1422,7 @@ class TokenFilterName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/LimitTokenCountFilter.html. LIMIT = "limit" #: Normalizes token text to lower case. See - #: https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/LowerCaseFilter.html. + #: http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/LowerCaseFilter.htm. LOWERCASE = "lowercase" #: Generates n-grams of the given size(s). See #: http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ngram/NGramTokenFilter.html. @@ -1541,12 +1471,12 @@ class TokenFilterName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/RemoveDuplicatesTokenFilter.html. UNIQUE = "unique" #: Normalizes token text to upper case. See - #: https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/UpperCaseFilter.html. + #: http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/UpperCaseFilter.html. UPPERCASE = "uppercase" #: Splits words into subwords and performs optional transformations on subword groups. WORD_DELIMITER = "word_delimiter" -class VisualFeature(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class VisualFeature(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The strings indicating what visual feature types to return. """ diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/__init__.py index 55362b2a834a..4ab9e775b13d 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/__init__.py @@ -11,7 +11,6 @@ from ._skillsets_operations import SkillsetsOperations from ._synonym_maps_operations import SynonymMapsOperations from ._indexes_operations import IndexesOperations -from ._aliases_operations import AliasesOperations from ._search_client_operations import SearchClientOperationsMixin __all__ = [ @@ -20,6 +19,5 @@ 'SkillsetsOperations', 'SynonymMapsOperations', 'IndexesOperations', - 'AliasesOperations', 'SearchClientOperationsMixin', ] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_aliases_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_aliases_operations.py deleted file mode 100644 index bf493f88270e..000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_aliases_operations.py +++ /dev/null @@ -1,630 +0,0 @@ -# pylint: disable=too-many-lines -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING - -from msrest import Serializer - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Iterable, Optional, TypeVar - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_create_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/aliases") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/aliases") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - alias_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - if_match = kwargs.pop('if_match', None) # type: Optional[str] - if_none_match = kwargs.pop('if_none_match', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/aliases(\'{aliasName}\')") - path_format_arguments = { - "aliasName": _SERIALIZER.url("alias_name", alias_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if if_match is not None: - _header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') - if if_none_match is not None: - _header_parameters['If-None-Match'] = _SERIALIZER.header("if_none_match", if_none_match, 'str') - _header_parameters['Prefer'] = _SERIALIZER.header("prefer", prefer, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - alias_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - if_match = kwargs.pop('if_match', None) # type: Optional[str] - if_none_match = kwargs.pop('if_none_match', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/aliases(\'{aliasName}\')") - path_format_arguments = { - "aliasName": _SERIALIZER.url("alias_name", alias_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if if_match is not None: - _header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') - if if_none_match is not None: - _header_parameters['If-None-Match'] = _SERIALIZER.header("if_none_match", if_none_match, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - alias_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/aliases(\'{aliasName}\')") - path_format_arguments = { - "aliasName": _SERIALIZER.url("alias_name", alias_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on -class AliasesOperations(object): - """AliasesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.indexes.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def create( - self, - alias, # type: "_models.SearchAlias" - request_options=None, # type: Optional["_models.RequestOptions"] - **kwargs # type: Any - ): - # type: (...) -> "_models.SearchAlias" - """Creates a new search alias. - - :param alias: The definition of the alias to create. - :type alias: ~azure.search.documents.indexes.models.SearchAlias - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SearchAlias, or the result of cls(response) - :rtype: ~azure.search.documents.indexes.models.SearchAlias - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SearchAlias"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(alias, 'SearchAlias') - - request = build_create_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.create.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('SearchAlias', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create.metadata = {'url': "/aliases"} # type: ignore - - - @distributed_trace - def list( - self, - request_options=None, # type: Optional["_models.RequestOptions"] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ListAliasesResult"] - """Lists all aliases available for a search service. - - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListAliasesResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.search.documents.indexes.models.ListAliasesResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListAliasesResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - def prepare_request(next_link=None): - if not next_link: - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - - request = build_list_request( - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - else: - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - - request = build_list_request( - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=next_link, - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.method = "GET" - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ListAliasesResult", pipeline_response) - list_of_elem = deserialized.aliases - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': "/aliases"} # type: ignore - - @distributed_trace - def create_or_update( - self, - alias_name, # type: str - alias, # type: "_models.SearchAlias" - if_match=None, # type: Optional[str] - if_none_match=None, # type: Optional[str] - request_options=None, # type: Optional["_models.RequestOptions"] - **kwargs # type: Any - ): - # type: (...) -> "_models.SearchAlias" - """Creates a new search alias or updates an alias if it already exists. - - :param alias_name: The definition of the alias to create or update. - :type alias_name: str - :param alias: The definition of the alias to create or update. - :type alias: ~azure.search.documents.indexes.models.SearchAlias - :param if_match: Defines the If-Match condition. The operation will be performed only if the - ETag on the server matches this value. - :type if_match: str - :param if_none_match: Defines the If-None-Match condition. The operation will be performed only - if the ETag on the server does not match this value. - :type if_none_match: str - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword prefer: For HTTP PUT requests, instructs the service to return the created/updated - resource on success. The default value is "return=representation". Note that overriding this - default value may result in unsupported behavior. - :paramtype prefer: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SearchAlias, or the result of cls(response) - :rtype: ~azure.search.documents.indexes.models.SearchAlias - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SearchAlias"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(alias, 'SearchAlias') - - request = build_create_or_update_request( - alias_name=alias_name, - prefer=prefer, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - if response.status_code == 200: - deserialized = self._deserialize('SearchAlias', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('SearchAlias', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - create_or_update.metadata = {'url': "/aliases(\'{aliasName}\')"} # type: ignore - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, - alias_name, # type: str - if_match=None, # type: Optional[str] - if_none_match=None, # type: Optional[str] - request_options=None, # type: Optional["_models.RequestOptions"] - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes a search alias and its associated mapping to an index. This operation is permanent, - with no recovery option. The mapped index is untouched by this operation. - - :param alias_name: The name of the alias to delete. - :type alias_name: str - :param if_match: Defines the If-Match condition. The operation will be performed only if the - ETag on the server matches this value. - :type if_match: str - :param if_none_match: Defines the If-None-Match condition. The operation will be performed only - if the ETag on the server does not match this value. - :type if_none_match: str - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - - request = build_delete_request( - alias_name=alias_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [204, 404]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': "/aliases(\'{aliasName}\')"} # type: ignore - - - @distributed_trace - def get( - self, - alias_name, # type: str - request_options=None, # type: Optional["_models.RequestOptions"] - **kwargs # type: Any - ): - # type: (...) -> "_models.SearchAlias" - """Retrieves an alias definition. - - :param alias_name: The name of the alias to retrieve. - :type alias_name: str - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SearchAlias, or the result of cls(response) - :rtype: ~azure.search.documents.indexes.models.SearchAlias - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SearchAlias"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - - request = build_get_request( - alias_name=alias_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('SearchAlias', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': "/aliases(\'{aliasName}\')"} # type: ignore - diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_data_sources_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_data_sources_operations.py index ad6f6841d98b..86ac7b0213f3 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_data_sources_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_data_sources_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,222 +6,21 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace +from azure.core.pipeline.transport import HttpRequest, HttpResponse from .. import models as _models -from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_create_or_update_request( - data_source_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - if_match = kwargs.pop('if_match', None) # type: Optional[str] - if_none_match = kwargs.pop('if_none_match', None) # type: Optional[str] - skip_indexer_reset_requirement_for_cache = kwargs.pop('skip_indexer_reset_requirement_for_cache', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/datasources(\'{dataSourceName}\')") - path_format_arguments = { - "dataSourceName": _SERIALIZER.url("data_source_name", data_source_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if skip_indexer_reset_requirement_for_cache is not None: - _query_parameters['ignoreResetRequirements'] = _SERIALIZER.query("skip_indexer_reset_requirement_for_cache", skip_indexer_reset_requirement_for_cache, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if if_match is not None: - _header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') - if if_none_match is not None: - _header_parameters['If-None-Match'] = _SERIALIZER.header("if_none_match", if_none_match, 'str') - _header_parameters['Prefer'] = _SERIALIZER.header("prefer", prefer, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - data_source_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - if_match = kwargs.pop('if_match', None) # type: Optional[str] - if_none_match = kwargs.pop('if_none_match', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/datasources(\'{dataSourceName}\')") - path_format_arguments = { - "dataSourceName": _SERIALIZER.url("data_source_name", data_source_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if if_match is not None: - _header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') - if if_none_match is not None: - _header_parameters['If-None-Match'] = _SERIALIZER.header("if_none_match", if_none_match, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - data_source_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/datasources(\'{dataSourceName}\')") - path_format_arguments = { - "dataSourceName": _SERIALIZER.url("data_source_name", data_source_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - select = kwargs.pop('select', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/datasources") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if select is not None: - _query_parameters['$select'] = _SERIALIZER.query("select", select, 'str') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/datasources") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on class DataSourcesOperations(object): """DataSourcesOperations operations. @@ -245,14 +43,12 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - @distributed_trace def create_or_update( self, data_source_name, # type: str data_source, # type: "_models.SearchIndexerDataSource" if_match=None, # type: Optional[str] if_none_match=None, # type: Optional[str] - skip_indexer_reset_requirement_for_cache=None, # type: Optional[bool] request_options=None, # type: Optional["_models.RequestOptions"] **kwargs # type: Any ): @@ -269,14 +65,8 @@ def create_or_update( :param if_none_match: Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. :type if_none_match: str - :param skip_indexer_reset_requirement_for_cache: Ignores cache reset requirements. - :type skip_indexer_reset_requirement_for_cache: bool :param request_options: Parameter group. :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword prefer: For HTTP PUT requests, instructs the service to return the created/updated - resource on success. The default value is "return=representation". Note that overriding this - default value may result in unsupported behavior. - :paramtype prefer: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SearchIndexerDataSource, or the result of cls(response) :rtype: ~azure.search.documents.indexes.models.SearchIndexerDataSource @@ -287,44 +77,49 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(data_source, 'SearchIndexerDataSource') - - request = build_create_or_update_request( - data_source_name=data_source_name, - prefer=prefer, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - skip_indexer_reset_requirement_for_cache=skip_indexer_reset_requirement_for_cache, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) + prefer = "return=representation" + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'dataSourceName': self._serialize.url("data_source_name", data_source_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Prefer'] = self._serialize.header("prefer", prefer, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(data_source, 'SearchIndexerDataSource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -337,12 +132,9 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/datasources(\'{dataSourceName}\')'} # type: ignore - create_or_update.metadata = {'url': "/datasources(\'{dataSourceName}\')"} # type: ignore - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements + def delete( self, data_source_name, # type: str if_match=None, # type: Optional[str] @@ -373,46 +165,49 @@ def delete( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_delete_request( - data_source_name=data_source_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'dataSourceName': self._serialize.url("data_source_name", data_source_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/datasources(\'{dataSourceName}\')"} # type: ignore - + delete.metadata = {'url': '/datasources(\'{dataSourceName}\')'} # type: ignore - @distributed_trace def get( self, data_source_name, # type: str @@ -436,35 +231,38 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_request( - data_source_name=data_source_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'dataSourceName': self._serialize.url("data_source_name", data_source_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexerDataSource', pipeline_response) @@ -473,11 +271,8 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/datasources(\'{dataSourceName}\')'} # type: ignore - get.metadata = {'url': "/datasources(\'{dataSourceName}\')"} # type: ignore - - - @distributed_trace def list( self, select=None, # type: Optional[str] @@ -503,35 +298,39 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_list_request( - api_version=api_version, - select=select, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ListDataSourcesResult', pipeline_response) @@ -540,11 +339,8 @@ def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/datasources'} # type: ignore - list.metadata = {'url': "/datasources"} # type: ignore - - - @distributed_trace def create( self, data_source, # type: "_models.SearchIndexerDataSource" @@ -568,38 +364,42 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(data_source, 'SearchIndexerDataSource') - - request = build_create_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.create.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(data_source, 'SearchIndexerDataSource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexerDataSource', pipeline_response) @@ -608,6 +408,4 @@ def create( return cls(pipeline_response, deserialized, {}) return deserialized - - create.metadata = {'url': "/datasources"} # type: ignore - + create.metadata = {'url': '/datasources'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_indexers_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_indexers_operations.py index d87a2515db56..e053d0deef27 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_indexers_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_indexers_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,375 +6,21 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace +from azure.core.pipeline.transport import HttpRequest, HttpResponse from .. import models as _models -from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_reset_request( - indexer_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexers(\'{indexerName}\')/search.reset") - path_format_arguments = { - "indexerName": _SERIALIZER.url("indexer_name", indexer_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_reset_docs_request( - indexer_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - overwrite = kwargs.pop('overwrite', False) # type: Optional[bool] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexers(\'{indexerName}\')/search.resetdocs") - path_format_arguments = { - "indexerName": _SERIALIZER.url("indexer_name", indexer_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if overwrite is not None: - _query_parameters['overwrite'] = _SERIALIZER.query("overwrite", overwrite, 'bool') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_run_request( - indexer_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexers(\'{indexerName}\')/search.run") - path_format_arguments = { - "indexerName": _SERIALIZER.url("indexer_name", indexer_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - indexer_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - if_match = kwargs.pop('if_match', None) # type: Optional[str] - if_none_match = kwargs.pop('if_none_match', None) # type: Optional[str] - skip_indexer_reset_requirement_for_cache = kwargs.pop('skip_indexer_reset_requirement_for_cache', None) # type: Optional[bool] - disable_cache_reprocessing_change_detection = kwargs.pop('disable_cache_reprocessing_change_detection', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexers(\'{indexerName}\')") - path_format_arguments = { - "indexerName": _SERIALIZER.url("indexer_name", indexer_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if skip_indexer_reset_requirement_for_cache is not None: - _query_parameters['ignoreResetRequirements'] = _SERIALIZER.query("skip_indexer_reset_requirement_for_cache", skip_indexer_reset_requirement_for_cache, 'bool') - if disable_cache_reprocessing_change_detection is not None: - _query_parameters['disableCacheReprocessingChangeDetection'] = _SERIALIZER.query("disable_cache_reprocessing_change_detection", disable_cache_reprocessing_change_detection, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if if_match is not None: - _header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') - if if_none_match is not None: - _header_parameters['If-None-Match'] = _SERIALIZER.header("if_none_match", if_none_match, 'str') - _header_parameters['Prefer'] = _SERIALIZER.header("prefer", prefer, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - indexer_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - if_match = kwargs.pop('if_match', None) # type: Optional[str] - if_none_match = kwargs.pop('if_none_match', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexers(\'{indexerName}\')") - path_format_arguments = { - "indexerName": _SERIALIZER.url("indexer_name", indexer_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if if_match is not None: - _header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') - if if_none_match is not None: - _header_parameters['If-None-Match'] = _SERIALIZER.header("if_none_match", if_none_match, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - indexer_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexers(\'{indexerName}\')") - path_format_arguments = { - "indexerName": _SERIALIZER.url("indexer_name", indexer_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - select = kwargs.pop('select', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexers") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if select is not None: - _query_parameters['$select'] = _SERIALIZER.query("select", select, 'str') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexers") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_status_request( - indexer_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexers(\'{indexerName}\')/search.status") - path_format_arguments = { - "indexerName": _SERIALIZER.url("indexer_name", indexer_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on class IndexersOperations(object): """IndexersOperations operations. @@ -398,8 +43,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - @distributed_trace - def reset( # pylint: disable=inconsistent-return-statements + def reset( self, indexer_name, # type: str request_options=None, # type: Optional["_models.RequestOptions"] @@ -422,121 +66,46 @@ def reset( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_reset_request( - indexer_name=indexer_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.reset.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.reset.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - reset.metadata = {'url': "/indexers(\'{indexerName}\')/search.reset"} # type: ignore - - - @distributed_trace - def reset_docs( # pylint: disable=inconsistent-return-statements - self, - indexer_name, # type: str - overwrite=False, # type: Optional[bool] - keys_or_ids=None, # type: Optional["_models.DocumentKeysOrIds"] - request_options=None, # type: Optional["_models.RequestOptions"] - **kwargs # type: Any - ): - # type: (...) -> None - """Resets specific documents in the datasource to be selectively re-ingested by the indexer. - - :param indexer_name: The name of the indexer to reset documents for. - :type indexer_name: str - :param overwrite: If false, keys or ids will be appended to existing ones. If true, only the - keys or ids in this payload will be queued to be re-ingested. - :type overwrite: bool - :param keys_or_ids: - :type keys_or_ids: ~azure.search.documents.indexes.models.DocumentKeysOrIds - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), } - error_map.update(kwargs.pop('error_map', {})) + url = self._client.format_url(url, **path_format_arguments) - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - if keys_or_ids is not None: - _json = self._serialize.body(keys_or_ids, 'DocumentKeysOrIds') - else: - _json = None - - request = build_reset_docs_request( - indexer_name=indexer_name, - api_version=api_version, - content_type=content_type, - json=_json, - overwrite=overwrite, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.reset_docs.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - reset_docs.metadata = {'url': "/indexers(\'{indexerName}\')/search.resetdocs"} # type: ignore - + reset.metadata = {'url': '/indexers(\'{indexerName}\')/search.reset'} # type: ignore - @distributed_trace - def run( # pylint: disable=inconsistent-return-statements + def run( self, indexer_name, # type: str request_options=None, # type: Optional["_models.RequestOptions"] @@ -559,52 +128,51 @@ def run( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_run_request( - indexer_name=indexer_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.run.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.run.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - run.metadata = {'url': "/indexers(\'{indexerName}\')/search.run"} # type: ignore - + run.metadata = {'url': '/indexers(\'{indexerName}\')/search.run'} # type: ignore - @distributed_trace def create_or_update( self, indexer_name, # type: str indexer, # type: "_models.SearchIndexer" if_match=None, # type: Optional[str] if_none_match=None, # type: Optional[str] - skip_indexer_reset_requirement_for_cache=None, # type: Optional[bool] - disable_cache_reprocessing_change_detection=None, # type: Optional[bool] request_options=None, # type: Optional["_models.RequestOptions"] **kwargs # type: Any ): @@ -621,17 +189,8 @@ def create_or_update( :param if_none_match: Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. :type if_none_match: str - :param skip_indexer_reset_requirement_for_cache: Ignores cache reset requirements. - :type skip_indexer_reset_requirement_for_cache: bool - :param disable_cache_reprocessing_change_detection: Disables cache reprocessing change - detection. - :type disable_cache_reprocessing_change_detection: bool :param request_options: Parameter group. :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword prefer: For HTTP PUT requests, instructs the service to return the created/updated - resource on success. The default value is "return=representation". Note that overriding this - default value may result in unsupported behavior. - :paramtype prefer: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SearchIndexer, or the result of cls(response) :rtype: ~azure.search.documents.indexes.models.SearchIndexer @@ -642,45 +201,49 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(indexer, 'SearchIndexer') - - request = build_create_or_update_request( - indexer_name=indexer_name, - prefer=prefer, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - skip_indexer_reset_requirement_for_cache=skip_indexer_reset_requirement_for_cache, - disable_cache_reprocessing_change_detection=disable_cache_reprocessing_change_detection, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) + prefer = "return=representation" + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Prefer'] = self._serialize.header("prefer", prefer, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(indexer, 'SearchIndexer') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -693,12 +256,9 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/indexers(\'{indexerName}\')'} # type: ignore - create_or_update.metadata = {'url': "/indexers(\'{indexerName}\')"} # type: ignore - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements + def delete( self, indexer_name, # type: str if_match=None, # type: Optional[str] @@ -729,46 +289,49 @@ def delete( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_delete_request( - indexer_name=indexer_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/indexers(\'{indexerName}\')"} # type: ignore - + delete.metadata = {'url': '/indexers(\'{indexerName}\')'} # type: ignore - @distributed_trace def get( self, indexer_name, # type: str @@ -792,35 +355,38 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_request( - indexer_name=indexer_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexer', pipeline_response) @@ -829,11 +395,8 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/indexers(\'{indexerName}\')'} # type: ignore - get.metadata = {'url': "/indexers(\'{indexerName}\')"} # type: ignore - - - @distributed_trace def list( self, select=None, # type: Optional[str] @@ -859,35 +422,39 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_list_request( - api_version=api_version, - select=select, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ListIndexersResult', pipeline_response) @@ -896,11 +463,8 @@ def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/indexers'} # type: ignore - list.metadata = {'url': "/indexers"} # type: ignore - - - @distributed_trace def create( self, indexer, # type: "_models.SearchIndexer" @@ -924,38 +488,42 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(indexer, 'SearchIndexer') - - request = build_create_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.create.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(indexer, 'SearchIndexer') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexer', pipeline_response) @@ -964,11 +532,8 @@ def create( return cls(pipeline_response, deserialized, {}) return deserialized + create.metadata = {'url': '/indexers'} # type: ignore - create.metadata = {'url': "/indexers"} # type: ignore - - - @distributed_trace def get_status( self, indexer_name, # type: str @@ -992,35 +557,38 @@ def get_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_status_request( - indexer_name=indexer_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get_status.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get_status.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexerStatus', pipeline_response) @@ -1029,6 +597,4 @@ def get_status( return cls(pipeline_response, deserialized, {}) return deserialized - - get_status.metadata = {'url': "/indexers(\'{indexerName}\')/search.status"} # type: ignore - + get_status.metadata = {'url': '/indexers(\'{indexerName}\')/search.status'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_indexes_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_indexes_operations.py index 438747233886..354fd984c37d 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_indexes_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_indexes_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,298 +6,22 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace +from azure.core.pipeline.transport import HttpRequest, HttpResponse from .. import models as _models -from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_create_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexes") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - select = kwargs.pop('select', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexes") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if select is not None: - _query_parameters['$select'] = _SERIALIZER.query("select", select, 'str') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_or_update_request( - index_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - allow_index_downtime = kwargs.pop('allow_index_downtime', None) # type: Optional[bool] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - if_match = kwargs.pop('if_match', None) # type: Optional[str] - if_none_match = kwargs.pop('if_none_match', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexes(\'{indexName}\')") - path_format_arguments = { - "indexName": _SERIALIZER.url("index_name", index_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if allow_index_downtime is not None: - _query_parameters['allowIndexDowntime'] = _SERIALIZER.query("allow_index_downtime", allow_index_downtime, 'bool') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if if_match is not None: - _header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') - if if_none_match is not None: - _header_parameters['If-None-Match'] = _SERIALIZER.header("if_none_match", if_none_match, 'str') - _header_parameters['Prefer'] = _SERIALIZER.header("prefer", prefer, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - index_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - if_match = kwargs.pop('if_match', None) # type: Optional[str] - if_none_match = kwargs.pop('if_none_match', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexes(\'{indexName}\')") - path_format_arguments = { - "indexName": _SERIALIZER.url("index_name", index_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if if_match is not None: - _header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') - if if_none_match is not None: - _header_parameters['If-None-Match'] = _SERIALIZER.header("if_none_match", if_none_match, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - index_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexes(\'{indexName}\')") - path_format_arguments = { - "indexName": _SERIALIZER.url("index_name", index_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_statistics_request( - index_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexes(\'{indexName}\')/search.stats") - path_format_arguments = { - "indexName": _SERIALIZER.url("index_name", index_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_analyze_request( - index_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/indexes(\'{indexName}\')/search.analyze") - path_format_arguments = { - "indexName": _SERIALIZER.url("index_name", index_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on class IndexesOperations(object): """IndexesOperations operations. @@ -321,7 +44,6 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - @distributed_trace def create( self, index, # type: "_models.SearchIndex" @@ -345,38 +67,42 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(index, 'SearchIndex') - - request = build_create_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.create.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(index, 'SearchIndex') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndex', pipeline_response) @@ -385,11 +111,8 @@ def create( return cls(pipeline_response, deserialized, {}) return deserialized + create.metadata = {'url': '/indexes'} # type: ignore - create.metadata = {'url': "/indexes"} # type: ignore - - - @distributed_trace def list( self, select=None, # type: Optional[str] @@ -410,56 +133,51 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.search.documents.indexes.models.ListIndexesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListIndexesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) + + _x_ms_client_request_id = None + if request_options is not None: + _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - - request = build_list_request( - api_version=api_version, - select=select, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) else: - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - - request = build_list_request( - api_version=api_version, - select=select, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=next_link, - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - + url = next_link + query_parameters = {} # type: Dict[str, Any] path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.method = "GET" + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): - deserialized = self._deserialize("ListIndexesResult", pipeline_response) + deserialized = self._deserialize('ListIndexesResult', pipeline_response) list_of_elem = deserialized.indexes if cls: list_of_elem = cls(list_of_elem) @@ -468,27 +186,21 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) raise HttpResponseError(response=response, model=error) return pipeline_response - return ItemPaged( get_next, extract_data ) - list.metadata = {'url': "/indexes"} # type: ignore + list.metadata = {'url': '/indexes'} # type: ignore - @distributed_trace def create_or_update( self, index_name, # type: str @@ -520,10 +232,6 @@ def create_or_update( :type if_none_match: str :param request_options: Parameter group. :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword prefer: For HTTP PUT requests, instructs the service to return the created/updated - resource on success. The default value is "return=representation". Note that overriding this - default value may result in unsupported behavior. - :paramtype prefer: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SearchIndex, or the result of cls(response) :rtype: ~azure.search.documents.indexes.models.SearchIndex @@ -534,44 +242,51 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(index, 'SearchIndex') - - request = build_create_or_update_request( - index_name=index_name, - prefer=prefer, - api_version=api_version, - content_type=content_type, - json=_json, - allow_index_downtime=allow_index_downtime, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) + prefer = "return=representation" + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("index_name", index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if allow_index_downtime is not None: + query_parameters['allowIndexDowntime'] = self._serialize.query("allow_index_downtime", allow_index_downtime, 'bool') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Prefer'] = self._serialize.header("prefer", prefer, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(index, 'SearchIndex') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -584,12 +299,9 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore - create_or_update.metadata = {'url': "/indexes(\'{indexName}\')"} # type: ignore - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements + def delete( self, index_name, # type: str if_match=None, # type: Optional[str] @@ -622,46 +334,49 @@ def delete( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_delete_request( - index_name=index_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("index_name", index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/indexes(\'{indexName}\')"} # type: ignore + delete.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore - - @distributed_trace def get( self, index_name, # type: str @@ -685,35 +400,38 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_request( - index_name=index_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("index_name", index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndex', pipeline_response) @@ -722,11 +440,8 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore - get.metadata = {'url': "/indexes(\'{indexName}\')"} # type: ignore - - - @distributed_trace def get_statistics( self, index_name, # type: str @@ -750,35 +465,38 @@ def get_statistics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_statistics_request( - index_name=index_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get_statistics.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get_statistics.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("index_name", index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('GetIndexStatisticsResult', pipeline_response) @@ -787,11 +505,8 @@ def get_statistics( return cls(pipeline_response, deserialized, {}) return deserialized + get_statistics.metadata = {'url': '/indexes(\'{indexName}\')/search.stats'} # type: ignore - get_statistics.metadata = {'url': "/indexes(\'{indexName}\')/search.stats"} # type: ignore - - - @distributed_trace def analyze( self, index_name, # type: str @@ -818,39 +533,43 @@ def analyze( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(request, 'AnalyzeRequest') - - request = build_analyze_request( - index_name=index_name, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.analyze.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.analyze.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'indexName': self._serialize.url("index_name", index_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'AnalyzeRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AnalyzeResult', pipeline_response) @@ -859,6 +578,4 @@ def analyze( return cls(pipeline_response, deserialized, {}) return deserialized - - analyze.metadata = {'url': "/indexes(\'{indexName}\')/search.analyze"} # type: ignore - + analyze.metadata = {'url': '/indexes(\'{indexName}\')/search.analyze'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_search_client_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_search_client_operations.py index 4169313f7d50..a625d0596ee7 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_search_client_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_search_client_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,61 +6,23 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace +from azure.core.pipeline.transport import HttpRequest, HttpResponse from .. import models as _models -from .._vendor import _convert_request if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_get_service_statistics_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/servicestats") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on class SearchClientOperationsMixin(object): - @distributed_trace def get_service_statistics( self, request_options=None, # type: Optional["_models.RequestOptions"] @@ -82,34 +43,37 @@ def get_service_statistics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_service_statistics_request( - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get_service_statistics.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get_service_statistics.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ServiceStatistics', pipeline_response) @@ -118,6 +82,4 @@ def get_service_statistics( return cls(pipeline_response, deserialized, {}) return deserialized - - get_service_statistics.metadata = {'url': "/servicestats"} # type: ignore - + get_service_statistics.metadata = {'url': '/servicestats'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_skillsets_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_skillsets_operations.py index 74cf5f95a422..4efe94c80003 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_skillsets_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_skillsets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,264 +6,21 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace +from azure.core.pipeline.transport import HttpRequest, HttpResponse from .. import models as _models -from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, List, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_create_or_update_request( - skillset_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - if_match = kwargs.pop('if_match', None) # type: Optional[str] - if_none_match = kwargs.pop('if_none_match', None) # type: Optional[str] - skip_indexer_reset_requirement_for_cache = kwargs.pop('skip_indexer_reset_requirement_for_cache', None) # type: Optional[bool] - disable_cache_reprocessing_change_detection = kwargs.pop('disable_cache_reprocessing_change_detection', None) # type: Optional[bool] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/skillsets(\'{skillsetName}\')") - path_format_arguments = { - "skillsetName": _SERIALIZER.url("skillset_name", skillset_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if skip_indexer_reset_requirement_for_cache is not None: - _query_parameters['ignoreResetRequirements'] = _SERIALIZER.query("skip_indexer_reset_requirement_for_cache", skip_indexer_reset_requirement_for_cache, 'bool') - if disable_cache_reprocessing_change_detection is not None: - _query_parameters['disableCacheReprocessingChangeDetection'] = _SERIALIZER.query("disable_cache_reprocessing_change_detection", disable_cache_reprocessing_change_detection, 'bool') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if if_match is not None: - _header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') - if if_none_match is not None: - _header_parameters['If-None-Match'] = _SERIALIZER.header("if_none_match", if_none_match, 'str') - _header_parameters['Prefer'] = _SERIALIZER.header("prefer", prefer, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - skillset_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - if_match = kwargs.pop('if_match', None) # type: Optional[str] - if_none_match = kwargs.pop('if_none_match', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/skillsets(\'{skillsetName}\')") - path_format_arguments = { - "skillsetName": _SERIALIZER.url("skillset_name", skillset_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if if_match is not None: - _header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') - if if_none_match is not None: - _header_parameters['If-None-Match'] = _SERIALIZER.header("if_none_match", if_none_match, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - skillset_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/skillsets(\'{skillsetName}\')") - path_format_arguments = { - "skillsetName": _SERIALIZER.url("skillset_name", skillset_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - select = kwargs.pop('select', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/skillsets") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if select is not None: - _query_parameters['$select'] = _SERIALIZER.query("select", select, 'str') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/skillsets") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_reset_skills_request( - skillset_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/skillsets(\'{skillsetName}\')/search.resetskills") - path_format_arguments = { - "skillsetName": _SERIALIZER.url("skillset_name", skillset_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on class SkillsetsOperations(object): """SkillsetsOperations operations. @@ -287,15 +43,12 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - @distributed_trace def create_or_update( self, skillset_name, # type: str skillset, # type: "_models.SearchIndexerSkillset" if_match=None, # type: Optional[str] if_none_match=None, # type: Optional[str] - skip_indexer_reset_requirement_for_cache=None, # type: Optional[bool] - disable_cache_reprocessing_change_detection=None, # type: Optional[bool] request_options=None, # type: Optional["_models.RequestOptions"] **kwargs # type: Any ): @@ -313,17 +66,8 @@ def create_or_update( :param if_none_match: Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. :type if_none_match: str - :param skip_indexer_reset_requirement_for_cache: Ignores cache reset requirements. - :type skip_indexer_reset_requirement_for_cache: bool - :param disable_cache_reprocessing_change_detection: Disables cache reprocessing change - detection. - :type disable_cache_reprocessing_change_detection: bool :param request_options: Parameter group. :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword prefer: For HTTP PUT requests, instructs the service to return the created/updated - resource on success. The default value is "return=representation". Note that overriding this - default value may result in unsupported behavior. - :paramtype prefer: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SearchIndexerSkillset, or the result of cls(response) :rtype: ~azure.search.documents.indexes.models.SearchIndexerSkillset @@ -334,45 +78,49 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(skillset, 'SearchIndexerSkillset') - - request = build_create_or_update_request( - skillset_name=skillset_name, - prefer=prefer, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - skip_indexer_reset_requirement_for_cache=skip_indexer_reset_requirement_for_cache, - disable_cache_reprocessing_change_detection=disable_cache_reprocessing_change_detection, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) + prefer = "return=representation" + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'skillsetName': self._serialize.url("skillset_name", skillset_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Prefer'] = self._serialize.header("prefer", prefer, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(skillset, 'SearchIndexerSkillset') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -385,12 +133,9 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/skillsets(\'{skillsetName}\')'} # type: ignore - create_or_update.metadata = {'url': "/skillsets(\'{skillsetName}\')"} # type: ignore - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements + def delete( self, skillset_name, # type: str if_match=None, # type: Optional[str] @@ -421,46 +166,49 @@ def delete( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_delete_request( - skillset_name=skillset_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'skillsetName': self._serialize.url("skillset_name", skillset_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/skillsets(\'{skillsetName}\')"} # type: ignore + delete.metadata = {'url': '/skillsets(\'{skillsetName}\')'} # type: ignore - - @distributed_trace def get( self, skillset_name, # type: str @@ -484,35 +232,38 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_request( - skillset_name=skillset_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'skillsetName': self._serialize.url("skillset_name", skillset_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexerSkillset', pipeline_response) @@ -521,11 +272,8 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/skillsets(\'{skillsetName}\')'} # type: ignore - get.metadata = {'url': "/skillsets(\'{skillsetName}\')"} # type: ignore - - - @distributed_trace def list( self, select=None, # type: Optional[str] @@ -551,35 +299,39 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_list_request( - api_version=api_version, - select=select, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ListSkillsetsResult', pipeline_response) @@ -588,11 +340,8 @@ def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/skillsets'} # type: ignore - list.metadata = {'url': "/skillsets"} # type: ignore - - - @distributed_trace def create( self, skillset, # type: "_models.SearchIndexerSkillset" @@ -616,38 +365,42 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(skillset, 'SearchIndexerSkillset') - - request = build_create_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.create.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(skillset, 'SearchIndexerSkillset') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SearchIndexerSkillset', pipeline_response) @@ -656,75 +409,4 @@ def create( return cls(pipeline_response, deserialized, {}) return deserialized - - create.metadata = {'url': "/skillsets"} # type: ignore - - - @distributed_trace - def reset_skills( # pylint: disable=inconsistent-return-statements - self, - skillset_name, # type: str - skill_names=None, # type: Optional[List[str]] - request_options=None, # type: Optional["_models.RequestOptions"] - **kwargs # type: Any - ): - # type: (...) -> None - """Reset an existing skillset in a search service. - - :param skillset_name: The name of the skillset to reset. - :type skillset_name: str - :param skill_names: the names of skills to be reset. - :type skill_names: list[str] - :param request_options: Parameter group. - :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _x_ms_client_request_id = None - if request_options is not None: - _x_ms_client_request_id = request_options.x_ms_client_request_id - _skill_names = _models.SkillNames(skill_names=skill_names) - _json = self._serialize.body(_skill_names, 'SkillNames') - - request = build_reset_skills_request( - skillset_name=skillset_name, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.reset_skills.metadata['url'], - ) - request = _convert_request(request) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - reset_skills.metadata = {'url': "/skillsets(\'{skillsetName}\')/search.resetskills"} # type: ignore - + create.metadata = {'url': '/skillsets'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_synonym_maps_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_synonym_maps_operations.py index 2298b816bba3..57d2f9a77d1f 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_synonym_maps_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_synonym_maps_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,219 +6,21 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace +from azure.core.pipeline.transport import HttpRequest, HttpResponse from .. import models as _models -from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False -# fmt: off - -def build_create_or_update_request( - synonym_map_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - if_match = kwargs.pop('if_match', None) # type: Optional[str] - if_none_match = kwargs.pop('if_none_match', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/synonymmaps(\'{synonymMapName}\')") - path_format_arguments = { - "synonymMapName": _SERIALIZER.url("synonym_map_name", synonym_map_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if if_match is not None: - _header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') - if if_none_match is not None: - _header_parameters['If-None-Match'] = _SERIALIZER.header("if_none_match", if_none_match, 'str') - _header_parameters['Prefer'] = _SERIALIZER.header("prefer", prefer, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_delete_request( - synonym_map_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - if_match = kwargs.pop('if_match', None) # type: Optional[str] - if_none_match = kwargs.pop('if_none_match', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/synonymmaps(\'{synonymMapName}\')") - path_format_arguments = { - "synonymMapName": _SERIALIZER.url("synonym_map_name", synonym_map_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if if_match is not None: - _header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') - if if_none_match is not None: - _header_parameters['If-None-Match'] = _SERIALIZER.header("if_none_match", if_none_match, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_get_request( - synonym_map_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/synonymmaps(\'{synonymMapName}\')") - path_format_arguments = { - "synonymMapName": _SERIALIZER.url("synonym_map_name", synonym_map_name, 'str'), - } - - _url = _format_url_section(_url, **path_format_arguments) - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - select = kwargs.pop('select', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/synonymmaps") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if select is not None: - _query_parameters['$select'] = _SERIALIZER.query("select", select, 'str') - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - - -def build_create_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', None) # type: Optional[str] - x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - _url = kwargs.pop("template_url", "/synonymmaps") - - # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if x_ms_client_request_id is not None: - _header_parameters['x-ms-client-request-id'] = _SERIALIZER.header("x_ms_client_request_id", x_ms_client_request_id, 'str') - if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, - **kwargs - ) - -# fmt: on class SynonymMapsOperations(object): """SynonymMapsOperations operations. @@ -242,7 +43,6 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - @distributed_trace def create_or_update( self, synonym_map_name, # type: str @@ -267,10 +67,6 @@ def create_or_update( :type if_none_match: str :param request_options: Parameter group. :type request_options: ~azure.search.documents.indexes.models.RequestOptions - :keyword prefer: For HTTP PUT requests, instructs the service to return the created/updated - resource on success. The default value is "return=representation". Note that overriding this - default value may result in unsupported behavior. - :paramtype prefer: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SynonymMap, or the result of cls(response) :rtype: ~azure.search.documents.indexes.models.SynonymMap @@ -281,43 +77,49 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - prefer = kwargs.pop('prefer', "return=representation") # type: str - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(synonym_map, 'SynonymMap') - - request = build_create_or_update_request( - synonym_map_name=synonym_map_name, - prefer=prefer, - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.create_or_update.metadata['url'], - ) - request = _convert_request(request) + prefer = "return=representation" + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'synonymMapName': self._serialize.url("synonym_map_name", synonym_map_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Prefer'] = self._serialize.header("prefer", prefer, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(synonym_map, 'SynonymMap') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if response.status_code == 200: @@ -330,12 +132,9 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/synonymmaps(\'{synonymMapName}\')'} # type: ignore - create_or_update.metadata = {'url': "/synonymmaps(\'{synonymMapName}\')"} # type: ignore - - - @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements + def delete( self, synonym_map_name, # type: str if_match=None, # type: Optional[str] @@ -366,46 +165,49 @@ def delete( # pylint: disable=inconsistent-return-statements 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_delete_request( - synonym_map_name=synonym_map_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - if_match=if_match, - if_none_match=if_none_match, - template_url=self.delete.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'synonymMapName': self._serialize.url("synonym_map_name", synonym_map_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + if if_none_match is not None: + header_parameters['If-None-Match'] = self._serialize.header("if_none_match", if_none_match, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/synonymmaps(\'{synonymMapName}\')"} # type: ignore - + delete.metadata = {'url': '/synonymmaps(\'{synonymMapName}\')'} # type: ignore - @distributed_trace def get( self, synonym_map_name, # type: str @@ -429,35 +231,38 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_get_request( - synonym_map_name=synonym_map_name, - api_version=api_version, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'synonymMapName': self._serialize.url("synonym_map_name", synonym_map_name, 'str'), } - request.url = self._client.format_url(request.url, **path_format_arguments) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SynonymMap', pipeline_response) @@ -466,11 +271,8 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/synonymmaps(\'{synonymMapName}\')'} # type: ignore - get.metadata = {'url': "/synonymmaps(\'{synonymMapName}\')"} # type: ignore - - - @distributed_trace def list( self, select=None, # type: Optional[str] @@ -496,35 +298,39 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id + api_version = "2020-06-30" + accept = "application/json" - request = build_list_request( - api_version=api_version, - select=select, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.list.metadata['url'], - ) - request = _convert_request(request) + # Construct URL + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if select is not None: + query_parameters['$select'] = self._serialize.query("select", select, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ListSynonymMapsResult', pipeline_response) @@ -533,11 +339,8 @@ def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/synonymmaps'} # type: ignore - list.metadata = {'url': "/synonymmaps"} # type: ignore - - - @distributed_trace def create( self, synonym_map, # type: "_models.SynonymMap" @@ -561,38 +364,42 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - - api_version = kwargs.pop('api_version', "2021-04-30-Preview") # type: str - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - + _x_ms_client_request_id = None if request_options is not None: _x_ms_client_request_id = request_options.x_ms_client_request_id - _json = self._serialize.body(synonym_map, 'SynonymMap') - - request = build_create_request( - api_version=api_version, - content_type=content_type, - json=_json, - x_ms_client_request_id=_x_ms_client_request_id, - template_url=self.create.metadata['url'], - ) - request = _convert_request(request) + api_version = "2020-06-30" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore path_format_arguments = { - "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - request.url = self._client.format_url(request.url, **path_format_arguments) - - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if _x_ms_client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("x_ms_client_request_id", _x_ms_client_request_id, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(synonym_map, 'SynonymMap') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.SearchError, pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.SearchError, response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SynonymMap', pipeline_response) @@ -601,6 +408,4 @@ def create( return cls(pipeline_response, deserialized, {}) return deserialized - - create.metadata = {'url': "/synonymmaps"} # type: ignore - + create.metadata = {'url': '/synonymmaps'} # type: ignore diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/py.typed b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/py.typed deleted file mode 100644 index e5aff4f83af8..000000000000 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_index_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_index_client.py index 7078d029d072..0e59aadeb2ea 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_index_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_index_client.py @@ -20,7 +20,7 @@ from .._utils import get_authentication_policy from .._version import SDK_MONIKER from .._search_client import SearchClient -from .models import SearchIndex, SynonymMap, SearchAlias +from .models import SearchIndex, SynonymMap if TYPE_CHECKING: # pylint:disable=unused-import,ungrouped-imports @@ -386,8 +386,8 @@ def delete_synonym_map(self, synonym_map, **kwargs): the SynonymMap model must be provided instead of the name. It is enough to provide the name of the synonym map to delete unconditionally. - :param name: The synonym map name or object to delete - :type name: str or ~azure.search.documents.indexes.models.SynonymMap + :param synonym_map: The synonym map name or object to delete + :type synonym_map: str or ~azure.search.documents.indexes.models.SynonymMap :keyword match_condition: The match condition to use upon the etag :paramtype match_condition: ~azure.core.MatchConditions :return: None @@ -480,150 +480,3 @@ def get_service_statistics(self, **kwargs): kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) result = self._client.get_service_statistics(**kwargs) return result.as_dict() - - @distributed_trace - def list_aliases(self, **kwargs): - # type: (**Any) -> ItemPaged[SearchAlias] - """List the aliases in an Azure Search service. - - :keyword select: Selects which top-level properties of the skillsets to retrieve. Specified as a - list of JSON property names, or '*' for all properties. The default is all - properties. - :paramtype select: list[str] - :return: List of Aliases - :rtype: ~azure.core.paging.ItemPaged[~azure.search.documents.indexes.models.SearchAlias] - :raises: ~azure.core.exceptions.HttpResponseError - - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - if kwargs.get('select', None): - kwargs['select'] = ','.join(kwargs['select']) - # pylint:disable=protected-access - return self._client.aliases.list(**kwargs) - - @distributed_trace - def list_alias_names(self, **kwargs): - # type: (**Any) -> ItemPaged[str] - """List the alias names in an Azure Search service. - - :return: List of alias names - :rtype: ~azure.core.paging.ItemPaged[str] - :raises: ~azure.core.exceptions.HttpResponseError - - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - - return self._client.aliases.list( - cls=lambda objs: [x.name for x in objs], **kwargs - ) - - @distributed_trace - def get_alias(self, name, **kwargs): - # type: (str, **Any) -> SearchAlias - """ - - :param name: The name of the alias to retrieve. - :type name: str - :return: SearchAlias object - :rtype: ~azure.search.documents.indexes.models.SearchAlias - :raises: ~azure.core.exceptions.HttpResponseError - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - result = self._client.aliases.get(name, **kwargs) - return result - - @distributed_trace - def delete_alias(self, alias, **kwargs): - # type: (Union[str, SearchAlias], **Any) -> None - """Deletes a search alias and its associated mapping to an index. This operation is permanent, - with no recovery option. The mapped index is untouched by this operation - - :param alias: The alias name or object to delete. - :type alias: str or ~azure.search.documents.indexes.models.SearchAlias - :keyword match_condition: The match condition to use upon the etag - :paramtype match_condition: ~azure.core.MatchConditions - :raises: ~azure.core.exceptions.HttpResponseError - .. admonition:: Example: - - .. literalinclude:: ../samples/sample_index_alias_crud_operations.py - :start-after: [START delete_alias] - :end-before: [END delete_alias] - :language: python - :dedent: 4 - :caption: Deleting an alias. - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - error_map, access_condition = get_access_conditions( - alias, kwargs.pop("match_condition", MatchConditions.Unconditionally) - ) - kwargs.update(access_condition) - try: - alias_name = alias.name - except AttributeError: - alias_name = alias - self._client.aliases.delete( - alias_name=alias_name, error_map=error_map, **kwargs - ) - - @distributed_trace - def create_alias(self, alias, **kwargs): - # type: (SearchAlias, **Any) -> SearchAlias - """Creates a new search alias. - - :param alias: The alias object. - :type alias: ~azure.search.documents.indexes.models.SearchAlias - :return: The alias created - :rtype: ~azure.search.documents.indexes.models.SearchAlias - :raises: ~azure.core.exceptions.HttpResponseError - - .. admonition:: Example: - - .. literalinclude:: ../samples/sample_index_alias_crud_operations.py - :start-after: [START create_alias] - :end-before: [END create_alias] - :language: python - :dedent: 4 - :caption: Creating a new alias. - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - result = self._client.aliases.create(alias, **kwargs) - return result # pylint:disable=protected-access - - @distributed_trace - def create_or_update_alias(self, alias, **kwargs): - # type: (str, SearchAlias, **Any) -> SearchAlias - """Creates a new search alias or updates an alias if it already exists. - - :param alias: The definition of the alias to create or update. - :type alias: ~azure.search.documents.indexes.models.SearchAlias - :keyword match_condition: The match condition to use upon the etag - :paramtype match_condition: ~azure.core.MatchConditions - :return: The index created or updated - :rtype: ~azure.search.documents.indexes.models.SearchAlias - :raises: :class:`~azure.core.exceptions.ResourceNotFoundError`, \ - :class:`~azure.core.exceptions.ResourceModifiedError`, \ - :class:`~azure.core.exceptions.ResourceNotModifiedError`, \ - :class:`~azure.core.exceptions.ResourceNotFoundError`, \ - :class:`~azure.core.exceptions.ResourceExistsError` - .. admonition:: Example: - - .. literalinclude:: ../samples/sample_index_alias_crud_operations.py - :start-after: [START update_alias] - :end-before: [END update_alias] - :language: python - :dedent: 4 - :caption: Updating an alias. - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - error_map, access_condition = get_access_conditions( - alias, kwargs.pop("match_condition", MatchConditions.Unconditionally) - ) - kwargs.update(access_condition) - result = self._client.aliases.create_or_update( - alias_name=alias.name, - alias=alias, - error_map=error_map, - **kwargs - ) - return result # pylint:disable=protected-access - \ No newline at end of file diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_indexer_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_indexer_client.py index 44196185f631..1abc96c0ecb4 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_indexer_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_indexer_client.py @@ -10,15 +10,13 @@ from azure.core.tracing.decorator import distributed_trace from ._generated import SearchClient as _SearchServiceClient -from .models import SearchIndexerSkillset +from ._generated.models import SearchIndexerSkillset from ._utils import ( get_access_conditions, normalize_endpoint, ) from .models import ( - EntityRecognitionSkillVersion, SearchIndexerDataSourceConnection, - SentimentSkillVersion ) from .._api_versions import DEFAULT_VERSION from .._headers_mixin import HeadersMixin @@ -27,7 +25,7 @@ if TYPE_CHECKING: # pylint:disable=unused-import,ungrouped-imports - from ._generated.models import SearchIndexer, SearchIndexerStatus, DocumentKeysOrIds + from ._generated.models import SearchIndexer, SearchIndexerStatus from typing import Any, Optional, Sequence, Union from azure.core.credentials import TokenCredential @@ -117,11 +115,6 @@ def create_or_update_indexer(self, indexer, **kwargs): :param indexer: The definition of the indexer to create or update. :type indexer: ~azure.search.documents.indexes.models.SearchIndexer - :keyword skip_indexer_reset_requirement_for_cache: Ignores cache reset requirements. - :paramtype skip_indexer_reset_requirement_for_cache: bool - :keyword disable_cache_reprocessing_change_detection: Disables cache reprocessing change - detection. - :paramtype disable_cache_reprocessing_change_detection: bool :return: The created SearchIndexer :rtype: ~azure.search.documents.indexes.models.SearchIndexer """ @@ -288,30 +281,6 @@ def reset_indexer(self, name, **kwargs): kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) self._client.indexers.reset(name, **kwargs) - @distributed_trace - def reset_documents(self, indexer, keys_or_ids, **kwargs): - # type: (Union[str, SearchIndexer], DocumentKeysOrIds, **Any) -> None - """Resets specific documents in the datasource to be selectively re-ingested by the indexer. - - :param indexer: The indexer to reset documents for. - :type indexer: str or ~azure.search.documents.indexes.models.SearchIndexer - :param keys_or_ids: - :type keys_or_ids: ~azure.search.documents.indexes.models.DocumentKeysOrIds - :return: None, or the result of cls(response) - :keyword overwrite: If false, keys or ids will be appended to existing ones. If true, only the - keys or ids in this payload will be queued to be re-ingested. The default is false. - :paramtype overwrite: bool - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - kwargs["keys_or_ids"] = keys_or_ids - try: - name = indexer.name - except AttributeError: - name = indexer - return self._client.indexers.reset_docs(name, **kwargs) - @distributed_trace def get_indexer_status(self, name, **kwargs): # type: (str, **Any) -> SearchIndexerStatus @@ -368,8 +337,6 @@ def create_or_update_data_source_connection(self, data_source_connection, **kwar :type data_source_connection: ~azure.search.documents.indexes.models.SearchIndexerDataSourceConnection :keyword match_condition: The match condition to use upon the etag :paramtype match_condition: ~azure.core.MatchConditions - :keyword skip_indexer_reset_requirement_for_cache: Ignores cache reset requirements. - :paramtype skip_indexer_reset_requirement_for_cache: bool :return: The created SearchIndexerDataSourceConnection :rtype: ~azure.search.documents.indexes.models.SearchIndexerDataSourceConnection """ @@ -526,7 +493,7 @@ def get_skillsets(self, **kwargs): if kwargs.get('select', None): kwargs['select'] = ','.join(kwargs['select']) result = self._client.skillsets.list(**kwargs) - return [SearchIndexerSkillset._from_generated(skillset) for skillset in result.skillsets] # pylint:disable=protected-access + return result.skillsets @distributed_trace def get_skillset_names(self, **kwargs): @@ -564,8 +531,7 @@ def get_skillset(self, name, **kwargs): """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - result = self._client.skillsets.get(name, **kwargs) - return SearchIndexerSkillset._from_generated(result) # pylint:disable=protected-access + return self._client.skillsets.get(name, **kwargs) @distributed_trace def delete_skillset(self, skillset, **kwargs): @@ -621,11 +587,8 @@ def create_skillset(self, skillset, **kwargs): """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - _validate_skillset(skillset) - skillset = skillset._to_generated() if hasattr(skillset, '_to_generated') else skillset # pylint:disable=protected-access - result = self._client.skillsets.create(skillset, **kwargs) - return SearchIndexerSkillset._from_generated(result) # pylint:disable=protected-access + return self._client.skillsets.create(skillset, **kwargs) @distributed_trace def create_or_update_skillset(self, skillset, **kwargs): @@ -637,11 +600,6 @@ def create_or_update_skillset(self, skillset, **kwargs): :type skillset: ~azure.search.documents.indexes.models.SearchIndexerSkillset :keyword match_condition: The match condition to use upon the etag :paramtype match_condition: ~azure.core.MatchConditions - :keyword skip_indexer_reset_requirement_for_cache: Ignores cache reset requirements. - :paramtype skip_indexer_reset_requirement_for_cache: bool - :keyword disable_cache_reprocessing_change_detection: Disables cache reprocessing change - detection. - :paramtype disable_cache_reprocessing_change_detection: bool :return: The created or updated SearchIndexerSkillset :rtype: ~azure.search.documents.indexes.models.SearchIndexerSkillset @@ -651,74 +609,7 @@ def create_or_update_skillset(self, skillset, **kwargs): skillset, kwargs.pop("match_condition", MatchConditions.Unconditionally) ) kwargs.update(access_condition) - _validate_skillset(skillset) - skillset = skillset._to_generated() if hasattr(skillset, '_to_generated') else skillset # pylint:disable=protected-access - result = self._client.skillsets.create_or_update( - skillset_name=skillset.name, - skillset=skillset, - error_map=error_map, - **kwargs + return self._client.skillsets.create_or_update( + skillset_name=skillset.name, skillset=skillset, error_map=error_map, **kwargs ) - return SearchIndexerSkillset._from_generated(result) # pylint:disable=protected-access - - @distributed_trace - def reset_skills(self, skillset, skill_names, **kwargs): - # type: (Union[str, SearchIndexerSkillset], List[str], **Any) -> None - """Reset an existing skillset in a search service. - - :param skillset: The SearchIndexerSkillset to reset - :type skillset: str or ~azure.search.documents.indexes.models.SearchIndexerSkillset - :param skill_names: the names of skills to be reset. - :type skill_names: list[str] - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - try: - name = skillset.name - except AttributeError: - name = skillset - return self._client.skillsets.reset_skills(name, skill_names, **kwargs) - -def _validate_skillset(skillset): - """Validates any multi-version skills in the skillset to verify that unsupported - parameters are not supplied by the user. - """ - skills = getattr(skillset, 'skills', None) - if not skills: - return - - error_strings = [] - for skill in skills: - try: - skill_version = skill.get('skill_version') - except AttributeError: - skill_version = getattr(skill, 'skill_version', None) - if not skill_version: - continue - - if skill_version == SentimentSkillVersion.V1: - unsupported = ['model_version', 'include_opinion_mining'] - elif skill_version == SentimentSkillVersion.V3: - unsupported = [] - elif skill_version == EntityRecognitionSkillVersion.V1: - unsupported = ['model_version'] - elif skill_version == EntityRecognitionSkillVersion.V3: - unsupported = ['include_typeless_entities'] - - errors = [] - for item in unsupported: - try: - if skill.get(item, None): - errors.append(item) - except AttributeError: - if skill.__dict__.get(item, None): - errors.append(item) - if errors: - error_strings.append("Unsupported parameters for skill version {}: {}".format( - skill_version, ", ".join(errors)) - ) - if error_strings: - raise ValueError("\n".join(error_strings)) diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_index_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_index_client.py index 3b3de7cd5def..e901f88039f6 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_index_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_index_client.py @@ -22,8 +22,7 @@ from ..._version import SDK_MONIKER from ..models import ( SearchIndex, - SynonymMap, - SearchAlias + SynonymMap ) if TYPE_CHECKING: @@ -393,8 +392,8 @@ async def delete_synonym_map(self, synonym_map, **kwargs): the SynonymMap model must be provided instead of the name. It is enough to provide the name of the synonym map to delete unconditionally. - :param name: The synonym map name or object to delete - :type name: str or ~azure.search.documents.indexes.models.SynonymMap + :param synonym_map: The synonym map name or object to delete + :type synonym_map: str or ~azure.search.documents.indexes.models.SynonymMap :keyword match_condition: The match condition to use upon the etag :paramtype match_condition: ~azure.core.MatchConditions :return: None @@ -488,150 +487,3 @@ async def get_service_statistics(self, **kwargs): kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) result = await self._client.get_service_statistics(**kwargs) return result.as_dict() - - @distributed_trace - def list_aliases(self, **kwargs): - # type: (**Any) -> AsyncItemPaged[SearchAlias] - """List the aliases in an Azure Search service. - - :keyword select: Selects which top-level properties of the skillsets to retrieve. Specified as a - list of JSON property names, or '*' for all properties. The default is all - properties. - :paramtype select: list[str] - :return: List of Aliases - :rtype: ~azure.core.paging.AsyncItemPaged[~azure.search.documents.indexes.models.SearchAlias] - :raises: ~azure.core.exceptions.HttpResponseError - - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - if kwargs.get('select', None): - kwargs['select'] = ','.join(kwargs['select']) - # pylint:disable=protected-access - return self._client.aliases.list(**kwargs) - - @distributed_trace - def list_alias_names(self, **kwargs): - # type: (**Any) -> AsyncItemPaged[str] - """List the alias names in an Azure Search service. - - :return: List of alias names - :rtype: ~azure.core.paging.AsyncItemPaged[str] - :raises: ~azure.core.exceptions.HttpResponseError - - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - - return self._client.aliases.list( - cls=lambda objs: [x.name for x in objs], **kwargs - ) - - @distributed_trace - async def get_alias(self, name, **kwargs): - # type: (str, **Any) -> SearchAlias - """ - - :param name: The name of the alias to retrieve. - :type name: str - :return: SearchAlias object - :rtype: ~azure.search.documents.indexes.models.SearchAlias - :raises: ~azure.core.exceptions.HttpResponseError - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - result = await self._client.aliases.get(name, **kwargs) - return result - - @distributed_trace - async def delete_alias(self, alias, **kwargs): - # type: (Union[str, SearchAlias], **Any) -> None - """Deletes a search alias and its associated mapping to an index. - This operation is permanent, with no recovery option. The mapped index is untouched by this operation - :param alias: The alias name or object to delete. - :type alias: str or ~azure.search.documents.indexes.models.SearchAlias - :keyword match_condition: The match condition to use upon the etag - :paramtype match_condition: ~azure.core.MatchConditions - :raises: ~azure.core.exceptions.HttpResponseError - - .. admonition:: Example: - - .. literalinclude:: ../samples/async_samples/sample_index_alias_crud_operations_async.py - :start-after: [START delete_alias_async] - :end-before: [END delete_alias_async] - :language: python - :dedent: 4 - :caption: Delete an alias. - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - error_map, access_condition = get_access_conditions( - alias, kwargs.pop("match_condition", MatchConditions.Unconditionally) - ) - kwargs.update(access_condition) - try: - alias_name = alias.name - except AttributeError: - alias_name = alias - await self._client.aliases.delete( - alias_name=alias_name, error_map=error_map, **kwargs - ) - - @distributed_trace - async def create_alias(self, alias, **kwargs): - # type: (SearchIndex, **Any) -> SearchAlias - """Creates a new search alias. - :param alias: The alias object. - :type alias: ~azure.search.documents.indexes.models.SearchAlias - :return: The alias created - :rtype: ~azure.search.documents.indexes.models.SearchAlias - :raises: ~azure.core.exceptions.HttpResponseError - - .. admonition:: Example: - - .. literalinclude:: ../samples/async_samples/sample_index_alias_crud_operations_async.py - :start-after: [START create_alias_async] - :end-before: [END create_alias_async] - :language: python - :dedent: 4 - :caption: Create an alias. - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - result = await self._client.aliases.create(alias, **kwargs) - return result # pylint:disable=protected-access - - @distributed_trace - async def create_or_update_alias(self, alias, **kwargs): - # type: (str, SearchAlias, **Any) -> SearchAlias - """Creates a new search alias or updates an alias if it already exists. - - :param alias: The definition of the alias to create or update. - :type alias: ~azure.search.documents.indexes.models.SearchAlias - :keyword match_condition: The match condition to use upon the etag - :paramtype match_condition: ~azure.core.MatchConditions - :return: The index created or updated - :rtype: ~azure.search.documents.indexes.models.SearchAlias - :raises: :class:`~azure.core.exceptions.ResourceNotFoundError`, \ - :class:`~azure.core.exceptions.ResourceModifiedError`, \ - :class:`~azure.core.exceptions.ResourceNotModifiedError`, \ - :class:`~azure.core.exceptions.ResourceNotFoundError`, \ - :class:`~azure.core.exceptions.ResourceExistsError` - - .. admonition:: Example: - - .. literalinclude:: ../samples/async_samples/sample_index_alias_crud_operations_async.py - :start-after: [START update_alias_async] - :end-before: [END update_alias_async] - :language: python - :dedent: 4 - :caption: Update an alias. - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - error_map, access_condition = get_access_conditions( - alias, kwargs.pop("match_condition", MatchConditions.Unconditionally) - ) - kwargs.update(access_condition) - result = await self._client.aliases.create_or_update( - alias_name=alias.name, - alias=alias, - error_map=error_map, - **kwargs - ) - return result # pylint:disable=protected-access - \ No newline at end of file diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_indexer_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_indexer_client.py index 9ed924cb83dd..938f662d7e21 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_indexer_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_indexer_client.py @@ -10,7 +10,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async from .._generated.aio import SearchClient as _SearchServiceClient -from ..models import SearchIndexerSkillset +from .._generated.models import SearchIndexerSkillset from .._utils import ( get_access_conditions, normalize_endpoint, @@ -25,7 +25,7 @@ if TYPE_CHECKING: # pylint:disable=unused-import,ungrouped-imports - from .._generated.models import SearchIndexer, SearchIndexerStatus, DocumentKeysOrIds + from .._generated.models import SearchIndexer, SearchIndexerStatus from typing import Any, Optional, Sequence from azure.core.credentials_async import AsyncTokenCredential @@ -118,11 +118,6 @@ async def create_or_update_indexer(self, indexer, **kwargs): :param indexer: The definition of the indexer to create or update. :type indexer: ~azure.search.documents.indexes.models.SearchIndexer - :keyword skip_indexer_reset_requirement_for_cache: Ignores cache reset requirements. - :paramtype skip_indexer_reset_requirement_for_cache: bool - :keyword disable_cache_reprocessing_change_detection: Disables cache reprocessing change - detection. - :paramtype disable_cache_reprocessing_change_detection: bool :return: The created SearchIndexer :rtype: ~azure.search.documents.indexes.models.SearchIndexer """ @@ -281,31 +276,6 @@ async def reset_indexer(self, name, **kwargs): kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) await self._client.indexers.reset(name, **kwargs) - @distributed_trace_async - async def reset_documents(self, indexer, keys_or_ids, **kwargs): - # type: (Union[str, SearchIndexer], DocumentKeysOrIds, **Any) -> None - """Resets specific documents in the datasource to be selectively re-ingested by the indexer. - - :param indexer: The indexer to reset documents for. - :type indexer: str or ~azure.search.documents.indexes.models.SearchIndexer - :param keys_or_ids: - :type keys_or_ids: ~azure.search.documents.indexes.models.DocumentKeysOrIds - :return: None, or the result of cls(response) - :keyword overwrite: If false, keys or ids will be appended to existing ones. If true, only the - keys or ids in this payload will be queued to be re-ingested. The default is false. - :paramtype overwrite: bool - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - kwargs["keys_or_ids"] = keys_or_ids - try: - name = indexer.name - except AttributeError: - name = indexer - result = await self._client.indexers.reset_docs(name, **kwargs) - return result - @distributed_trace_async async def get_indexer_status(self, name, **kwargs): # type: (str, **Any) -> SearchIndexerStatus @@ -363,8 +333,6 @@ async def create_or_update_data_source_connection( :type data_source_connection: ~azure.search.documents.indexes.models.SearchIndexerDataSourceConnection :keyword match_condition: The match condition to use upon the etag :paramtype match_condition: ~azure.core.MatchConditions - :keyword skip_indexer_reset_requirement_for_cache: Ignores cache reset requirements. - :paramtype skip_indexer_reset_requirement_for_cache: bool :return: The created SearchIndexerDataSourceConnection :rtype: ~azure.search.documents.indexes.models.SearchIndexerDataSourceConnection """ @@ -515,8 +483,7 @@ async def get_skillsets(self, **kwargs): if kwargs.get('select', None): kwargs['select'] = ','.join(kwargs['select']) result = await self._client.skillsets.list(**kwargs) - return [SearchIndexerSkillset._from_generated(skillset) for skillset in result.skillsets] # pylint:disable=protected-access - + return result @distributed_trace_async async def get_skillset_names(self, **kwargs): # type: (**Any) -> List[str] @@ -553,8 +520,7 @@ async def get_skillset(self, name, **kwargs): """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - result = await self._client.skillsets.get(name, **kwargs) - return SearchIndexerSkillset._from_generated(result) # pylint:disable=protected-access + return await self._client.skillsets.get(name, **kwargs) @distributed_trace_async async def delete_skillset(self, skillset, **kwargs): @@ -610,9 +576,8 @@ async def create_skillset(self, skillset, **kwargs): """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - skillset = skillset._to_generated() if hasattr(skillset, '_to_generated') else skillset # pylint:disable=protected-access - result = await self._client.skillsets.create(skillset, **kwargs) - return SearchIndexerSkillset._from_generated(result) # pylint:disable=protected-access + + return await self._client.skillsets.create(skillset, **kwargs) @distributed_trace_async async def create_or_update_skillset(self, skillset, **kwargs): @@ -624,11 +589,6 @@ async def create_or_update_skillset(self, skillset, **kwargs): :type skillset: :class:`~azure.search.documents.indexes.models.SearchIndexerSkillset` :keyword match_condition: The match condition to use upon the etag :paramtype match_condition: ~azure.core.MatchConditions - :keyword skip_indexer_reset_requirement_for_cache: Ignores cache reset requirements. - :paramtype skip_indexer_reset_requirement_for_cache: bool - :keyword disable_cache_reprocessing_change_detection: Disables cache reprocessing change - detection. - :paramtype disable_cache_reprocessing_change_detection: bool :return: The created or updated SearchIndexerSkillset :rtype: :class:`~azure.search.documents.indexes.models.SearchIndexerSkillset` @@ -638,33 +598,7 @@ async def create_or_update_skillset(self, skillset, **kwargs): skillset, kwargs.pop("match_condition", MatchConditions.Unconditionally) ) kwargs.update(access_condition) - skillset = skillset._to_generated() if hasattr(skillset, '_to_generated') else skillset # pylint:disable=protected-access - result = await self._client.skillsets.create_or_update( - skillset_name=skillset.name, - skillset=skillset, - error_map=error_map, - **kwargs + return await self._client.skillsets.create_or_update( + skillset_name=skillset.name, skillset=skillset, error_map=error_map, **kwargs ) - return SearchIndexerSkillset._from_generated(result) # pylint:disable=protected-access - - @distributed_trace_async - async def reset_skills(self, skillset, skill_names, **kwargs): - # type: (Union[str, SearchIndexerSkillset], List[str], **Any) -> None - """Reset an existing skillset in a search service. - - :param skillset: The SearchIndexerSkillset to reset - :type skillset: str or ~azure.search.documents.indexes.models.SearchIndexerSkillset - :param skill_names: the names of skills to be reset. - :type skill_names: list[str] - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - try: - name = skillset.name - except AttributeError: - name = skillset - result = await self._client.skillsets.reset_skills(name, skill_names, **kwargs) - return result diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/models/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/models/__init__.py index d5a0d5e4d057..494618c8af93 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/models/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/models/__init__.py @@ -34,8 +34,6 @@ from . import _edm from ..._generated.models import SuggestOptions from .._generated.models import ( - SearchAlias, - AzureMachineLearningSkill, AnalyzeResult, AnalyzedTokenInfo, AsciiFoldingTokenFilter, @@ -51,19 +49,16 @@ CorsOptions, CustomEntityLookupSkill, DefaultCognitiveServicesAccount, - CustomEntityLookupSkillLanguage, - CustomNormalizer, DictionaryDecompounderTokenFilter, DistanceScoringFunction, DistanceScoringParameters, DocumentExtractionSkill, - DocumentKeysOrIds, EdgeNGramTokenFilter, EdgeNGramTokenizer, EdgeNGramTokenFilterSide, ElisionTokenFilter, EntityCategory, - EntityLinkingSkill, + EntityRecognitionSkill, EntityRecognitionSkillLanguage, FieldMapping, FieldMappingFunction, @@ -86,8 +81,6 @@ LanguageDetectionSkill, LengthTokenFilter, LexicalAnalyzer, - LexicalNormalizer, - LexicalNormalizerName, LexicalTokenizer, LimitTokenFilter, LuceneStandardAnalyzer, @@ -109,18 +102,11 @@ PatternCaptureTokenFilter, PatternReplaceCharFilter, PatternReplaceTokenFilter, - PIIDetectionSkill, - PIIDetectionSkillMaskingMode, PhoneticEncoder, PhoneticTokenFilter, - PrioritizedFields, RegexFlags, SearchIndexer, - SearchIndexerCache, SearchIndexerDataContainer, - SearchIndexerDataIdentity, - SearchIndexerDataNoneIdentity, - SearchIndexerDataUserAssignedIdentity, SearchIndexerDataSourceType, SearchIndexerError, SearchIndexerKnowledgeStore, @@ -129,14 +115,13 @@ SearchIndexerKnowledgeStoreProjection, SearchIndexerKnowledgeStoreTableProjectionSelector, SearchIndexerLimits, + SearchIndexerSkillset, SearchIndexerStatus, - SemanticConfiguration, - SemanticField, - SemanticSettings, ScoringFunction, ScoringFunctionAggregation, ScoringFunctionInterpolation, ScoringProfile, + SentimentSkill, SentimentSkillLanguage, ShaperSkill, ShingleTokenFilter, @@ -174,26 +159,15 @@ from ._models import ( AnalyzeTextOptions, CustomAnalyzer, - EntityRecognitionSkill, - EntityRecognitionSkillVersion, PatternAnalyzer, PatternTokenizer, SearchIndexerDataSourceConnection, - SearchIndexerSkillset, SearchResourceEncryptionKey, - SentimentSkill, - SentimentSkillVersion, SynonymMap, ) SearchFieldDataType = _edm -class BM25SimilarityAlgorithm(BM25Similarity): - pass - -class ClassicSimilarityAlgorithm(ClassicSimilarity): - pass - class KeywordTokenizer(KeywordTokenizerV2): pass @@ -206,20 +180,15 @@ class SimilarityAlgorithm(Similarity): class SearchSuggester(Suggester): pass - - - __all__ = ( - "SearchAlias", - "AzureMachineLearningSkill", "AnalyzeTextOptions", "AnalyzeResult", "AnalyzedTokenInfo", "AsciiFoldingTokenFilter", - "BM25SimilarityAlgorithm", + "BM25Similarity", "CharFilter", "CjkBigramTokenFilter", - "ClassicSimilarityAlgorithm", + "ClassicSimilarity", "ClassicTokenizer", "CognitiveServicesAccount", "CognitiveServicesAccountKey", @@ -230,22 +199,17 @@ class SearchSuggester(Suggester): "CustomAnalyzer", "CustomEntityLookupSkill", "DefaultCognitiveServicesAccount", - "CustomEntityLookupSkillLanguage", - "CustomNormalizer", "DictionaryDecompounderTokenFilter", "DistanceScoringFunction", "DistanceScoringParameters", "DocumentExtractionSkill", - "DocumentKeysOrIds", "EdgeNGramTokenFilter", "EdgeNGramTokenizer", "ElisionTokenFilter", "EdgeNGramTokenFilterSide", "EntityCategory", - "EntityLinkingSkill", "EntityRecognitionSkill", "EntityRecognitionSkillLanguage", - "EntityRecognitionSkillVersion", "FieldMapping", "FieldMappingFunction", "FreshnessScoringFunction", @@ -267,8 +231,6 @@ class SearchSuggester(Suggester): "LanguageDetectionSkill", "LengthTokenFilter", "LexicalAnalyzer", - "LexicalNormalizer", - "LexicalNormalizerName", "LexicalTokenizer", "LimitTokenFilter", "LuceneStandardAnalyzer", @@ -292,11 +254,8 @@ class SearchSuggester(Suggester): "PatternReplaceCharFilter", "PatternReplaceTokenFilter", "PatternTokenizer", - "PIIDetectionSkill", - "PIIDetectionSkillMaskingMode", "PhoneticEncoder", "PhoneticTokenFilter", - "PrioritizedFields", "RegexFlags", "ScoringFunction", "ScoringFunctionAggregation", @@ -305,11 +264,7 @@ class SearchSuggester(Suggester): "SearchField", "SearchIndex", "SearchIndexer", - "SearchIndexerCache", "SearchIndexerDataContainer", - "SearchIndexerDataIdentity", - "SearchIndexerDataNoneIdentity", - "SearchIndexerDataUserAssignedIdentity", "SearchIndexerDataSourceConnection", "SearchIndexerDataSourceType", "SearchIndexerError", @@ -323,12 +278,8 @@ class SearchSuggester(Suggester): "SearchIndexerStatus", "SearchResourceEncryptionKey", "SearchableField", - "SemanticConfiguration", - "SemanticField", - "SemanticSettings", "SentimentSkill", "SentimentSkillLanguage", - "SentimentSkillVersion", "ShaperSkill", "ShingleTokenFilter", "SimpleField", diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/models/_index.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/models/_index.py index d803d85a69cb..9c0fce03b196 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/models/_index.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/models/_index.py @@ -152,11 +152,6 @@ class SearchField(msrest.serialization.Model): "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", "whitespace". :paramtype index_analyzer_name: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :keyword normalizer_name: The name of the normalizer to use for the field. This option can be used - only with fields with filterable, sortable, or facetable enabled. Once the normalizer is - chosen, it cannot be changed for the field. Must be null for complex fields. Possible values - include: "asciifolding", "elision", "lowercase", "standard", "uppercase". - :paramtype normalizer_name: str or ~azure.search.documents.indexes.models.LexicalNormalizerName :keyword synonym_map_names: A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are @@ -185,12 +180,14 @@ class SearchField(msrest.serialization.Model): "analyzer_name": {"key": "analyzerName", "type": "str"}, "search_analyzer_name": {"key": "searchAnalyzerName", "type": "str"}, "index_analyzer_name": {"key": "indexAnalyzerName", "type": "str"}, - "normalizer_name": {"key": "normalizerName", "type": "str"}, "synonym_map_names": {"key": "synonymMapNames", "type": "[str]"}, "fields": {"key": "fields", "type": "[SearchField]"}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SearchField, self).__init__(**kwargs) self.name = kwargs["name"] self.type = kwargs["type"] @@ -203,12 +200,12 @@ def __init__(self, **kwargs): self.analyzer_name = kwargs.get("analyzer_name", None) self.search_analyzer_name = kwargs.get("search_analyzer_name", None) self.index_analyzer_name = kwargs.get("index_analyzer_name", None) - self.normalizer_name = kwargs.get("normalizer_name", None) self.synonym_map_names = kwargs.get("synonym_map_names", None) self.fields = kwargs.get("fields", None) def _to_generated(self): - fields = [pack_search_field(x) for x in self.fields] if self.fields else None + fields = [pack_search_field(x) for x in self.fields] \ + if self.fields else None retrievable = not self.hidden if self.hidden is not None else None return _SearchField( name=self.name, @@ -222,9 +219,8 @@ def _to_generated(self): analyzer=self.analyzer_name, search_analyzer=self.search_analyzer_name, index_analyzer=self.index_analyzer_name, - normalizer=self.normalizer_name, synonym_maps=self.synonym_map_names, - fields=fields, + fields=fields ) @classmethod @@ -232,20 +228,9 @@ def _from_generated(cls, search_field): if not search_field: return None # pylint:disable=protected-access - fields = ( - [SearchField._from_generated(x) for x in search_field.fields] - if search_field.fields - else None - ) - hidden = ( - not search_field.retrievable - if search_field.retrievable is not None - else None - ) - try: - normalizer = search_field.normalizer_name - except AttributeError: - normalizer = None + fields = [SearchField._from_generated(x) for x in search_field.fields] \ + if search_field.fields else None + hidden = not search_field.retrievable if search_field.retrievable is not None else None return cls( name=search_field.name, type=search_field.type, @@ -258,12 +243,10 @@ def _from_generated(cls, search_field): analyzer_name=search_field.analyzer, search_analyzer_name=search_field.search_analyzer, index_analyzer_name=search_field.index_analyzer, - normalizer_name=normalizer, synonym_map_names=search_field.synonym_maps, - fields=fields, + fields=fields ) - def SimpleField(**kw): # type: (**Any) -> SearchField """Configure a simple field for an Azure Search Index @@ -507,9 +490,6 @@ class SearchIndex(msrest.serialization.Model): :paramtype token_filters: list[~azure.search.documents.indexes.models.TokenFilter] :keyword char_filters: The character filters for the index. :paramtype char_filters: list[~azure.search.documents.indexes.models.CharFilter] - :keyword normalizers: The normalizers for the index. - :paramtype normalizers: - list[~azure.search.documents.indexes.models.LexicalNormalizer] :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive @@ -524,66 +504,61 @@ class SearchIndex(msrest.serialization.Model): creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity algorithm is used. :paramtype similarity: ~azure.search.documents.indexes.models.SimilarityAlgorithm - :keyword semantic_settings: Defines parameters for a search index that influence semantic capabilities. - :paramtype semantic_settings: ~azure.search.documents.indexes.models.SemanticSettings :keyword e_tag: The ETag of the index. :paramtype e_tag: str """ _validation = { - "name": {"required": True}, - "fields": {"required": True}, + 'name': {'required': True}, + 'fields': {'required': True}, } _attribute_map = { - "name": {"key": "name", "type": "str"}, - "fields": {"key": "fields", "type": "[SearchField]"}, - "scoring_profiles": {"key": "scoringProfiles", "type": "[ScoringProfile]"}, - "default_scoring_profile": {"key": "defaultScoringProfile", "type": "str"}, - "cors_options": {"key": "corsOptions", "type": "CorsOptions"}, - "suggesters": {"key": "suggesters", "type": "[SearchSuggester]"}, - "analyzers": {"key": "analyzers", "type": "[LexicalAnalyzer]"}, - "tokenizers": {"key": "tokenizers", "type": "[LexicalTokenizer]"}, - "token_filters": {"key": "tokenFilters", "type": "[TokenFilter]"}, - "char_filters": {"key": "charFilters", "type": "[CharFilter]"}, - "normalizers": {"key": "normalizers", "type": "[LexicalNormalizer]"}, - "encryption_key": { - "key": "encryptionKey", - "type": "SearchResourceEncryptionKey", - }, - "similarity": {"key": "similarity", "type": "SimilarityAlgorithm"}, - "semantic_settings": {"key": "semantic", "type": "SemanticSettings"}, - "e_tag": {"key": "@odata\\.etag", "type": "str"}, + 'name': {'key': 'name', 'type': 'str'}, + 'fields': {'key': 'fields', 'type': '[SearchField]'}, + 'scoring_profiles': {'key': 'scoringProfiles', 'type': '[ScoringProfile]'}, + 'default_scoring_profile': {'key': 'defaultScoringProfile', 'type': 'str'}, + 'cors_options': {'key': 'corsOptions', 'type': 'CorsOptions'}, + 'suggesters': {'key': 'suggesters', 'type': '[SearchSuggester]'}, + 'analyzers': {'key': 'analyzers', 'type': '[LexicalAnalyzer]'}, + 'tokenizers': {'key': 'tokenizers', 'type': '[LexicalTokenizer]'}, + 'token_filters': {'key': 'tokenFilters', 'type': '[TokenFilter]'}, + 'char_filters': {'key': 'charFilters', 'type': '[CharFilter]'}, + 'encryption_key': {'key': 'encryptionKey', 'type': 'SearchResourceEncryptionKey'}, + 'similarity': {'key': 'similarity', 'type': 'SimilarityAlgorithm'}, + 'e_tag': {'key': '@odata\\.etag', 'type': 'str'}, } - def __init__(self, **kwargs): + def __init__( + self, + **kwargs + ): super(SearchIndex, self).__init__(**kwargs) - self.name = kwargs["name"] - self.fields = kwargs["fields"] - self.scoring_profiles = kwargs.get("scoring_profiles", None) - self.default_scoring_profile = kwargs.get("default_scoring_profile", None) - self.cors_options = kwargs.get("cors_options", None) - self.suggesters = kwargs.get("suggesters", None) - self.analyzers = kwargs.get("analyzers", None) - self.tokenizers = kwargs.get("tokenizers", None) - self.token_filters = kwargs.get("token_filters", None) - self.char_filters = kwargs.get("char_filters", None) - self.normalizers = kwargs.get("normalizers", None) - self.encryption_key = kwargs.get("encryption_key", None) - self.similarity = kwargs.get("similarity", None) - self.semantic_settings = kwargs.get("semantic_settings", None) - self.e_tag = kwargs.get("e_tag", None) + self.name = kwargs['name'] + self.fields = kwargs['fields'] + self.scoring_profiles = kwargs.get('scoring_profiles', None) + self.default_scoring_profile = kwargs.get('default_scoring_profile', None) + self.cors_options = kwargs.get('cors_options', None) + self.suggesters = kwargs.get('suggesters', None) + self.analyzers = kwargs.get('analyzers', None) + self.tokenizers = kwargs.get('tokenizers', None) + self.token_filters = kwargs.get('token_filters', None) + self.char_filters = kwargs.get('char_filters', None) + self.encryption_key = kwargs.get('encryption_key', None) + self.similarity = kwargs.get('similarity', None) + self.e_tag = kwargs.get('e_tag', None) def _to_generated(self): if self.analyzers: analyzers = [ - pack_analyzer(x) for x in self.analyzers # type: ignore + pack_analyzer(x) # type: ignore + for x in self.analyzers ] # mypy: ignore else: analyzers = None if self.tokenizers: tokenizers = [ - x._to_generated() # pylint:disable=protected-access + x._to_generated() # pylint:disable=protected-access if isinstance(x, PatternTokenizer) else x for x in self.tokenizers @@ -605,14 +580,10 @@ def _to_generated(self): tokenizers=tokenizers, token_filters=self.token_filters, char_filters=self.char_filters, - normalizers=self.normalizers, # pylint:disable=protected-access - encryption_key=self.encryption_key._to_generated() - if self.encryption_key - else None, + encryption_key=self.encryption_key._to_generated() if self.encryption_key else None, similarity=self.similarity, - semantic_settings=self.semantic_settings, - e_tag=self.e_tag, + e_tag=self.e_tag ) @classmethod @@ -621,7 +592,8 @@ def _from_generated(cls, search_index): return None if search_index.analyzers: analyzers = [ - unpack_analyzer(x) for x in search_index.analyzers # type: ignore + unpack_analyzer(x) # type: ignore + for x in search_index.analyzers ] else: analyzers = None @@ -635,15 +607,9 @@ def _from_generated(cls, search_index): else: tokenizers = None if search_index.fields: - fields = [ - SearchField._from_generated(x) for x in search_index.fields # pylint:disable=protected-access - ] + fields = [SearchField._from_generated(x) for x in search_index.fields] # pylint:disable=protected-access else: fields = None - try: - normalizers = search_index.normalizers - except AttributeError: - normalizers = None return cls( name=search_index.name, fields=fields, @@ -655,14 +621,10 @@ def _from_generated(cls, search_index): tokenizers=tokenizers, token_filters=search_index.token_filters, char_filters=search_index.char_filters, - normalizers=normalizers, # pylint:disable=protected-access - encryption_key=SearchResourceEncryptionKey._from_generated( - search_index.encryption_key - ), + encryption_key=SearchResourceEncryptionKey._from_generated(search_index.encryption_key), similarity=search_index.similarity, - semantic_settings=search_index.semantic_settings, - e_tag=search_index.e_tag, + e_tag=search_index.e_tag ) @@ -682,7 +644,6 @@ def pack_search_field(search_field): analyzer_name = search_field.get("analyzer_name") search_analyzer_name = search_field.get("search_analyzer_name") index_analyzer_name = search_field.get("index_analyzer_name") - normalizer = search_field.get("normalizer") synonym_map_names = search_field.get("synonym_map_names") fields = search_field.get("fields") fields = [pack_search_field(x) for x in fields] if fields else None @@ -698,8 +659,7 @@ def pack_search_field(search_field): analyzer=analyzer_name, search_analyzer=search_analyzer_name, index_analyzer=index_analyzer_name, - normalizer=normalizer, synonym_maps=synonym_map_names, - fields=fields, + fields=fields ) - return search_field._to_generated() # pylint:disable=protected-access + return search_field._to_generated() # pylint:disable=protected-access diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/models/_models.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/models/_models.py index 8e49dd819b1e..8e44e29716f8 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/models/_models.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/models/_models.py @@ -3,386 +3,32 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- - -from enum import Enum import msrest.serialization -from azure.core import CaseInsensitiveEnumMeta from .._generated.models import ( LexicalAnalyzer, LexicalTokenizer, AnalyzeRequest, CustomAnalyzer as _CustomAnalyzer, - EntityRecognitionSkill as _EntityRecognitionSkillV1, - EntityRecognitionSkillV3 as _EntityRecognitionSkillV3, PatternAnalyzer as _PatternAnalyzer, PatternTokenizer as _PatternTokenizer, SearchResourceEncryptionKey as _SearchResourceEncryptionKey, SearchIndexerDataSource as _SearchIndexerDataSource, - SearchIndexerSkill, - SearchIndexerSkillset as _SearchIndexerSkillset, - SentimentSkill as _SentimentSkillV1, - SentimentSkillV3 as _SentimentSkillV3, SynonymMap as _SynonymMap, DataSourceCredentials, AzureActiveDirectoryApplicationCredentials, ) - DELIMITER = "|" -class SearchIndexerSkillset(_SearchIndexerSkillset): - """A list of skills. - - All required parameters must be populated in order to send to Azure. - - :keyword name: Required. The name of the skillset. - :paramtype name: str - :keyword description: The description of the skillset. - :paramtype description: str - :keyword skills: Required. A list of skills in the skillset. - :paramtype skills: list[~azure.search.documents.indexes.models.SearchIndexerSkill] - :keyword cognitive_services_account: Details about cognitive services to be used when running - skills. - :paramtype cognitive_services_account: - ~azure.search.documents.indexes.models.CognitiveServicesAccount - :keyword knowledge_store: Definition of additional projections to azure blob, table, or files, of - enriched data. - :paramtype knowledge_store: ~azure.search.documents.indexes.models.SearchIndexerKnowledgeStore - :keyword e_tag: The ETag of the skillset. - :paramtype e_tag: str - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your skillset - definition when you want full assurance that no one, not even Microsoft, can decrypt your - skillset definition in Azure Cognitive Search. Once you have encrypted your skillset - definition, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set - this property to null. You can change this property as needed if you want to rotate your - encryption key; Your skillset definition will be unaffected. Encryption with customer-managed - keys is not available for free search services, and is only available for paid services created - on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - """ - - def __init__( - self, - **kwargs - ): - super(SearchIndexerSkillset, self).__init__(**kwargs) - - def _to_generated(self): - generated_skills = [] - for skill in self.skills: - if hasattr(skill, '_to_generated'): - generated_skills.append(skill._to_generated()) # pylint:disable=protected-access - else: - generated_skills.append(skill) - assert len(generated_skills) == len(self.skills) - return _SearchIndexerSkillset( - name=getattr(self, 'name', None), - description=getattr(self, 'description', None), - skills=generated_skills, - cognitive_services_account=getattr(self, 'cognitive_services_account', None), - knowledge_store=getattr(self, 'knowledge_store', None), - e_tag=getattr(self, 'e_tag', None), - encryption_key=getattr(self, 'encryption_key', None) - ) - - @classmethod - def _from_generated(cls, skillset): - custom_skills = [] - for skill in skillset.skills: - skill_cls = type(skill) - if skill_cls in [_EntityRecognitionSkillV1, _EntityRecognitionSkillV3]: - custom_skills.append(EntityRecognitionSkill._from_generated(skill)) # pylint:disable=protected-access - elif skill_cls in [_SentimentSkillV1, _SentimentSkillV3]: - custom_skills.append(SentimentSkill._from_generated(skill)) # pylint:disable=protected-access - else: - custom_skills.append(skill) - assert len(skillset.skills) == len(custom_skills) - kwargs = skillset.as_dict() - kwargs['skills'] = custom_skills - return cls(**kwargs) - - -class EntityRecognitionSkillVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the Entity Recognition skill version to use.""" - - #: Use Entity Recognition skill V1. - V1 = "#Microsoft.Skills.Text.EntityRecognitionSkill" - #: Use Entity Recognition skill V3. - V3 = "#Microsoft.Skills.Text.V3.EntityRecognitionSkill" - #: Use latest version of Entity Recognition skill. - LATEST = "#Microsoft.Skills.Text.V3.EntityRecognitionSkill" - - -class EntityRecognitionSkill(SearchIndexerSkill): - """Using the Text Analytics API, extracts entities of different types from text. - - All required parameters must be populated in order to send to Azure. - - :keyword odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :paramtype odata_type: str - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword categories: A list of entity categories that should be extracted. - :paramtype categories: list[str or ~azure.search.documents.indexes.models.EntityCategory] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "ar", "cs", "zh-Hans", "zh-Hant", "da", "nl", "en", "fi", "fr", "de", - "el", "hu", "it", "ja", "ko", "no", "pl", "pt-PT", "pt-BR", "ru", "es", "sv", "tr". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.EntityRecognitionSkillLanguage - :keyword include_typeless_entities: Determines whether or not to include entities which are well - known but don't conform to a pre-defined type. If this configuration is not set (default), set - to null or set to false, entities which don't conform to one of the pre-defined types will not - be surfaced. Only valid for skill version 1. - :paramtype include_typeless_entities: bool - :keyword minimum_precision: A value between 0 and 1 that be used to only include entities whose - confidence score is greater than the value specified. If not set (default), or if explicitly - set to null, all entities will be included. - :paramtype minimum_precision: float - :keyword model_version: The version of the model to use when calling the Text Analytics service. - It will default to the latest available when not specified. We recommend you do not specify - this value unless absolutely necessary. Only valid from skill version 3. - :paramtype model_version: str - :keyword skill_version: The version of the skill to use when calling the Text Analytics service. - It will default to V1 when not specified. - :paramtype skill_version: ~azure.search.documents.indexes.models.EntityRecognitionSkillVersion - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - 'minimum_precision': {'maximum': 1, 'minimum': 0}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - 'categories': {'key': 'categories', 'type': '[str]'}, - 'default_language_code': {'key': 'defaultLanguageCode', 'type': 'str'}, - 'include_typeless_entities': {'key': 'includeTypelessEntities', 'type': 'bool'}, - 'minimum_precision': {'key': 'minimumPrecision', 'type': 'float'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - 'skill_version': {'key': 'skillVersion', 'type': 'str'} - } - - def __init__( - self, - **kwargs - ): - # pop skill_version from kwargs to avoid warning in msrest - skill_version = kwargs.pop('skill_version', EntityRecognitionSkillVersion.V1) - - super(EntityRecognitionSkill, self).__init__(**kwargs) - self.skill_version = skill_version - self.odata_type = self.skill_version # type: str - self.categories = kwargs.get('categories', None) - self.default_language_code = kwargs.get('default_language_code', None) - self.minimum_precision = kwargs.get('minimum_precision', None) - self.include_typeless_entities = kwargs.get('include_typeless_entities', None) - self.model_version = kwargs.get('model_version', None) - - - def _to_generated(self): - if self.skill_version == EntityRecognitionSkillVersion.V1: - return _EntityRecognitionSkillV1( - inputs=self.inputs, - outputs=self.outputs, - name=self.name, - odata_type=self.odata_type, - categories=self.categories, - default_language_code=self.default_language_code, - include_typeless_entities=self.include_typeless_entities, - minimum_precision=self.minimum_precision - ) - if self.skill_version in [EntityRecognitionSkillVersion.V3, EntityRecognitionSkillVersion.LATEST]: - return _EntityRecognitionSkillV3( - inputs=self.inputs, - outputs=self.outputs, - name=self.name, - odata_type=self.odata_type, - categories=self.categories, - default_language_code=self.default_language_code, - minimum_precision=self.minimum_precision, - model_version=self.model_version - ) - return None - - @classmethod - def _from_generated(cls, skill): - if not skill: - return None - kwargs = skill.as_dict() - if isinstance(skill, _EntityRecognitionSkillV1): - return EntityRecognitionSkill( - skill_version=EntityRecognitionSkillVersion.V1, - **kwargs - ) - if isinstance(skill, _EntityRecognitionSkillV3): - return EntityRecognitionSkill( - skill_version=EntityRecognitionSkillVersion.V3, - **kwargs - ) - return None - - -class SentimentSkillVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """ Specifies the Sentiment Skill version to use.""" - - #: Use Sentiment skill V1. - V1 = "#Microsoft.Skills.Text.SentimentSkill" - #: Use Sentiment skill V3. - V3 = "#Microsoft.Skills.Text.V3.SentimentSkill" - #: Use latest version of Sentiment skill. - LATEST = "#Microsoft.Skills.Text.V3.SentimentSkill" - - -class SentimentSkill(SearchIndexerSkill): - """V1: Text analytics positive-negative sentiment analysis, scored as a floating point value in a range of zero - to 1. - V3: Using the Text Analytics API, evaluates unstructured text and for each record, provides sentiment labels - (such as "negative", "neutral" and "positive") based on the highest confidence score found by the service at - a sentence and document-level. - - All required parameters must be populated in order to send to Azure. - - :keyword odata_type: Required. Identifies the concrete type of the skill.Constant filled by - server. - :paramtype odata_type: str - :keyword name: The name of the skill which uniquely identifies it within the skillset. A skill - with no name defined will be given a default name of its 1-based index in the skills array, - prefixed with the character '#'. - :paramtype name: str - :keyword description: The description of the skill which describes the inputs, outputs, and usage - of the skill. - :paramtype description: str - :keyword context: Represents the level at which operations take place, such as the document root - or document content (for example, /document or /document/content). The default is /document. - :paramtype context: str - :keyword inputs: Required. Inputs of the skills could be a column in the source data set, or the - output of an upstream skill. - :paramtype inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] - :keyword outputs: Required. The output of a skill is either a field in a search index, or a value - that can be consumed as an input by another skill. - :paramtype outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] - :keyword default_language_code: A value indicating which language code to use. Default is en. - Possible values include: "da", "nl", "en", "fi", "fr", "de", "el", "it", "no", "pl", "pt-PT", - "ru", "es", "sv", "tr". - :paramtype default_language_code: str or - ~azure.search.documents.indexes.models.SentimentSkillLanguage - :keyword include_opinion_mining: If set to true, the skill output will include information from - Text Analytics for opinion mining, namely targets (nouns or verbs) and their associated - assessment (adjective) in the text. Default is false. - :paramtype include_opinion_mining: bool - :keyword model_version: The version of the model to use when calling the Text Analytics service. - It will default to the latest available when not specified. We recommend you do not specify - this value unless absolutely necessary. - :paramtype model_version: str - :keyword skill_version: The version of the skill to use when calling the Text Analytics service. - It will default to V1 when not specified. - :paramtype skill_version: ~azure.search.documents.indexes.models.SentimentSkillVersion - """ - - _validation = { - 'odata_type': {'required': True}, - 'inputs': {'required': True}, - 'outputs': {'required': True}, - } - - _attribute_map = { - 'odata_type': {'key': '@odata\\.type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'context': {'key': 'context', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'}, - 'outputs': {'key': 'outputs', 'type': '[OutputFieldMappingEntry]'}, - 'default_language_code': {'key': 'defaultLanguageCode', 'type': 'str'}, - 'include_opinion_mining': {'key': 'includeOpinionMining', 'type': 'bool'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - 'skill_version': {'key': 'skillVersion', 'type': 'str'} - } - - def __init__( - self, - **kwargs - ): - # pop skill_version from kwargs to avoid warning in msrest - skill_version = kwargs.pop('skill_version', SentimentSkillVersion.V1) - - super(SentimentSkill, self).__init__(**kwargs) - self.skill_version = skill_version - self.odata_type = self.skill_version # type: str - self.default_language_code = kwargs.get('default_language_code', None) - self.include_opinion_mining = kwargs.get('include_opinion_mining', None) - self.model_version = kwargs.get('model_version', None) - - def _to_generated(self): - if self.skill_version == SentimentSkillVersion.V1: - return _SentimentSkillV1( - inputs=self.inputs, - outputs=self.outputs, - name=self.name, - odata_type=self.odata_type, - default_language_code=self.default_language_code - ) - if self.skill_version in [SentimentSkillVersion.V3, SentimentSkillVersion.LATEST]: - return _SentimentSkillV3( - inputs=self.inputs, - outputs=self.outputs, - name=self.name, - odata_type=self.odata_type, - default_language_code=self.default_language_code, - include_opinion_mining=self.include_opinion_mining, - model_version=self.model_version - ) - return None - - @classmethod - def _from_generated(cls, skill): - if not skill: - return None - kwargs = skill.as_dict() - if isinstance(skill, _SentimentSkillV1): - return SentimentSkill( - skill_version=SentimentSkillVersion.V1, - **kwargs - ) - if isinstance(skill, _SentimentSkillV3): - return SentimentSkill( - skill_version=SentimentSkillVersion.V3, - **kwargs - ) - return None - - class AnalyzeTextOptions(msrest.serialization.Model): """Specifies some text and analysis components used to break that text into tokens. All required parameters must be populated in order to send to Azure. - :keyword text: Required. The text to break into tokens. - :paramtype text: str - :keyword analyzer_name: The name of the analyzer to use to break the given text. If this parameter is + :param text: Required. The text to break into tokens. + :type text: str + :param analyzer_name: The name of the analyzer to use to break the given text. If this parameter is not specified, you must specify a tokenizer instead. The tokenizer and analyzer parameters are mutually exclusive. Possible values include: "ar.microsoft", "ar.lucene", "hy.lucene", "bn.microsoft", "eu.lucene", "bg.microsoft", "bg.lucene", "ca.microsoft", "ca.lucene", "zh- @@ -401,22 +47,19 @@ class AnalyzeTextOptions(msrest.serialization.Model): "th.microsoft", "th.lucene", "tr.microsoft", "tr.lucene", "uk.microsoft", "ur.microsoft", "vi.microsoft", "standard.lucene", "standardasciifolding.lucene", "keyword", "pattern", "simple", "stop", "whitespace". - :paramtype analyzer_name: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :keyword tokenizer_name: The name of the tokenizer to use to break the given text. If this parameter + :type analyzer_name: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName + :param tokenizer_name: The name of the tokenizer to use to break the given text. If this parameter is not specified, you must specify an analyzer instead. The tokenizer and analyzer parameters are mutually exclusive. Possible values include: "classic", "edgeNGram", "keyword_v2", "letter", "lowercase", "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", "nGram", "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", "whitespace". - :paramtype tokenizer_name: str or ~azure.search.documents.indexes.models.LexicalTokenizerName - :keyword normalizer_name: The name of the normalizer to use to normalize the given text. Possible - values include: "asciifolding", "elision", "lowercase", "standard", "uppercase". - :paramtype normalizer_name: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :keyword token_filters: An optional list of token filters to use when breaking the given text. + :type tokenizer_name: str or ~azure.search.documents.indexes.models.LexicalTokenizerName + :param token_filters: An optional list of token filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter. - :paramtype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :keyword char_filters: An optional list of character filters to use when breaking the given text. + :type token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] + :param char_filters: An optional list of character filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter. - :paramtype char_filters: list[str] + :type char_filters: list[str] """ _validation = { @@ -427,7 +70,6 @@ class AnalyzeTextOptions(msrest.serialization.Model): "text": {"key": "text", "type": "str"}, "analyzer_name": {"key": "analyzerName", "type": "str"}, "tokenizer_name": {"key": "tokenizerName", "type": "str"}, - "normalizer_name": {"key": "normalizerName", "type": "str"}, "token_filters": {"key": "tokenFilters", "type": "[str]"}, "char_filters": {"key": "charFilters", "type": "[str]"}, } @@ -437,7 +79,6 @@ def __init__(self, **kwargs): self.text = kwargs["text"] self.analyzer_name = kwargs.get("analyzer_name", None) self.tokenizer_name = kwargs.get("tokenizer_name", None) - self.normalizer_name = kwargs.get("normalizer_name", None) self.token_filters = kwargs.get("token_filters", None) self.char_filters = kwargs.get("char_filters", None) @@ -446,7 +87,6 @@ def _to_analyze_request(self): text=self.text, analyzer=self.analyzer_name, tokenizer=self.tokenizer_name, - normalizer=self.normalizer_name, token_filters=self.token_filters, char_filters=self.char_filters, ) @@ -460,27 +100,27 @@ class CustomAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :keyword odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :paramtype odata_type: str - :keyword name: Required. The name of the analyzer. It must only contain letters, digits, spaces, + :type odata_type: str + :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :paramtype name: str - :keyword tokenizer_name: Required. The name of the tokenizer to use to divide continuous text into a + :type name: str + :param tokenizer_name: Required. The name of the tokenizer to use to divide continuous text into a sequence of tokens, such as breaking a sentence into words. Possible values include: "classic", "edgeNGram", "keyword_v2", "letter", "lowercase", "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", "nGram", "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", "whitespace". - :paramtype tokenizer_name: str or ~azure.search.documents.indexes.models.LexicalTokenizerName - :keyword token_filters: A list of token filters used to filter out or modify the tokens generated + :type tokenizer_name: str or ~azure.search.documents.indexes.models.LexicalTokenizerName + :param token_filters: A list of token filters used to filter out or modify the tokens generated by a tokenizer. For example, you can specify a lowercase filter that converts all characters to lowercase. The filters are run in the order in which they are listed. - :paramtype token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] - :keyword char_filters: A list of character filters used to prepare input text before it is + :type token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] + :param char_filters: A list of character filters used to prepare input text before it is processed by the tokenizer. For instance, they can replace certain characters or symbols. The filters are run in the order in which they are listed. - :paramtype char_filters: list[str] + :type char_filters: list[str] """ _validation = { @@ -532,21 +172,21 @@ class PatternAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :keyword name: Required. The name of the analyzer. It must only contain letters, digits, spaces, + :param name: Required. The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :paramtype name: str - :keyword lower_case_terms: A value indicating whether terms should be lower-cased. Default is + :type name: str + :param lower_case_terms: A value indicating whether terms should be lower-cased. Default is true. - :paramtype lower_case_terms: bool - :keyword pattern: A regular expression to match token separators. Default is an + :type lower_case_terms: bool + :param pattern: A regular expression to match token separators. Default is an expression that matches one or more white space characters. - :paramtype pattern: str - :keyword flags: List of regular expression flags. Possible values of each flag include: 'CANON_EQ', + :type pattern: str + :param flags: List of regular expression flags. Possible values of each flag include: 'CANON_EQ', 'CASE_INSENSITIVE', 'COMMENTS', 'DOTALL', 'LITERAL', 'MULTILINE', 'UNICODE_CASE', 'UNIX_LINES'. - :paramtype flags: list[str] or list[~search_service_client.models.RegexFlags] - :keyword stopwords: A list of stopwords. - :paramtype stopwords: list[str] + :type flags: list[str] or list[~search_service_client.models.RegexFlags] + :param stopwords: A list of stopwords. + :type stopwords: list[str] """ _validation = {"odata_type": {"required": True}, "name": {"required": True}} @@ -604,20 +244,20 @@ class PatternTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :keyword name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, + :param name: Required. The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. - :paramtype name: str - :keyword pattern: A regular expression to match token separators. Default is an + :type name: str + :param pattern: A regular expression to match token separators. Default is an expression that matches one or more white space characters. - :paramtype pattern: str - :keyword flags: List of regular expression flags. Possible values of each flag include: 'CANON_EQ', + :type pattern: str + :param flags: List of regular expression flags. Possible values of each flag include: 'CANON_EQ', 'CASE_INSENSITIVE', 'COMMENTS', 'DOTALL', 'LITERAL', 'MULTILINE', 'UNICODE_CASE', 'UNIX_LINES'. - :paramtype flags: list[str] or list[~search_service_client.models.RegexFlags] - :keyword group: The zero-based ordinal of the matching group in the regular expression to + :type flags: list[str] or list[~search_service_client.models.RegexFlags] + :param group: The zero-based ordinal of the matching group in the regular expression to extract into tokens. Use -1 if you want to use the entire pattern to split the input into tokens, irrespective of matching groups. Default is -1. - :paramtype group: int + :type group: int """ _validation = {"odata_type": {"required": True}, "name": {"required": True}} @@ -671,22 +311,22 @@ class SearchResourceEncryptionKey(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :keyword key_name: Required. The name of your Azure Key Vault key to be used to encrypt your data + :param key_name: Required. The name of your Azure Key Vault key to be used to encrypt your data at rest. - :paramtype key_name: str - :keyword key_version: Required. The version of your Azure Key Vault key to be used to encrypt + :type key_name: str + :param key_version: Required. The version of your Azure Key Vault key to be used to encrypt your data at rest. - :paramtype key_version: str - :keyword vault_uri: Required. The URI of your Azure Key Vault, also referred to as DNS name, that + :type key_version: str + :param vault_uri: Required. The URI of your Azure Key Vault, also referred to as DNS name, that contains the key to be used to encrypt your data at rest. An example URI might be https://my- keyvault-name.vault.azure.net. - :paramtype vault_uri: str - :keyword application_id: Required. An AAD Application ID that was granted the required access + :type vault_uri: str + :param application_id: Required. An AAD Application ID that was granted the required access permissions to the Azure Key Vault that is to be used when encrypting your data at rest. The Application ID should not be confused with the Object ID for your AAD Application. - :paramtype application_id: str - :keyword application_secret: The authentication key of the specified AAD application. - :paramtype application_secret: str + :type application_id: str + :param application_secret: The authentication key of the specified AAD application. + :type application_secret: str """ _validation = { @@ -714,8 +354,7 @@ def __init__(self, **kwargs): def _to_generated(self): if self.application_id and self.application_secret: access_credentials = AzureActiveDirectoryApplicationCredentials( - application_id=self.application_id, - application_secret=self.application_secret, + application_id=self.application_id, application_secret=self.application_secret ) else: access_credentials = None @@ -731,12 +370,8 @@ def _from_generated(cls, search_resource_encryption_key): if not search_resource_encryption_key: return None if search_resource_encryption_key.access_credentials: - application_id = ( - search_resource_encryption_key.access_credentials.application_id - ) - application_secret = ( - search_resource_encryption_key.access_credentials.application_secret - ) + application_id = search_resource_encryption_key.access_credentials.application_id + application_secret = search_resource_encryption_key.access_credentials.application_secret else: application_id = None application_secret = None @@ -756,15 +391,15 @@ class SynonymMap(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :keyword name: Required. The name of the synonym map. - :paramtype name: str + :param name: Required. The name of the synonym map. + :type name: str :ivar format: Required. The format of the synonym map. Only the 'solr' format is currently supported. Default value: "solr". :vartype format: str - :keyword synonyms: Required. A series of synonym rules in the specified synonym map format. The + :param synonyms: Required. A series of synonym rules in the specified synonym map format. The rules must be separated by newlines. - :paramtype synonyms: list[str] - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. + :type synonyms: list[str] + :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive @@ -772,9 +407,9 @@ class SynonymMap(msrest.serialization.Model): needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :keyword e_tag: The ETag of the synonym map. - :paramtype e_tag: str + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :param e_tag: The ETag of the synonym map. + :type e_tag: str """ _validation = { @@ -787,10 +422,7 @@ class SynonymMap(msrest.serialization.Model): "name": {"key": "name", "type": "str"}, "format": {"key": "format", "type": "str"}, "synonyms": {"key": "synonyms", "type": "[str]"}, - "encryption_key": { - "key": "encryptionKey", - "type": "SearchResourceEncryptionKey", - }, + "encryption_key": {"key": "encryptionKey", "type": "SearchResourceEncryptionKey"}, "e_tag": {"key": "@odata\\.etag", "type": "str"}, } @@ -807,9 +439,7 @@ def _to_generated(self): return _SynonymMap( name=self.name, synonyms="\n".join(self.synonyms), - encryption_key=self.encryption_key._to_generated() # pylint:disable=protected-access - if self.encryption_key - else None, + encryption_key=self.encryption_key._to_generated() if self.encryption_key else None, # pylint:disable=protected-access e_tag=self.e_tag, ) @@ -821,9 +451,7 @@ def _from_generated(cls, synonym_map): name=synonym_map.name, synonyms=synonym_map.synonyms.split("\n"), # pylint:disable=protected-access - encryption_key=SearchResourceEncryptionKey._from_generated( - synonym_map.encryption_key - ), + encryption_key=SearchResourceEncryptionKey._from_generated(synonym_map.encryption_key), e_tag=synonym_map.e_tag, ) @@ -833,39 +461,24 @@ class SearchIndexerDataSourceConnection(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :keyword name: Required. The name of the datasource connection. - :paramtype name: str - :keyword description: The description of the datasource connection. - :paramtype description: str - :keyword type: Required. The type of the datasource connection. Possible values include: "azuresql", + :param name: Required. The name of the datasource connection. + :type name: str + :param description: The description of the datasource connection. + :type description: str + :param type: Required. The type of the datasource connection. Possible values include: "azuresql", "cosmosdb", "azureblob", "azuretable", "mysql", "adlsgen2". - :paramtype type: str or ~azure.search.documents.indexes.models.SearchIndexerDataSourceType - :keyword connection_string: The connection string for the datasource connection. - :paramtype connection_string: str - :keyword container: Required. The data container for the datasource connection. - :paramtype container: ~azure.search.documents.indexes.models.SearchIndexerDataContainer - :keyword data_change_detection_policy: The data change detection policy for the datasource connection. - :paramtype data_change_detection_policy: ~azure.search.documents.models.DataChangeDetectionPolicy - :keyword data_deletion_detection_policy: The data deletion detection policy for the datasource connection. - :paramtype data_deletion_detection_policy: + :type type: str or ~azure.search.documents.indexes.models.SearchIndexerDataSourceType + :param connection_string: The connection string for the datasource connection. + :type connection_string: str + :param container: Required. The data container for the datasource connection. + :type container: ~azure.search.documents.indexes.models.SearchIndexerDataContainer + :param data_change_detection_policy: The data change detection policy for the datasource connection. + :type data_change_detection_policy: ~azure.search.documents.models.DataChangeDetectionPolicy + :param data_deletion_detection_policy: The data deletion detection policy for the datasource connection. + :type data_deletion_detection_policy: ~azure.search.documents.models.DataDeletionDetectionPolicy - :keyword e_tag: The ETag of the data source. - :paramtype e_tag: str - :keyword identity: An explicit managed identity to use for this datasource. If not specified and - the connection string is a managed identity, the system-assigned managed identity is used. If - not specified, the value remains unchanged. If "none" is specified, the value of this property - is cleared. - :paramtype identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity - :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. - This key is used to provide an additional level of encryption-at-rest for your datasource - definition when you want full assurance that no one, not even Microsoft, can decrypt your data - source definition in Azure Cognitive Search. Once you have encrypted your data source - definition, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set - this property to null. You can change this property as needed if you want to rotate your - encryption key; Your datasource definition will be unaffected. Encryption with customer-managed - keys is not available for free search services, and is only available for paid services created - on or after January 1, 2019. - :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :param e_tag: The ETag of the data source. + :type e_tag: str """ _validation = { @@ -881,17 +494,9 @@ class SearchIndexerDataSourceConnection(msrest.serialization.Model): "type": {"key": "type", "type": "str"}, "connection_string": {"key": "connectionString", "type": "str"}, "container": {"key": "container", "type": "SearchIndexerDataContainer"}, - "data_change_detection_policy": { - "key": "dataChangeDetectionPolicy", - "type": "DataChangeDetectionPolicy", - }, - "data_deletion_detection_policy": { - "key": "dataDeletionDetectionPolicy", - "type": "DataDeletionDetectionPolicy", - }, - 'encryption_key': {'key': 'encryptionKey', 'type': 'SearchResourceEncryptionKey'}, + "data_change_detection_policy": {"key": "dataChangeDetectionPolicy", "type": "DataChangeDetectionPolicy"}, + "data_deletion_detection_policy": {"key": "dataDeletionDetectionPolicy", "type": "DataDeletionDetectionPolicy"}, "e_tag": {"key": "@odata\\.etag", "type": "str"}, - 'identity': {'key': 'identity', 'type': 'SearchIndexerDataIdentity'}, } def __init__(self, **kwargs): @@ -901,15 +506,9 @@ def __init__(self, **kwargs): self.type = kwargs["type"] self.connection_string = kwargs["connection_string"] self.container = kwargs["container"] - self.data_change_detection_policy = kwargs.get( - "data_change_detection_policy", None - ) - self.data_deletion_detection_policy = kwargs.get( - "data_deletion_detection_policy", None - ) + self.data_change_detection_policy = kwargs.get("data_change_detection_policy", None) + self.data_deletion_detection_policy = kwargs.get("data_deletion_detection_policy", None) self.e_tag = kwargs.get("e_tag", None) - self.encryption_key = kwargs.get("encryption_key", None) - self.identity = kwargs.get("identity", None) def _to_generated(self): if self.connection_string is None or self.connection_string == "": @@ -926,8 +525,6 @@ def _to_generated(self): data_change_detection_policy=self.data_change_detection_policy, data_deletion_detection_policy=self.data_deletion_detection_policy, e_tag=self.e_tag, - encryption_key=self.encryption_key, - identity=self.identity ) @classmethod @@ -935,9 +532,7 @@ def _from_generated(cls, search_indexer_data_source): if not search_indexer_data_source: return None connection_string = ( - search_indexer_data_source.credentials.connection_string - if search_indexer_data_source.credentials - else None + search_indexer_data_source.credentials.connection_string if search_indexer_data_source.credentials else None ) return cls( name=search_indexer_data_source.name, @@ -948,8 +543,6 @@ def _from_generated(cls, search_indexer_data_source): data_change_detection_policy=search_indexer_data_source.data_change_detection_policy, data_deletion_detection_policy=search_indexer_data_source.data_deletion_detection_policy, e_tag=search_indexer_data_source.e_tag, - encryption_key=search_indexer_data_source.encryption_key, - identity=search_indexer_data_source.identity ) def pack_analyzer(analyzer): @@ -964,11 +557,7 @@ def unpack_analyzer(analyzer): if not analyzer: return None if isinstance(analyzer, _PatternAnalyzer): - return PatternAnalyzer._from_generated( # pylint:disable=protected-access - analyzer - ) + return PatternAnalyzer._from_generated(analyzer) # pylint:disable=protected-access if isinstance(analyzer, _CustomAnalyzer): - return CustomAnalyzer._from_generated( # pylint:disable=protected-access - analyzer - ) + return CustomAnalyzer._from_generated(analyzer) # pylint:disable=protected-access return analyzer diff --git a/sdk/search/azure-search-documents/azure/search/documents/models/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/models/__init__.py index 23213d7bb771..5f4b9263a3b4 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/models/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/models/__init__.py @@ -25,34 +25,20 @@ # -------------------------------------------------------------------------- from .._generated.models import ( - AnswerResult, AutocompleteMode, - CaptionResult, IndexAction, IndexingResult, - QueryAnswerType, - QueryCaptionType, - QueryLanguage, - QuerySpellerType, QueryType, - ScoringStatistics, - SearchMode + SearchMode, ) from .._search_client import odata __all__ = ( - "AnswerResult", "AutocompleteMode", - "CaptionResult", "IndexAction", "IndexingResult", "odata", - "QueryAnswerType", - "QueryCaptionType", - "QueryLanguage", - "QuerySpellerType", "QueryType", - "ScoringStatistics", "SearchMode", ) diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_alias_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_alias_live_async.py deleted file mode 100644 index 6c85e5fcea01..000000000000 --- a/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_alias_live_async.py +++ /dev/null @@ -1,108 +0,0 @@ -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -from unicodedata import name -import pytest - -from azure.core import MatchConditions -from azure.core.exceptions import HttpResponseError -from azure.search.documents.indexes.aio import SearchIndexClient -from devtools_testutils.aio import recorded_by_proxy_async -from devtools_testutils import AzureRecordedTestCase -from azure.search.documents.indexes.models import ( - AnalyzeTextOptions, - CorsOptions, - SearchIndex, - ScoringProfile, - SimpleField, - SearchFieldDataType, - SearchAlias, -) - -from search_service_preparer import SearchEnvVarPreparer, search_decorator - - -class TestSearchClientAlias(AzureRecordedTestCase): - @SearchEnvVarPreparer() - @search_decorator(schema="hotel_schema.json", index_batch="hotel_small.json") - @recorded_by_proxy_async - async def test_alias(self, endpoint, api_key): - client = SearchIndexClient(endpoint, api_key) - aliases = ["resort", "motel"] - - async with client: - index_name = await client.list_index_names().__anext__() - await self._test_list_aliases_empty(client) - await self._test_create_alias(client, aliases[0], index_name) - - await self._test_create_or_update_alias(client, aliases[1], index_name) - - # point an old alias to a new index - new_index_name = "hotel" - await self._test_update_alias_to_new_index(client, aliases[1], new_index_name, index_name) - - await self._test_get_alias(client, aliases) - - await self._test_list_aliases(client, aliases) - await self._test_delete_aliases(client) - - async def _test_list_aliases_empty(self, client): - result = client.list_aliases() - with pytest.raises(StopAsyncIteration): - await result.__anext__() - - async def _test_create_alias(self, client, alias_name, index_name): - alias = SearchAlias(name=alias_name, indexes=[index_name]) - result = await client.create_alias(alias) - assert result.name == alias_name - assert set(result.indexes) == {index_name} - - async def _test_create_or_update_alias(self, client, alias_name, index_name): - alias = SearchAlias(name=alias_name, indexes=[index_name]) - result = await client.create_or_update_alias(alias) - assert result.name == alias_name - assert set(result.indexes) == {index_name} - - async def _test_update_alias_to_new_index(self, client, alias_name, new_index, old_index): - await self._create_index(client, new_index) - alias = SearchAlias(name=alias_name, indexes=[new_index]) - result = await client.create_or_update_alias(alias) - - assert result.name == alias_name - assert result.indexes[0] != old_index - assert result.indexes[0] == new_index - - async def _test_get_alias(self, client, aliases): - for alias in aliases: - result = await client.get_alias(alias) - assert result - assert result.name == alias - - async def _test_list_aliases(self, client, aliases): - result = {alias async for alias in client.list_alias_names()} - assert result == set(aliases) - - async def _test_delete_aliases(self, client): - aliases = [alias async for alias in client.list_aliases()] - - for alias in aliases: - await client.delete_alias(alias) - with pytest.raises(HttpResponseError): - result = await client.get_alias(alias) - - async def _create_index(self, client, index_name): - fields = [ - SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True), - SimpleField(name="baseRate", type=SearchFieldDataType.Double), - ] - scoring_profile = ScoringProfile(name="MyProfile") - scoring_profiles = [] - scoring_profiles.append(scoring_profile) - cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) - index = SearchIndex( - name=index_name, fields=fields, scoring_profiles=scoring_profiles, cors_options=cors_options - ) - result = await client.create_index(index) diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_skillset_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_skillset_live_async.py index 8af9cfb53e5b..80d143e347c0 100644 --- a/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_skillset_live_async.py +++ b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_skillset_live_async.py @@ -11,20 +11,18 @@ from devtools_testutils import AzureRecordedTestCase from search_service_preparer import SearchEnvVarPreparer, search_decorator from azure.search.documents.indexes.models import( - EntityLinkingSkill, EntityRecognitionSkill, - EntityRecognitionSkillVersion, InputFieldMappingEntry, OutputFieldMappingEntry, SearchIndexerSkillset, - SentimentSkill, - SentimentSkillVersion + SentimentSkill ) from azure.search.documents.indexes.aio import SearchIndexerClient class TestSearchClientSkillsets(AzureRecordedTestCase): + @pytest.mark.skip @SearchEnvVarPreparer() @search_decorator(schema="hotel_schema.json", index_batch="hotel_small.json") @recorded_by_proxy_async @@ -45,37 +43,23 @@ async def _test_create_skillset(self, client): s1 = EntityRecognitionSkill(name="skill1", inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizationsS1")], - description="Skill Version 1", - model_version="1", include_typeless_entities=True) s2 = EntityRecognitionSkill(name="skill2", inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizationsS2")], - skill_version=EntityRecognitionSkillVersion.LATEST, - description="Skill Version 3", - model_version="3", include_typeless_entities=True) s3 = SentimentSkill(name="skill3", inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="score", target_name="scoreS3")], - skill_version=SentimentSkillVersion.V1, - description="Sentiment V1", include_opinion_mining=True) s4 = SentimentSkill(name="skill4", inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="confidenceScores", target_name="scoreS4")], - skill_version=SentimentSkillVersion.V3, - description="Sentiment V3", include_opinion_mining=True) - s5 = EntityLinkingSkill(name="skill5", - inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="entities", target_name="entitiesS5")], - minimum_precision=0.5) - - skillset = SearchIndexerSkillset(name=name, skills=list([s1, s2, s3, s4, s5]), description="desc") + skillset = SearchIndexerSkillset(name=name, skills=list([s1, s2, s3, s4]), description="desc") result = await client.create_skillset(skillset) assert isinstance(result, SearchIndexerSkillset) @@ -84,14 +68,7 @@ async def _test_create_skillset(self, client): assert result.e_tag assert len(result.skills) == 5 assert isinstance(result.skills[0], EntityRecognitionSkill) - assert result.skills[0].skill_version == EntityRecognitionSkillVersion.V1 - assert isinstance(result.skills[1], EntityRecognitionSkill) - assert result.skills[1].skill_version == EntityRecognitionSkillVersion.V3 assert isinstance(result.skills[2], SentimentSkill) - assert result.skills[2].skill_version == SentimentSkillVersion.V1 - assert isinstance(result.skills[3], SentimentSkill) - assert result.skills[3].skill_version == SentimentSkillVersion.V3 - assert isinstance(result.skills[4], EntityLinkingSkill) assert result.skills[4].minimum_precision == 0.5 assert len(await client.get_skillsets()) == 1 diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_basic_live_async.pyTestSearchClientAsynctest_get_document.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_basic_live_async.pyTestSearchClientAsynctest_get_document.json index 7c529a51fc97..12f0321abcb6 100644 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_basic_live_async.pyTestSearchClientAsynctest_get_document.json +++ b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_basic_live_async.pyTestSearchClientAsynctest_get_document.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -60,7 +60,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00272\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00272\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -117,7 +117,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00273\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00273\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -174,7 +174,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00274\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00274\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -231,7 +231,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00275\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00275\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -288,7 +288,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00276\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00276\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -330,7 +330,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00277\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00277\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -372,7 +372,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00278\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00278\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -414,7 +414,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00279\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00279\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -504,7 +504,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u002710\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u002710\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_basic_live_async.pyTestSearchClientAsynctest_get_document_count.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_basic_live_async.pyTestSearchClientAsynctest_get_document_count.json index 53d84d53e3fd..38c8a0e6c314 100644 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_basic_live_async.pyTestSearchClientAsynctest_get_document_count.json +++ b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_basic_live_async.pyTestSearchClientAsynctest_get_document_count.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_basic_live_async.pyTestSearchClientAsynctest_get_document_missing.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_basic_live_async.pyTestSearchClientAsynctest_get_document_missing.json index 6b155bb53b61..3af4aa721ff3 100644 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_basic_live_async.pyTestSearchClientAsynctest_get_document_missing.json +++ b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_basic_live_async.pyTestSearchClientAsynctest_get_document_missing.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271000\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271000\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_buffered_sender_live_async.pyTestSearchIndexingBufferedSenderAsynctest_search_client_index_buffered_sender.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_buffered_sender_live_async.pyTestSearchIndexingBufferedSenderAsynctest_search_client_index_buffered_sender.json index 12966e2f1462..bf0a48e501c4 100644 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_buffered_sender_live_async.pyTestSearchIndexingBufferedSenderAsynctest_search_client_index_buffered_sender.json +++ b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_buffered_sender_live_async.pyTestSearchIndexingBufferedSenderAsynctest_search_client_index_buffered_sender.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -454,7 +454,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -516,7 +516,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -544,7 +544,7 @@ "ResponseBody": "\uFEFF12" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271000\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271000\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -586,7 +586,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271001\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271001\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -628,7 +628,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -690,7 +690,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -718,7 +718,7 @@ "ResponseBody": "\uFEFF13" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -774,7 +774,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -802,7 +802,7 @@ "ResponseBody": "\uFEFF11" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00273\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00273\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -825,7 +825,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00274\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00274\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -848,7 +848,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -904,7 +904,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -932,7 +932,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -955,7 +955,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00272\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00272\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -978,7 +978,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1036,7 +1036,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1064,7 +1064,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00275\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00275\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1121,7 +1121,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00276\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00276\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1163,7 +1163,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1221,7 +1221,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1249,7 +1249,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1272,7 +1272,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1331,7 +1331,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1389,7 +1389,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1417,7 +1417,7 @@ "ResponseBody": "\uFEFF11" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1459,7 +1459,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_index_document_live_async.pyTestSearchClientDocumentsAsynctest_search_client_index_document.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_index_document_live_async.pyTestSearchClientDocumentsAsynctest_search_client_index_document.json index 5b19ab2f3542..0bc19e894f6f 100644 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_index_document_live_async.pyTestSearchClientDocumentsAsynctest_search_client_index_document.json +++ b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_index_document_live_async.pyTestSearchClientDocumentsAsynctest_search_client_index_document.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -63,7 +63,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -91,7 +91,7 @@ "ResponseBody": "\uFEFF12" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271000\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271000\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -133,7 +133,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271001\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271001\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -175,7 +175,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -237,7 +237,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -293,7 +293,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -321,7 +321,7 @@ "ResponseBody": "\uFEFF11" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00273\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00273\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -344,7 +344,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00274\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00274\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -367,7 +367,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -423,7 +423,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -451,7 +451,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -474,7 +474,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00272\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00272\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -497,7 +497,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -555,7 +555,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -583,7 +583,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00275\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00275\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -640,7 +640,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00276\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00276\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -682,7 +682,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -740,7 +740,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -768,7 +768,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -791,7 +791,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -850,7 +850,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -908,7 +908,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -936,7 +936,7 @@ "ResponseBody": "\uFEFF11" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -978,7 +978,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_search_live_async.pyTestClientTestAsynctest_search_client.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_search_live_async.pyTestClientTestAsynctest_search_client.json index 954110588c98..cb7ca36ef8a6 100644 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_search_live_async.pyTestClientTestAsynctest_search_client.json +++ b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_search_live_async.pyTestClientTestAsynctest_search_client.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -320,7 +320,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -450,7 +450,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -613,7 +613,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -744,7 +744,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -806,7 +806,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -868,7 +868,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1187,7 +1187,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1508,7 +1508,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1827,7 +1827,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -2148,7 +2148,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -2214,7 +2214,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -2295,7 +2295,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.autocomplete?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.autocomplete?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -2335,7 +2335,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.suggest?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.suggest?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_search_live_async.pyTestClientTestAsynctest_search_client_large.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_search_live_async.pyTestClientTestAsynctest_search_client_large.json index e97dee3d91ed..bf6212f38dca 100644 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_search_live_async.pyTestClientTestAsynctest_search_client_large.json +++ b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_client_search_live_async.pyTestClientTestAsynctest_search_client_large.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1730,11 +1730,11 @@ "rooms": [] } ], - "@odata.nextLink": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview" + "@odata.nextLink": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30" } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_alias_live_async.pyTestSearchClientAliastest_alias.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_alias_live_async.pyTestSearchClientAliastest_alias.json deleted file mode 100644 index 4aa37d4004a1..000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_alias_live_async.pyTestSearchClientAliastest_alias.json +++ /dev/null @@ -1,992 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "de307b21-94bd-11ec-8f31-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "6700", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:32:57 GMT", - "elapsed-time": "36", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "de307b21-94bd-11ec-8f31-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#indexes", - "value": [ - { - "@odata.etag": "\u00220x8D9F6E1C2100411\u0022", - "name": "drgqefsg", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": "en.lucene", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": "fr.lucene", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": "en.lucene", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": "fr.lucene", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functionAggregation": "sum", - "text": null, - "functions": [ - { - "fieldName": "location", - "interpolation": "linear", - "type": "distance", - "boost": 2.0, - "freshness": null, - "magnitude": null, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100.0 - }, - "tag": null - } - ] - } - ], - "corsOptions": null, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "de7fb905-94bd-11ec-9087-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "95", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:32:57 GMT", - "elapsed-time": "3", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "de7fb905-94bd-11ec-9087-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases", - "value": [] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Content-Length": "43", - "Content-Type": "application/json", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "de8d50b8-94bd-11ec-9b7a-a04a5ed0778b" - }, - "RequestBody": { - "name": "resort", - "indexes": [ - "drgqefsg" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "131", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:32:57 GMT", - "elapsed-time": "45", - "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/aliases(\u0027resort\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "de8d50b8-94bd-11ec-9b7a-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases/$entity", - "name": "resort", - "indexes": [ - "drgqefsg" - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027motel\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Content-Length": "42", - "Content-Type": "application/json", - "Prefer": "return=representation", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "de9faddc-94bd-11ec-a55d-a04a5ed0778b" - }, - "RequestBody": { - "name": "motel", - "indexes": [ - "drgqefsg" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "130", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:32:58 GMT", - "elapsed-time": "42", - "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/aliases(\u0027motel\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "de9faddc-94bd-11ec-a55d-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases/$entity", - "name": "motel", - "indexes": [ - "drgqefsg" - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Content-Length": "456", - "Content-Type": "application/json", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "deb154fd-94bd-11ec-8659-a04a5ed0778b" - }, - "RequestBody": { - "name": "hotel", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "retrievable": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "baseRate", - "type": "Edm.Double", - "key": false, - "retrievable": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ], - "scoringProfiles": [ - { - "name": "MyProfile" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": 60 - } - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1039", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:32:58 GMT", - "elapsed-time": "568", - "ETag": "W/\u00220x8D9F6E1C546C200\u0022", - "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotel\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "deb154fd-94bd-11ec-8659-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9F6E1C546C200\u0022", - "name": "hotel", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [ - { - "name": "MyProfile", - "functionAggregation": null, - "text": null, - "functions": [] - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": 60 - }, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027motel\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Content-Length": "39", - "Content-Type": "application/json", - "Prefer": "return=representation", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "df13cf0e-94bd-11ec-baae-a04a5ed0778b" - }, - "RequestBody": { - "name": "motel", - "indexes": [ - "hotel" - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "127", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:32:58 GMT", - "elapsed-time": "71", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "df13cf0e-94bd-11ec-baae-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases/$entity", - "name": "motel", - "indexes": [ - "hotel" - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027resort\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "df2adeff-94bd-11ec-9440-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "131", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:32:58 GMT", - "elapsed-time": "4", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "df2adeff-94bd-11ec-9440-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases/$entity", - "name": "resort", - "indexes": [ - "drgqefsg" - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027motel\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "df370a4d-94bd-11ec-aad1-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "127", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:32:58 GMT", - "elapsed-time": "4", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "df370a4d-94bd-11ec-aad1-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases/$entity", - "name": "motel", - "indexes": [ - "hotel" - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "df456b87-94bd-11ec-bfa4-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "172", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:32:59 GMT", - "elapsed-time": "4", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "df456b87-94bd-11ec-bfa4-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases", - "value": [ - { - "name": "motel", - "indexes": [ - "hotel" - ] - }, - { - "name": "resort", - "indexes": [ - "drgqefsg" - ] - } - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "df5414da-94bd-11ec-98f1-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "172", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:32:59 GMT", - "elapsed-time": "4", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "df5414da-94bd-11ec-98f1-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases", - "value": [ - { - "name": "motel", - "indexes": [ - "hotel" - ] - }, - { - "name": "resort", - "indexes": [ - "drgqefsg" - ] - } - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027motel\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Content-Length": "0", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "df610af1-94bd-11ec-bc73-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Wed, 23 Feb 2022 15:32:59 GMT", - "elapsed-time": "22", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "df610af1-94bd-11ec-bc73-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027{\u0027additional_properties\u0027: {}, \u0027name\u0027: \u0027motel\u0027, \u0027indexes\u0027: %5B\u0027hotel\u0027%5D, \u0027e_tag\u0027: None}\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "df70def4-94bd-11ec-bea8-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 404, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Wed, 23 Feb 2022 15:32:59 GMT", - "elapsed-time": "1", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "df70def4-94bd-11ec-bea8-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027resort\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Content-Length": "0", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "df7de330-94bd-11ec-a499-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Wed, 23 Feb 2022 15:32:59 GMT", - "elapsed-time": "15", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "df7de330-94bd-11ec-a499-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027{\u0027additional_properties\u0027: {}, \u0027name\u0027: \u0027resort\u0027, \u0027indexes\u0027: %5B\u0027drgqefsg\u0027%5D, \u0027e_tag\u0027: None}\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "df8b2e45-94bd-11ec-9721-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 404, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Wed, 23 Feb 2022 15:32:59 GMT", - "elapsed-time": "1", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "df8b2e45-94bd-11ec-9721-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": {} -} diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_data_source_live_async.pyTestSearchClientDataSourcesAsynctest_data_source.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_data_source_live_async.pyTestSearchClientDataSourcesAsynctest_data_source.json index 4dde7f2aa2ef..e235a6d35a60 100644 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_data_source_live_async.pyTestSearchClientDataSourcesAsynctest_data_source.json +++ b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_data_source_live_async.pyTestSearchClientDataSourcesAsynctest_data_source.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -30,7 +30,7 @@ "elapsed-time": "35", "ETag": "W/\u00220x8D9E1E775E9F68A\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027create\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027create\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -58,7 +58,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -87,7 +87,7 @@ "elapsed-time": "36", "ETag": "W/\u00220x8D9E1E776020EDE\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delete\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delete\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -115,7 +115,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -183,7 +183,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delete\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delete\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -206,7 +206,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -256,7 +256,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -285,7 +285,7 @@ "elapsed-time": "34", "ETag": "W/\u00220x8D9E1E7764F3914\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -313,7 +313,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -360,7 +360,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -389,7 +389,7 @@ "elapsed-time": "42", "ETag": "W/\u00220x8D9E1E77677067F\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -417,7 +417,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -446,7 +446,7 @@ "elapsed-time": "39", "ETag": "W/\u00220x8D9E1E776942726\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list2\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list2\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -474,7 +474,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -578,7 +578,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -607,7 +607,7 @@ "elapsed-time": "39", "ETag": "W/\u00220x8D9E1E776C875D9\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -635,7 +635,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -757,7 +757,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -817,7 +817,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -939,7 +939,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -986,7 +986,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1015,7 +1015,7 @@ "elapsed-time": "37", "ETag": "W/\u00220x8D9E1E777383E18\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1043,7 +1043,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1103,7 +1103,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1150,7 +1150,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1179,7 +1179,7 @@ "elapsed-time": "36", "ETag": "W/\u00220x8D9E1E7778B33D5\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1207,7 +1207,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1267,7 +1267,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_live_async.pyTestSearchIndexClientAsynctest_search_index_client.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_live_async.pyTestSearchIndexClientAsynctest_search_index_client.json index 598cadb416aa..0c4f4b0c15c0 100644 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_live_async.pyTestSearchIndexClientAsynctest_search_index_client.json +++ b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_live_async.pyTestSearchIndexClientAsynctest_search_index_client.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/servicestats?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/servicestats?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -67,7 +67,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -98,7 +98,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -153,7 +153,7 @@ "elapsed-time": "556", "ETag": "W/\u00220x8D9E1E76926F2BB\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -227,7 +227,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -323,7 +323,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -416,7 +416,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)/search.stats?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)/search.stats?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -448,7 +448,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -495,7 +495,7 @@ "elapsed-time": "644", "ETag": "W/\u00220x8D9E1E769D36D16\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -569,7 +569,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -681,7 +681,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -715,7 +715,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -767,7 +767,7 @@ "elapsed-time": "571", "ETag": "W/\u00220x8D9E1E76A78E39C\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -834,7 +834,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -965,7 +965,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1012,7 +1012,7 @@ "elapsed-time": "658", "ETag": "W/\u00220x8D9E1E76B16BA1C\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1086,7 +1086,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1198,7 +1198,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1258,7 +1258,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)/search.analyze?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)/search.analyze?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1307,7 +1307,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1581,7 +1581,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1604,7 +1604,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1627,7 +1627,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1650,7 +1650,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_skillset_live_async.pyTestSearchClientSkillsetstest_skillset_crud.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_skillset_live_async.pyTestSearchClientSkillsetstest_skillset_crud.json index febc0400d7c9..ea0dac21ce61 100644 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_skillset_live_async.pyTestSearchClientSkillsetstest_skillset_crud.json +++ b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_skillset_live_async.pyTestSearchClientSkillsetstest_skillset_crud.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -109,7 +109,7 @@ "elapsed-time": "51", "ETag": "W/\u00220x8DA1291A0F24DF4\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -244,7 +244,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -423,7 +423,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create\u0027)/search.resetskills?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create\u0027)/search.resetskills?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -454,7 +454,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -493,7 +493,7 @@ "elapsed-time": "44", "ETag": "W/\u00220x8DA1291A129827C\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-get\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-get\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -537,7 +537,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-get\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-get\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -607,7 +607,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -646,7 +646,7 @@ "elapsed-time": "37", "ETag": "W/\u00220x8DA1291A14B8471\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-1\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-1\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -690,7 +690,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -729,7 +729,7 @@ "elapsed-time": "38", "ETag": "W/\u00220x8DA1291A15CBFFC\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-2\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-2\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -773,7 +773,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1078,7 +1078,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1118,7 +1118,7 @@ "elapsed-time": "49", "ETag": "W/\u00220x8DA1291A1821CDB\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1162,7 +1162,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1509,7 +1509,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1594,7 +1594,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1941,7 +1941,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2011,7 +2011,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2051,7 +2051,7 @@ "elapsed-time": "44", "ETag": "W/\u00220x8DA1291A1D89496\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2095,7 +2095,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2153,7 +2153,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2193,7 +2193,7 @@ "elapsed-time": "37", "ETag": "W/\u00220x8DA1291A1F7D7CB\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2237,7 +2237,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2668,7 +2668,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2753,7 +2753,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3184,7 +3184,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3254,7 +3254,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3293,7 +3293,7 @@ "elapsed-time": "36", "ETag": "W/\u00220x8DA1291A24FFD02\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -3337,7 +3337,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3422,7 +3422,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3455,7 +3455,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3928,7 +3928,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3950,7 +3950,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3972,7 +3972,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3994,7 +3994,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -4016,7 +4016,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -4038,7 +4038,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-get\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-get\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -4060,7 +4060,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-1\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-1\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -4082,7 +4082,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-2\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-2\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_synonym_map_live_async.pyTestSearchClientSynonymMapstest_synonym_map.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_synonym_map_live_async.pyTestSearchClientSynonymMapstest_synonym_map.json index 3dbd5ded7337..6fe075646060 100644 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_synonym_map_live_async.pyTestSearchClientSynonymMapstest_synonym_map.json +++ b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_index_client_synonym_map_live_async.pyTestSearchClientSynonymMapstest_synonym_map.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -32,7 +32,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -56,7 +56,7 @@ "elapsed-time": "21", "ETag": "W/\u00220x8D9E1E74302CE66\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-create\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-create\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -73,7 +73,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -112,7 +112,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-create\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-create\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -135,7 +135,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -159,7 +159,7 @@ "elapsed-time": "61", "ETag": "W/\u00220x8D9E1E7436F62F0\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-del\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-del\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -176,7 +176,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -215,7 +215,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-del\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-del\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -238,7 +238,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -269,7 +269,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -293,7 +293,7 @@ "elapsed-time": "38", "ETag": "W/\u00220x8D9E1E743BDC582\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -310,7 +310,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -353,7 +353,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -387,7 +387,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -410,7 +410,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -441,7 +441,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -465,7 +465,7 @@ "elapsed-time": "22", "ETag": "W/\u00220x8D9E1E74421CFDE\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-get\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-get\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -482,7 +482,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -521,7 +521,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-get\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-get\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -557,7 +557,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-get\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-get\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -580,7 +580,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -604,7 +604,7 @@ "elapsed-time": "25", "ETag": "W/\u00220x8D9E1E7446F212B\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list1\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list1\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -621,7 +621,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -645,7 +645,7 @@ "elapsed-time": "23", "ETag": "W/\u00220x8D9E1E744839088\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list2\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list2\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -662,7 +662,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -708,7 +708,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list1\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list1\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -731,7 +731,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list2\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list2\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -754,7 +754,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -785,7 +785,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -809,7 +809,7 @@ "elapsed-time": "40", "ETag": "W/\u00220x8D9E1E744F3CE0E\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -826,7 +826,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -865,7 +865,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -908,7 +908,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -947,7 +947,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -983,7 +983,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", diff --git a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_indexer_client_live_async.pyTestSearchIndexerClientTestAsynctest_search_indexers.json b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_indexer_client_live_async.pyTestSearchIndexerClientTestAsynctest_search_indexers.json index 5c94b36058f2..dc2afad8e5f6 100644 --- a/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_indexer_client_live_async.pyTestSearchIndexerClientTestAsynctest_search_indexers.json +++ b/sdk/search/azure-search-documents/tests/recordings/async_tests/test_search_indexer_client_live_async.pyTestSearchIndexerClientTestAsynctest_search_indexers.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -30,7 +30,7 @@ "elapsed-time": "45", "ETag": "W/\u00220x8D9E1E71E75D6D3\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027create-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027create-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -58,7 +58,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -89,7 +89,7 @@ "elapsed-time": "525", "ETag": "W/\u00220x8D9E1E71EE15A21\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027create-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027create-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -136,7 +136,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -161,7 +161,7 @@ "elapsed-time": "913", "ETag": "W/\u00220x8D9E1E71F651CC2\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027create\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027create\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -186,7 +186,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -215,7 +215,7 @@ "elapsed-time": "42", "ETag": "W/\u00220x8D9E1E71F959B83\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delete-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delete-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -243,7 +243,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -274,7 +274,7 @@ "elapsed-time": "708", "ETag": "W/\u00220x8D9E1E72010D3ED\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027delete-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027delete-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -321,7 +321,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -346,7 +346,7 @@ "elapsed-time": "462", "ETag": "W/\u00220x8D9E1E7205573F9\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delete\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delete\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -371,7 +371,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -433,7 +433,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delete\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delete\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -456,7 +456,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -503,7 +503,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -532,7 +532,7 @@ "elapsed-time": "46", "ETag": "W/\u00220x8D9E1E720C4EE47\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -560,7 +560,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -591,7 +591,7 @@ "elapsed-time": "603", "ETag": "W/\u00220x8D9E1E72132460A\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027get-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027get-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -638,7 +638,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -663,7 +663,7 @@ "elapsed-time": "456", "ETag": "W/\u00220x8D9E1E721744E65\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -688,7 +688,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -732,7 +732,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -761,7 +761,7 @@ "elapsed-time": "44", "ETag": "W/\u00220x8D9E1E721B1EA97\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list1-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list1-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -789,7 +789,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -820,7 +820,7 @@ "elapsed-time": "543", "ETag": "W/\u00220x8D9E1E7221531B4\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027list1-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027list1-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -867,7 +867,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -896,7 +896,7 @@ "elapsed-time": "179", "ETag": "W/\u00220x8D9E1E72242077D\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list2-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list2-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -924,7 +924,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -955,7 +955,7 @@ "elapsed-time": "612", "ETag": "W/\u00220x8D9E1E722B181CA\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027list2-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027list2-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1002,7 +1002,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1027,7 +1027,7 @@ "elapsed-time": "499", "ETag": "W/\u00220x8D9E1E722FC3B74\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027list1\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027list1\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1052,7 +1052,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1077,7 +1077,7 @@ "elapsed-time": "454", "ETag": "W/\u00220x8D9E1E72354FCC8\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027list2\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027list2\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1102,7 +1102,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1194,7 +1194,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1223,7 +1223,7 @@ "elapsed-time": "54", "ETag": "W/\u00220x8D9E1E72396DE25\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1251,7 +1251,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1282,7 +1282,7 @@ "elapsed-time": "675", "ETag": "W/\u00220x8D9E1E7240A9D8F\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027cou-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027cou-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1329,7 +1329,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1354,7 +1354,7 @@ "elapsed-time": "495", "ETag": "W/\u00220x8D9E1E7245493FE\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027cou\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027cou\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1379,7 +1379,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1486,7 +1486,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027cou\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1539,7 +1539,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1646,7 +1646,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027cou\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1690,7 +1690,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1719,7 +1719,7 @@ "elapsed-time": "61", "ETag": "W/\u00220x8D9E1E72512E60B\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027reset-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027reset-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1747,7 +1747,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1778,7 +1778,7 @@ "elapsed-time": "643", "ETag": "W/\u00220x8D9E1E7258741A1\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027reset-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027reset-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1825,7 +1825,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1850,7 +1850,7 @@ "elapsed-time": "435", "ETag": "W/\u00220x8D9E1E725C8FBF9\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027reset\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027reset\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1875,7 +1875,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027reset\u0027)/search.reset?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027reset\u0027)/search.reset?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1898,7 +1898,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027reset\u0027)/search.status?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027reset\u0027)/search.status?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1972,7 +1972,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2001,7 +2001,7 @@ "elapsed-time": "59", "ETag": "W/\u00220x8D9E1E726556FDC\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027run-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027run-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2029,7 +2029,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2060,7 +2060,7 @@ "elapsed-time": "546", "ETag": "W/\u00220x8D9E1E726BA1657\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027run-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027run-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2107,7 +2107,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2132,7 +2132,7 @@ "elapsed-time": "421", "ETag": "W/\u00220x8D9E1E726FA7147\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027run\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027run\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2157,7 +2157,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027run\u0027)/search.run?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027run\u0027)/search.run?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2181,7 +2181,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027run\u0027)/search.status?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027run\u0027)/search.status?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2229,7 +2229,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2258,7 +2258,7 @@ "elapsed-time": "67", "ETag": "W/\u00220x8D9E1E72753F5CB\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get-status-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get-status-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2286,7 +2286,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2317,7 +2317,7 @@ "elapsed-time": "605", "ETag": "W/\u00220x8D9E1E727C1C2A9\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027get-status-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027get-status-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2364,7 +2364,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2389,7 +2389,7 @@ "elapsed-time": "578", "ETag": "W/\u00220x8D9E1E7281184A5\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get-status\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get-status\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2414,7 +2414,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get-status\u0027)/search.status?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get-status\u0027)/search.status?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2462,7 +2462,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2491,7 +2491,7 @@ "elapsed-time": "60", "ETag": "W/\u00220x8D9E1E7285B7B1B\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2519,7 +2519,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2550,7 +2550,7 @@ "elapsed-time": "614", "ETag": "W/\u00220x8D9E1E728CB1C7A\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027couunch-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027couunch-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2597,7 +2597,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2622,7 +2622,7 @@ "elapsed-time": "496", "ETag": "W/\u00220x8D9E1E7290B023E\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027couunch\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027couunch\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2647,7 +2647,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027couunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027couunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2700,7 +2700,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027couunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027couunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2743,7 +2743,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2772,7 +2772,7 @@ "elapsed-time": "62", "ETag": "W/\u00220x8D9E1E729988776\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2800,7 +2800,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2831,7 +2831,7 @@ "elapsed-time": "601", "ETag": "W/\u00220x8D9E1E72A05430D\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027delunch-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027delunch-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2878,7 +2878,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2903,7 +2903,7 @@ "elapsed-time": "525", "ETag": "W/\u00220x8D9E1E72A496E02\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delunch\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delunch\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2928,7 +2928,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2981,7 +2981,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delunch\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.pyTestSearchClienttest_get_document.json b/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.pyTestSearchClienttest_get_document.json index 4e4bf6fc177c..cfe2dc8a01ef 100644 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.pyTestSearchClienttest_get_document.json +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.pyTestSearchClienttest_get_document.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -61,7 +61,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00272\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00272\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -119,7 +119,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00273\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00273\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -177,7 +177,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00274\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00274\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -235,7 +235,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00275\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00275\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -293,7 +293,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00276\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00276\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -336,7 +336,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00277\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00277\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -379,7 +379,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00278\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00278\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -422,7 +422,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00279\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00279\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -513,7 +513,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u002710\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u002710\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.pyTestSearchClienttest_get_document_count.json b/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.pyTestSearchClienttest_get_document_count.json index c35233619eac..3d8102d29029 100644 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.pyTestSearchClienttest_get_document_count.json +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.pyTestSearchClienttest_get_document_count.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.pyTestSearchClienttest_get_document_missing.json b/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.pyTestSearchClienttest_get_document_missing.json index b0653bb73ef8..b152ac9a2e1e 100644 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.pyTestSearchClienttest_get_document_missing.json +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_basic_live.pyTestSearchClienttest_get_document_missing.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271000\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271000\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_buffered_sender_live.pyTestSearchIndexingBufferedSendertest_search_client_index_buffered_sender.json b/sdk/search/azure-search-documents/tests/recordings/test_search_client_buffered_sender_live.pyTestSearchIndexingBufferedSendertest_search_client_index_buffered_sender.json index d9f2132bde72..23f9745ca914 100644 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_client_buffered_sender_live.pyTestSearchIndexingBufferedSendertest_search_client_index_buffered_sender.json +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_buffered_sender_live.pyTestSearchIndexingBufferedSendertest_search_client_index_buffered_sender.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -455,7 +455,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -518,7 +518,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -547,7 +547,7 @@ "ResponseBody": "\uFEFF12" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271000\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271000\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -590,7 +590,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271001\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271001\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -633,7 +633,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -696,7 +696,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -725,7 +725,7 @@ "ResponseBody": "\uFEFF13" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -782,7 +782,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -811,7 +811,7 @@ "ResponseBody": "\uFEFF11" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00273\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00273\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -835,7 +835,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00274\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00274\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -859,7 +859,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -916,7 +916,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -945,7 +945,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -969,7 +969,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00272\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00272\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -993,7 +993,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1052,7 +1052,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1081,7 +1081,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00275\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00275\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1139,7 +1139,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00276\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00276\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1182,7 +1182,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1241,7 +1241,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1270,7 +1270,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1294,7 +1294,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1354,7 +1354,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1413,7 +1413,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1442,7 +1442,7 @@ "ResponseBody": "\uFEFF11" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1485,7 +1485,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.pyTestSearchClientIndexDocumenttest_search_client_index_document.json b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.pyTestSearchClientIndexDocumenttest_search_client_index_document.json index bf7d5f0d1d4c..797efedd492d 100644 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.pyTestSearchClientIndexDocumenttest_search_client_index_document.json +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_index_document_live.pyTestSearchClientIndexDocumenttest_search_client_index_document.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -64,7 +64,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -93,7 +93,7 @@ "ResponseBody": "\uFEFF12" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271000\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271000\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -136,7 +136,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271001\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271001\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -179,7 +179,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -242,7 +242,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -299,7 +299,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -328,7 +328,7 @@ "ResponseBody": "\uFEFF11" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00273\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00273\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -352,7 +352,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00274\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00274\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -376,7 +376,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -433,7 +433,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -462,7 +462,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -486,7 +486,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00272\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00272\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -510,7 +510,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -569,7 +569,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -598,7 +598,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -627,7 +627,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00275\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00275\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -685,7 +685,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00276\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00276\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -728,7 +728,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -787,7 +787,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -816,7 +816,7 @@ "ResponseBody": "\uFEFF10" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -840,7 +840,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -900,7 +900,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.index?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -959,7 +959,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/$count?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -988,7 +988,7 @@ "ResponseBody": "\uFEFF11" }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271003\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1031,7 +1031,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs(\u00271\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.pyTestSearchClienttest_search_client.json b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.pyTestSearchClienttest_search_client.json index 5d25ae478def..695af36bb085 100644 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.pyTestSearchClienttest_search_client.json +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_client_search_live.pyTestSearchClienttest_search_client.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -321,7 +321,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -452,7 +452,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -616,7 +616,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -748,7 +748,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -811,7 +811,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -874,7 +874,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1194,7 +1194,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1516,7 +1516,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -1836,7 +1836,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -2158,7 +2158,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -2225,7 +2225,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.search?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -2307,7 +2307,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.autocomplete?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.autocomplete?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", @@ -2348,7 +2348,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.suggest?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027drgqefsg\u0027)/docs/search.post.suggest?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=none", diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_alias_live.pyTestSearchClientAliastest_alias.json b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_alias_live.pyTestSearchClientAliastest_alias.json deleted file mode 100644 index 86d0e68e8f63..000000000000 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_alias_live.pyTestSearchClientAliastest_alias.json +++ /dev/null @@ -1,1006 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "86cea95c-94bc-11ec-9f81-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "6700", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:23:20 GMT", - "elapsed-time": "36", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "86cea95c-94bc-11ec-9f81-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#indexes", - "value": [ - { - "@odata.etag": "\u00220x8D9F6E06AAC056D\u0022", - "name": "drgqefsg", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "hotelName", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": "en.lucene", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": "fr.lucene", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "category", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "parkingIncluded", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "lastRenovationDate", - "type": "Edm.DateTimeOffset", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "rating", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "location", - "type": "Edm.GeographyPoint", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "address", - "type": "Edm.ComplexType", - "fields": [ - { - "name": "streetAddress", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "city", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "stateProvince", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "country", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "postalCode", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": true, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - }, - { - "name": "rooms", - "type": "Collection(Edm.ComplexType)", - "fields": [ - { - "name": "description", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": "en.lucene", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "descriptionFr", - "type": "Edm.String", - "searchable": true, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": "fr.lucene", - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "type", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "bedOptions", - "type": "Edm.String", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "sleepsCount", - "type": "Edm.Int32", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "smokingAllowed", - "type": "Edm.Boolean", - "searchable": false, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "tags", - "type": "Collection(Edm.String)", - "searchable": true, - "filterable": true, - "retrievable": true, - "sortable": false, - "facetable": true, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ] - } - ], - "scoringProfiles": [ - { - "name": "nearest", - "functionAggregation": "sum", - "text": null, - "functions": [ - { - "fieldName": "location", - "interpolation": "linear", - "type": "distance", - "boost": 2.0, - "freshness": null, - "magnitude": null, - "distance": { - "referencePointParameter": "myloc", - "boostingDistance": 100.0 - }, - "tag": null - } - ] - } - ], - "corsOptions": null, - "suggesters": [ - { - "name": "sg", - "searchMode": "analyzingInfixMatching", - "sourceFields": [ - "description", - "hotelName" - ] - } - ], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "871f63b1-94bc-11ec-ac20-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "95", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:23:20 GMT", - "elapsed-time": "4", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "871f63b1-94bc-11ec-ac20-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases", - "value": [] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "Content-Length": "43", - "Content-Type": "application/json", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "872b0ef9-94bc-11ec-b0bf-a04a5ed0778b" - }, - "RequestBody": { - "name": "resort", - "indexes": [ - "drgqefsg" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "131", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:23:20 GMT", - "elapsed-time": "42", - "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/aliases(\u0027resort\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "872b0ef9-94bc-11ec-b0bf-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases/$entity", - "name": "resort", - "indexes": [ - "drgqefsg" - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027motel\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "Content-Length": "42", - "Content-Type": "application/json", - "Prefer": "return=representation", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "873c52d9-94bc-11ec-9216-a04a5ed0778b" - }, - "RequestBody": { - "name": "motel", - "indexes": [ - "drgqefsg" - ] - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "130", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:23:21 GMT", - "elapsed-time": "42", - "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/aliases(\u0027motel\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "873c52d9-94bc-11ec-9216-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases/$entity", - "name": "motel", - "indexes": [ - "drgqefsg" - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "Content-Length": "456", - "Content-Type": "application/json", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "874e2b17-94bc-11ec-90d3-a04a5ed0778b" - }, - "RequestBody": { - "name": "hotel", - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "key": true, - "retrievable": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - }, - { - "name": "baseRate", - "type": "Edm.Double", - "key": false, - "retrievable": true, - "searchable": false, - "filterable": false, - "sortable": false, - "facetable": false - } - ], - "scoringProfiles": [ - { - "name": "MyProfile" - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": 60 - } - }, - "StatusCode": 201, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "1039", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:23:21 GMT", - "elapsed-time": "549", - "ETag": "W/\u00220x8D9F6E06DDF8F79\u0022", - "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotel\u0027)?api-version=2021-04-30-Preview", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "874e2b17-94bc-11ec-90d3-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#indexes/$entity", - "@odata.etag": "\u00220x8D9F6E06DDF8F79\u0022", - "name": "hotel", - "defaultScoringProfile": null, - "fields": [ - { - "name": "hotelId", - "type": "Edm.String", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": true, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - }, - { - "name": "baseRate", - "type": "Edm.Double", - "searchable": false, - "filterable": false, - "retrievable": true, - "sortable": false, - "facetable": false, - "key": false, - "indexAnalyzer": null, - "searchAnalyzer": null, - "analyzer": null, - "normalizer": null, - "synonymMaps": [] - } - ], - "scoringProfiles": [ - { - "name": "MyProfile", - "functionAggregation": null, - "text": null, - "functions": [] - } - ], - "corsOptions": { - "allowedOrigins": [ - "*" - ], - "maxAgeInSeconds": 60 - }, - "suggesters": [], - "analyzers": [], - "normalizers": [], - "tokenizers": [], - "tokenFilters": [], - "charFilters": [], - "encryptionKey": null, - "similarity": { - "@odata.type": "#Microsoft.Azure.Search.BM25Similarity", - "k1": null, - "b": null - }, - "semantic": null - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027motel\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "Content-Length": "39", - "Content-Type": "application/json", - "Prefer": "return=representation", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "87ad2696-94bc-11ec-8b41-a04a5ed0778b" - }, - "RequestBody": { - "name": "motel", - "indexes": [ - "hotel" - ] - }, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "127", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:23:21 GMT", - "elapsed-time": "72", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "87ad2696-94bc-11ec-8b41-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases/$entity", - "name": "motel", - "indexes": [ - "hotel" - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027resort\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "87c2ae96-94bc-11ec-809d-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "131", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:23:21 GMT", - "elapsed-time": "18", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "87c2ae96-94bc-11ec-809d-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases/$entity", - "name": "resort", - "indexes": [ - "drgqefsg" - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027motel\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "87d0c0a4-94bc-11ec-ac5e-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "127", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:23:21 GMT", - "elapsed-time": "5", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "87d0c0a4-94bc-11ec-ac5e-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases/$entity", - "name": "motel", - "indexes": [ - "hotel" - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "87dc07c7-94bc-11ec-babb-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "172", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:23:23 GMT", - "elapsed-time": "8", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "87dc07c7-94bc-11ec-babb-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases", - "value": [ - { - "name": "motel", - "indexes": [ - "hotel" - ] - }, - { - "name": "resort", - "indexes": [ - "drgqefsg" - ] - } - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "87e891a2-94bc-11ec-b70b-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Encoding": "gzip", - "Content-Length": "172", - "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Wed, 23 Feb 2022 15:23:23 GMT", - "elapsed-time": "5", - "Expires": "-1", - "OData-Version": "4.0", - "Pragma": "no-cache", - "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "87e891a2-94bc-11ec-b70b-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Vary": "Accept-Encoding" - }, - "ResponseBody": { - "@odata.context": "https://fakesearchendpoint.search.windows.net/$metadata#aliases", - "value": [ - { - "name": "motel", - "indexes": [ - "hotel" - ] - }, - { - "name": "resort", - "indexes": [ - "drgqefsg" - ] - } - ] - } - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027motel\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "Content-Length": "0", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "87f3f262-94bc-11ec-8f71-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Wed, 23 Feb 2022 15:23:23 GMT", - "elapsed-time": "26", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "87f3f262-94bc-11ec-8f71-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027{%27additional_properties%27%3A {}%2C %27name%27%3A %27motel%27%2C %27indexes%27%3A %5B%27hotel%27%5D%2C %27e_tag%27%3A None}\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "88029d7e-94bc-11ec-a565-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 404, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Wed, 23 Feb 2022 15:23:23 GMT", - "elapsed-time": "3", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "88029d7e-94bc-11ec-a565-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027resort\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "Content-Length": "0", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "880e24e9-94bc-11ec-8586-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Date": "Wed, 23 Feb 2022 15:23:23 GMT", - "elapsed-time": "16", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "880e24e9-94bc-11ec-8586-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - }, - { - "RequestUri": "https://fakesearchendpoint.search.windows.net/aliases(\u0027{%27additional_properties%27%3A {}%2C %27name%27%3A %27resort%27%2C %27indexes%27%3A %5B%27drgqefsg%27%5D%2C %27e_tag%27%3A None}\u0027)?api-version=2021-04-30-Preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json;odata.metadata=minimal", - "Accept-Encoding": "gzip, deflate", - "Connection": "keep-alive", - "User-Agent": "azsdk-python-search-documents/11.3.0b8 Python/3.9.9 (Windows-10-10.0.22000-SP0)", - "x-ms-client-request-id": "881bbca1-94bc-11ec-b52a-a04a5ed0778b" - }, - "RequestBody": null, - "StatusCode": 404, - "ResponseHeaders": { - "Cache-Control": "no-cache", - "Content-Length": "0", - "Date": "Wed, 23 Feb 2022 15:23:23 GMT", - "elapsed-time": "1", - "Expires": "-1", - "Pragma": "no-cache", - "request-id": "881bbca1-94bc-11ec-b52a-a04a5ed0778b", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains" - }, - "ResponseBody": null - } - ], - "Variables": {} -} diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.pyTestSearchClientDataSourcestest_data_source.json b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.pyTestSearchClientDataSourcestest_data_source.json index 2ccb42980df2..042a7803bbd4 100644 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.pyTestSearchClientDataSourcestest_data_source.json +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_data_source_live.pyTestSearchClientDataSourcestest_data_source.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -31,7 +31,7 @@ "elapsed-time": "34", "ETag": "W/\u00220x8D9E1E65CDCE69A\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027create\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027create\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -59,7 +59,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -89,7 +89,7 @@ "elapsed-time": "34", "ETag": "W/\u00220x8D9E1E65CF880E3\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delete\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delete\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -117,7 +117,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -186,7 +186,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delete\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delete\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -210,7 +210,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -261,7 +261,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -291,7 +291,7 @@ "elapsed-time": "34", "ETag": "W/\u00220x8D9E1E65D4FE2D0\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -319,7 +319,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -367,7 +367,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -397,7 +397,7 @@ "elapsed-time": "51", "ETag": "W/\u00220x8D9E1E65D7BA75A\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -425,7 +425,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -455,7 +455,7 @@ "elapsed-time": "36", "ETag": "W/\u00220x8D9E1E65D9D0D1D\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list2\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list2\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -483,7 +483,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -588,7 +588,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -618,7 +618,7 @@ "elapsed-time": "37", "ETag": "W/\u00220x8D9E1E65DD2942D\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -646,7 +646,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -769,7 +769,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -830,7 +830,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -953,7 +953,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1001,7 +1001,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1031,7 +1031,7 @@ "elapsed-time": "36", "ETag": "W/\u00220x8D9E1E65E46C8BA\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1059,7 +1059,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1120,7 +1120,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1168,7 +1168,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1198,7 +1198,7 @@ "elapsed-time": "35", "ETag": "W/\u00220x8D9E1E65E94B632\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1226,7 +1226,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1287,7 +1287,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1322,7 +1322,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1352,7 +1352,7 @@ "elapsed-time": "38", "ETag": "W/\u00220x8D9E1E65ED781BD\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delstrunch\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delstrunch\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1380,7 +1380,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delstrunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delstrunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.pyTestSearchIndexClienttest_search_index_client.json b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.pyTestSearchIndexClienttest_search_index_client.json index 110718695de8..6946abb87d14 100644 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.pyTestSearchIndexClienttest_search_index_client.json +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_live.pyTestSearchIndexClienttest_search_index_client.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/servicestats?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/servicestats?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -68,7 +68,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -100,7 +100,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -156,7 +156,7 @@ "elapsed-time": "515", "ETag": "W/\u00220x8D9E1E64D5E1021\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -230,7 +230,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -327,7 +327,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -421,7 +421,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)/search.stats?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)/search.stats?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -454,7 +454,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -502,7 +502,7 @@ "elapsed-time": "609", "ETag": "W/\u00220x8D9E1E64E0C10DC\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -576,7 +576,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -689,7 +689,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -724,7 +724,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -777,7 +777,7 @@ "elapsed-time": "619", "ETag": "W/\u00220x8D9E1E64EB9C387\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -844,7 +844,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -976,7 +976,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1024,7 +1024,7 @@ "elapsed-time": "567", "ETag": "W/\u00220x8D9E1E64F459B43\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1098,7 +1098,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1211,7 +1211,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1272,7 +1272,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)/search.analyze?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)/search.analyze?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1322,7 +1322,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1597,7 +1597,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-coa-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1621,7 +1621,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-cou\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1645,7 +1645,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels-del-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1669,7 +1669,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes(\u0027hotels\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.pyTestSearchSkillsettest_skillset_crud.json b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.pyTestSearchSkillsettest_skillset_crud.json index 78a70297cb9d..3de43a41b053 100644 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.pyTestSearchSkillsettest_skillset_crud.json +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.pyTestSearchSkillsettest_skillset_crud.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -114,7 +114,7 @@ "elapsed-time": "2128", "ETag": "W/\u00220x8DA129189EAC966\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -249,7 +249,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -429,7 +429,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create\u0027)/search.resetskills?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create\u0027)/search.resetskills?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -461,7 +461,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -501,7 +501,7 @@ "elapsed-time": "50", "ETag": "W/\u00220x8DA12918A2D46E3\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-get\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-get\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -545,7 +545,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-get\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-get\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -616,7 +616,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -656,7 +656,7 @@ "elapsed-time": "46", "ETag": "W/\u00220x8DA12918A50A834\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-1\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-1\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -700,7 +700,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -740,7 +740,7 @@ "elapsed-time": "40", "ETag": "W/\u00220x8DA12918A63B838\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-2\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-2\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -784,7 +784,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1090,7 +1090,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1131,7 +1131,7 @@ "elapsed-time": "41", "ETag": "W/\u00220x8DA12918A898A2C\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1175,7 +1175,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1523,7 +1523,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1609,7 +1609,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1957,7 +1957,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2028,7 +2028,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2069,7 +2069,7 @@ "elapsed-time": "38", "ETag": "W/\u00220x8DA12918AEC3523\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2113,7 +2113,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2172,7 +2172,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2213,7 +2213,7 @@ "elapsed-time": "37", "ETag": "W/\u00220x8DA12918B190AF3\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2257,7 +2257,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2689,7 +2689,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2775,7 +2775,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3207,7 +3207,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3278,7 +3278,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3318,7 +3318,7 @@ "elapsed-time": "41", "ETag": "W/\u00220x8DA12918B73C7CE\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -3362,7 +3362,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3448,7 +3448,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3482,7 +3482,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3956,7 +3956,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-inplace\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3979,7 +3979,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -4002,7 +4002,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create-or-update\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -4025,7 +4025,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-create\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -4048,7 +4048,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-deleted-unchanged\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -4071,7 +4071,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-get\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-get\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -4094,7 +4094,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-1\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-1\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -4117,7 +4117,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-2\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/skillsets(\u0027test-ss-list-2\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.pyTestSearchClientSynonymMapstest_synonym_map.json b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.pyTestSearchClientSynonymMapstest_synonym_map.json index 21559554e7a6..1c84c9059f89 100644 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.pyTestSearchClientSynonymMapstest_synonym_map.json +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_synonym_map_live.pyTestSearchClientSynonymMapstest_synonym_map.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -33,7 +33,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -58,7 +58,7 @@ "elapsed-time": "22", "ETag": "W/\u00220x8D9E1E5EE854772\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-create\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-create\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -75,7 +75,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -115,7 +115,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-create\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-create\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -139,7 +139,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -164,7 +164,7 @@ "elapsed-time": "23", "ETag": "W/\u00220x8D9E1E5EEC15D3A\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-del\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-del\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -181,7 +181,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -221,7 +221,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-del\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-del\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -245,7 +245,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -277,7 +277,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -302,7 +302,7 @@ "elapsed-time": "32", "ETag": "W/\u00220x8D9E1E5EF182300\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -319,7 +319,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -363,7 +363,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -398,7 +398,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-delunch\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -422,7 +422,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -454,7 +454,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -479,7 +479,7 @@ "elapsed-time": "33", "ETag": "W/\u00220x8D9E1E5EF837F32\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-get\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-get\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -496,7 +496,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -536,7 +536,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-get\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-get\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -573,7 +573,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-get\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-get\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -597,7 +597,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -622,7 +622,7 @@ "elapsed-time": "22", "ETag": "W/\u00220x8D9E1E5EFD6C310\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list1\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list1\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -639,7 +639,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -664,7 +664,7 @@ "elapsed-time": "22", "ETag": "W/\u00220x8D9E1E5EFEAE455\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list2\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list2\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -681,7 +681,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -728,7 +728,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list1\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list1\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -752,7 +752,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list2\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-list2\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -776,7 +776,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -808,7 +808,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -833,7 +833,7 @@ "elapsed-time": "23", "ETag": "W/\u00220x8D9E1E5F05AD3BE\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -850,7 +850,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -890,7 +890,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -934,7 +934,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -974,7 +974,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1011,7 +1011,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/synonymmaps(\u0027synmap-cou\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.pyTestSearchIndexerClientTesttest_search_indexers.json b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.pyTestSearchIndexerClientTesttest_search_indexers.json index d8fa40f05a56..3a2275fc43bc 100644 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.pyTestSearchIndexerClientTesttest_search_indexers.json +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_indexer_client_live.pyTestSearchIndexerClientTesttest_search_indexers.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -31,7 +31,7 @@ "elapsed-time": "36", "ETag": "W/\u00220x8D9E1E5C73CF62B\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027create-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027create-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -59,7 +59,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -91,7 +91,7 @@ "elapsed-time": "597", "ETag": "W/\u00220x8D9E1E5C7B5E4F0\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027create-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027create-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -138,7 +138,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -164,7 +164,7 @@ "elapsed-time": "920", "ETag": "W/\u00220x8D9E1E5C836C1C3\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027create\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027create\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -189,7 +189,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -219,7 +219,7 @@ "elapsed-time": "40", "ETag": "W/\u00220x8D9E1E5C86AE96E\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delete-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delete-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -247,7 +247,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -279,7 +279,7 @@ "elapsed-time": "603", "ETag": "W/\u00220x8D9E1E5C8D7CC0A\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027delete-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027delete-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -326,7 +326,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -352,7 +352,7 @@ "elapsed-time": "419", "ETag": "W/\u00220x8D9E1E5C916EE94\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delete\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delete\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -377,7 +377,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -440,7 +440,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delete\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delete\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -464,7 +464,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -512,7 +512,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -542,7 +542,7 @@ "elapsed-time": "42", "ETag": "W/\u00220x8D9E1E5C981AE9B\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -570,7 +570,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -602,7 +602,7 @@ "elapsed-time": "568", "ETag": "W/\u00220x8D9E1E5C9E93AD1\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027get-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027get-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -649,7 +649,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -675,7 +675,7 @@ "elapsed-time": "567", "ETag": "W/\u00220x8D9E1E5CA3F165B\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -700,7 +700,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -745,7 +745,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -775,7 +775,7 @@ "elapsed-time": "154", "ETag": "W/\u00220x8D9E1E5CA8E1522\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list1-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list1-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -803,7 +803,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -835,7 +835,7 @@ "elapsed-time": "636", "ETag": "W/\u00220x8D9E1E5CB00EA3A\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027list1-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027list1-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -882,7 +882,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -912,7 +912,7 @@ "elapsed-time": "42", "ETag": "W/\u00220x8D9E1E5CB1BC147\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list2-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027list2-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -940,7 +940,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -972,7 +972,7 @@ "elapsed-time": "569", "ETag": "W/\u00220x8D9E1E5CBAACCD1\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027list2-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027list2-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1019,7 +1019,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1045,7 +1045,7 @@ "elapsed-time": "445", "ETag": "W/\u00220x8D9E1E5CBEE5B8B\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027list1\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027list1\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1070,7 +1070,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1096,7 +1096,7 @@ "elapsed-time": "484", "ETag": "W/\u00220x8D9E1E5CC41C678\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027list2\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027list2\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1121,7 +1121,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1214,7 +1214,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1244,7 +1244,7 @@ "elapsed-time": "98", "ETag": "W/\u00220x8D9E1E5CC8FB3E6\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027cou-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1272,7 +1272,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1304,7 +1304,7 @@ "elapsed-time": "616", "ETag": "W/\u00220x8D9E1E5CD2A0868\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027cou-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027cou-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1351,7 +1351,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1377,7 +1377,7 @@ "elapsed-time": "435", "ETag": "W/\u00220x8D9E1E5CD6A3C45\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027cou\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027cou\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1402,7 +1402,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1510,7 +1510,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027cou\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1564,7 +1564,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1672,7 +1672,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027cou\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027cou\u0027)?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1717,7 +1717,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1747,7 +1747,7 @@ "elapsed-time": "81", "ETag": "W/\u00220x8D9E1E5CE20520C\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027reset-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027reset-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1775,7 +1775,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1807,7 +1807,7 @@ "elapsed-time": "631", "ETag": "W/\u00220x8D9E1E5CE92B221\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027reset-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027reset-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1854,7 +1854,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1880,7 +1880,7 @@ "elapsed-time": "442", "ETag": "W/\u00220x8D9E1E5CED222BB\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027reset\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027reset\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -1905,7 +1905,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027reset\u0027)/search.reset?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027reset\u0027)/search.reset?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -1929,7 +1929,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027reset\u0027)/search.status?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027reset\u0027)/search.status?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2004,7 +2004,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2034,7 +2034,7 @@ "elapsed-time": "103", "ETag": "W/\u00220x8D9E1E5CF654C5D\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027run-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027run-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2062,7 +2062,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2094,7 +2094,7 @@ "elapsed-time": "535", "ETag": "W/\u00220x8D9E1E5CFC8BA7B\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027run-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027run-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2141,7 +2141,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2167,7 +2167,7 @@ "elapsed-time": "465", "ETag": "W/\u00220x8D9E1E5D00A4DAC\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027run\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027run\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2192,7 +2192,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027run\u0027)/search.run?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027run\u0027)/search.run?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2217,7 +2217,7 @@ "ResponseBody": null }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027run\u0027)/search.status?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027run\u0027)/search.status?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2266,7 +2266,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2296,7 +2296,7 @@ "elapsed-time": "55", "ETag": "W/\u00220x8D9E1E5D068B375\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get-status-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027get-status-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2324,7 +2324,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2356,7 +2356,7 @@ "elapsed-time": "571", "ETag": "W/\u00220x8D9E1E5D0CDCF04\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027get-status-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027get-status-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2403,7 +2403,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2429,7 +2429,7 @@ "elapsed-time": "483", "ETag": "W/\u00220x8D9E1E5D111D2DA\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get-status\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get-status\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2454,7 +2454,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get-status\u0027)/search.status?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027get-status\u0027)/search.status?api-version=2020-06-30", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2503,7 +2503,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2533,7 +2533,7 @@ "elapsed-time": "97", "ETag": "W/\u00220x8D9E1E5D15D0197\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027couunch-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2561,7 +2561,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2593,7 +2593,7 @@ "elapsed-time": "601", "ETag": "W/\u00220x8D9E1E5D1CE7762\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027couunch-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027couunch-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2640,7 +2640,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2666,7 +2666,7 @@ "elapsed-time": "430", "ETag": "W/\u00220x8D9E1E5D20C61A3\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027couunch\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027couunch\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2691,7 +2691,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027couunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027couunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2745,7 +2745,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027couunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027couunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2789,7 +2789,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/datasources?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2819,7 +2819,7 @@ "elapsed-time": "61", "ETag": "W/\u00220x8D9E1E5D28DDAA1\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch-ds\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/datasources(\u0027delunch-ds\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2847,7 +2847,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexes?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2879,7 +2879,7 @@ "elapsed-time": "668", "ETag": "W/\u00220x8D9E1E5D3039585\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027delunch-hotels\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexes(\u0027delunch-hotels\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2926,7 +2926,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers?api-version=2020-06-30", "RequestMethod": "POST", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -2952,7 +2952,7 @@ "elapsed-time": "442", "ETag": "W/\u00220x8D9E1E5D343A258\u0022", "Expires": "-1", - "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delunch\u0027)?api-version=2021-04-30-Preview", + "Location": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delunch\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", @@ -2977,7 +2977,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delunch\u0027)?api-version=2020-06-30", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", @@ -3031,7 +3031,7 @@ } }, { - "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delunch\u0027)?api-version=2021-04-30-Preview", + "RequestUri": "https://fakesearchendpoint.search.windows.net/indexers(\u0027delunch\u0027)?api-version=2020-06-30", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json;odata.metadata=minimal", diff --git a/sdk/search/azure-search-documents/tests/search_service_preparer.py b/sdk/search/azure-search-documents/tests/search_service_preparer.py index 49d551c13082..461390064320 100644 --- a/sdk/search/azure-search-documents/tests/search_service_preparer.py +++ b/sdk/search/azure-search-documents/tests/search_service_preparer.py @@ -56,9 +56,6 @@ def _clean_up_indexes(endpoint, api_key): for map in client.get_synonym_maps(): client.delete_synonym_map(map.name) - #wipe out any existing aliases - for alias in client.list_aliases(): - client.delete_alias(alias) # wipe any existing indexes for index in client.list_indexes(): diff --git a/sdk/search/azure-search-documents/tests/test_search_index_client_alias_live.py b/sdk/search/azure-search-documents/tests/test_search_index_client_alias_live.py deleted file mode 100644 index 6d736a62bbb2..000000000000 --- a/sdk/search/azure-search-documents/tests/test_search_index_client_alias_live.py +++ /dev/null @@ -1,105 +0,0 @@ -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -from unicodedata import name -import pytest - -from azure.core import MatchConditions -from azure.core.exceptions import HttpResponseError -from azure.search.documents.indexes import SearchIndexClient -from devtools_testutils import AzureRecordedTestCase, recorded_by_proxy -from azure.search.documents.indexes.models import ( - AnalyzeTextOptions, - CorsOptions, - SearchIndex, - ScoringProfile, - SimpleField, - SearchFieldDataType, - SearchAlias, -) - -from search_service_preparer import SearchEnvVarPreparer, search_decorator - - -class TestSearchClientAlias(AzureRecordedTestCase): - @SearchEnvVarPreparer() - @search_decorator(schema="hotel_schema.json", index_batch="hotel_small.json") - @recorded_by_proxy - def test_alias(self, endpoint, api_key): - client = SearchIndexClient(endpoint, api_key) - aliases = ["resort", "motel"] - index_name = next(client.list_index_names()) - self._test_list_aliases_empty(client) - self._test_create_alias(client, aliases[0], index_name) - - self._test_create_or_update_alias(client, aliases[1], index_name) - - # point an old alias to a new index - new_index_name = "hotel" - self._test_update_alias_to_new_index(client, aliases[1], new_index_name, index_name) - - self._test_get_alias(client, aliases) - - self._test_list_aliases(client, aliases) - self._test_delete_aliases(client) - - def _test_list_aliases_empty(self, client): - result = client.list_aliases() - with pytest.raises(StopIteration): - next(result) - - def _test_create_alias(self, client, alias_name, index_name): - alias = SearchAlias(name=alias_name, indexes=[index_name]) - result = client.create_alias(alias) - assert result.name == alias_name - assert set(result.indexes) == {index_name} - - def _test_create_or_update_alias(self, client, alias_name, index_name): - alias = SearchAlias(name=alias_name, indexes=[index_name]) - result = client.create_or_update_alias(alias) - assert result.name == alias_name - assert set(result.indexes) == {index_name} - - def _test_update_alias_to_new_index(self, client, alias_name, new_index, old_index): - self._create_index(client, new_index) - alias = SearchAlias(name=alias_name, indexes=[new_index]) - result = client.create_or_update_alias(alias) - - assert result.name == alias_name - assert result.indexes[0] != old_index - assert result.indexes[0] == new_index - - def _test_get_alias(self, client, aliases): - for alias in aliases: - result = client.get_alias(alias) - assert result - assert result.name == alias - - def _test_list_aliases(self, client, aliases): - result = {alias for alias in client.list_alias_names()} - assert result == set(aliases) - - def _test_delete_aliases(self, client): - aliases = client.list_aliases() - - for alias in aliases: - client.delete_alias(alias) - with pytest.raises(HttpResponseError): - result = client.get_alias(alias) - - def _create_index(self, client, index_name): - fields = [ - SimpleField(name="hotelId", type=SearchFieldDataType.String, key=True), - SimpleField(name="baseRate", type=SearchFieldDataType.Double), - ] - scoring_profile = ScoringProfile(name="MyProfile") - scoring_profiles = [] - scoring_profiles.append(scoring_profile) - cors_options = CorsOptions(allowed_origins=["*"], max_age_in_seconds=60) - index = SearchIndex( - name=index_name, fields=fields, scoring_profiles=scoring_profiles, cors_options=cors_options - ) - result = client.create_index(index) diff --git a/sdk/search/azure-search-documents/tests/test_search_index_client_skillset_live.py b/sdk/search/azure-search-documents/tests/test_search_index_client_skillset_live.py index b3796bdecb0f..a6e2012e88c5 100644 --- a/sdk/search/azure-search-documents/tests/test_search_index_client_skillset_live.py +++ b/sdk/search/azure-search-documents/tests/test_search_index_client_skillset_live.py @@ -11,20 +11,18 @@ from devtools_testutils import AzureRecordedTestCase, recorded_by_proxy from search_service_preparer import SearchEnvVarPreparer, search_decorator from azure.search.documents.indexes.models import( - EntityLinkingSkill, EntityRecognitionSkill, - EntityRecognitionSkillVersion, InputFieldMappingEntry, OutputFieldMappingEntry, SearchIndexerSkillset, - SentimentSkill, - SentimentSkillVersion + SentimentSkill ) from azure.search.documents.indexes import SearchIndexerClient class TestSearchSkillset(AzureRecordedTestCase): + @pytest.mark.skip @SearchEnvVarPreparer() @search_decorator(schema="hotel_schema.json", index_batch="hotel_small.json") @recorded_by_proxy @@ -47,20 +45,13 @@ def _test_create_skillset_validation(self): s1 = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizationsS1")], - description="Skill Version 1", - model_version="1", include_typeless_entities=True) s2 = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizationsS2")], - skill_version=EntityRecognitionSkillVersion.LATEST, - description="Skill Version 3", - model_version="3", include_typeless_entities=True) s3 = SentimentSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="score", target_name="scoreS3")], - skill_version=SentimentSkillVersion.V1, - description="Sentiment V1", include_opinion_mining=True) skillset = SearchIndexerSkillset(name=name, skills=list([s1, s2, s3]), description="desc") client.create_skillset(skillset) @@ -73,34 +64,21 @@ def _test_create_skillset(self, client): s1 = EntityRecognitionSkill(name="skill1", inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizationsS1")], - description="Skill Version 1", include_typeless_entities=True) s2 = EntityRecognitionSkill(name="skill2", inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizationsS2")], - skill_version=EntityRecognitionSkillVersion.LATEST, - description="Skill Version 3", - model_version="3") + outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizationsS2")]) s3 = SentimentSkill(name="skill3", inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="score", target_name="scoreS3")], - skill_version=SentimentSkillVersion.V1, - description="Sentiment V1") + outputs=[OutputFieldMappingEntry(name="score", target_name="scoreS3")]) s4 = SentimentSkill(name="skill4", inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="confidenceScores", target_name="scoreS4")], - skill_version=SentimentSkillVersion.V3, - description="Sentiment V3", include_opinion_mining=True) - s5 = EntityLinkingSkill(name="skill5", - inputs=[InputFieldMappingEntry(name="text", source="/document/content")], - outputs=[OutputFieldMappingEntry(name="entities", target_name="entitiesS5")], - minimum_precision=0.5) - - skillset = SearchIndexerSkillset(name=name, skills=list([s1, s2, s3, s4, s5]), description="desc") + skillset = SearchIndexerSkillset(name=name, skills=list([s1, s2, s3, s4]), description="desc") dict_skills = [skill.as_dict() for skill in skillset.skills] skillset.skills = dict_skills @@ -113,14 +91,7 @@ def _test_create_skillset(self, client): assert result.e_tag assert len(result.skills) == 5 assert isinstance(result.skills[0], EntityRecognitionSkill) - assert result.skills[0].skill_version == EntityRecognitionSkillVersion.V1 - assert isinstance(result.skills[1], EntityRecognitionSkill) - assert result.skills[1].skill_version == EntityRecognitionSkillVersion.V3 assert isinstance(result.skills[2], SentimentSkill) - assert result.skills[2].skill_version == SentimentSkillVersion.V1 - assert isinstance(result.skills[3], SentimentSkill) - assert result.skills[3].skill_version == SentimentSkillVersion.V3 - assert isinstance(result.skills[4], EntityLinkingSkill) assert result.skills[4].minimum_precision == 0.5 assert len(client.get_skillsets()) == 1