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 cf5857632715..05cb393cb3eb 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,21 +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 azure.core import PipelineClient from msrest import Deserializer, Serializer +from . import models +from ._configuration import SearchClientConfiguration +from .operations import DocumentsOperations + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import SearchClientConfiguration -from .operations import DocumentsOperations -from . import models - + from azure.core.rest import HttpRequest, HttpResponse class SearchClient(object): """Client that can be used to query an index and upload, merge, or delete documents. @@ -40,36 +40,48 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{endpoint}/indexes(\'{indexName}\')' + _base_url = '{endpoint}/indexes(\'{indexName}\')' self._config = SearchClientConfiguration(endpoint, index_name, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **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._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.documents = DocumentsOperations(self._client, self._config, self._serialize, self._deserialize) - self.documents = DocumentsOperations( - self._client, self._config, self._serialize, self._deserialize) - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse """Runs the network request through the client's chained policies. - :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. + >>> 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. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse + :rtype: ~azure.core.rest.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'), } - 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 + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) def close(self): # type: () -> None 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 7799d633940a..5bea0add9b2b 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,18 +6,18 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any +from copy import deepcopy +from typing import Any, Awaitable from azure.core import AsyncPipelineClient -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from msrest import Deserializer, Serializer +from .. import models from ._configuration import SearchClientConfiguration from .operations import DocumentsOperations -from .. import models - -class SearchClient(object): +class SearchClient: """Client that can be used to query an index and upload, merge, or delete documents. :ivar documents: DocumentsOperations operations @@ -34,35 +34,47 @@ def __init__( index_name: str, **kwargs: Any ) -> None: - base_url = '{endpoint}/indexes(\'{indexName}\')' + _base_url = '{endpoint}/indexes(\'{indexName}\')' self._config = SearchClientConfiguration(endpoint, index_name, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **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._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.documents = DocumentsOperations(self._client, self._config, self._serialize, self._deserialize) - self.documents = DocumentsOperations( - self._client, self._config, self._serialize, self._deserialize) - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. - :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. + >>> 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. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + :rtype: ~azure.core.rest.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'), } - 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 + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) 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 58668b2ccdef..bd89a2bfee90 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 @@ -5,14 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models +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]] @@ -39,6 +43,7 @@ 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, @@ -58,33 +63,22 @@ async def count( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.count.metadata['url'] # type: ignore + request = build_count_request( + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.count.metadata['url'], + )._to_pipeline_transport_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'), } - 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') + 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') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -98,8 +92,11 @@ async def count( return cls(pipeline_response, deserialized, {}) return deserialized + count.metadata = {'url': '/docs/$count'} # type: ignore + + @distributed_trace_async async def search_get( self, search_text: Optional[str] = None, @@ -126,7 +123,7 @@ async def search_get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + _include_total_result_count = None _facets = None _filter = None @@ -151,8 +148,6 @@ async def search_get( _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 @@ -177,77 +172,44 @@ async def search_get( _top = search_options.top _captions = search_options.captions _semantic_fields = search_options.semantic_fields - api_version = "2021-04-30-Preview" - accept = "application/json" + if request_options is not None: + _x_ms_client_request_id = request_options.x_ms_client_request_id - # Construct URL - url = self.search_get.metadata['url'] # type: ignore + request = build_search_get_request( + 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, + 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'], + )._to_pipeline_transport_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'), } - 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 _query_language is not None: - query_parameters['queryLanguage'] = self._serialize.query("query_language", _query_language, 'str') - if _speller is not None: - query_parameters['speller'] = self._serialize.query("speller", _speller, 'str') - if _answers is not None: - query_parameters['answers'] = self._serialize.query("answers", _answers, 'str') - 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') - if _captions is not None: - query_parameters['captions'] = self._serialize.query("captions", _captions, 'str') - if _semantic_fields is not None: - query_parameters['semanticFields'] = self._serialize.query("semantic_fields", _semantic_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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -261,8 +223,11 @@ async def search_get( return cls(pipeline_response, deserialized, {}) return deserialized + search_get.metadata = {'url': '/docs'} # type: ignore + + @distributed_trace_async async def search_post( self, search_request: "_models.SearchRequest", @@ -285,38 +250,27 @@ async def search_post( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.search_post.metadata['url'] # type: ignore + json = self._serialize.body(search_request, 'SearchRequest') + + request = build_search_post_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.search_post.metadata['url'], + )._to_pipeline_transport_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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -330,8 +284,11 @@ async def search_post( return cls(pipeline_response, deserialized, {}) return deserialized + search_post.metadata = {'url': '/docs/search.post.search'} # type: ignore + + @distributed_trace_async async def get( self, key: str, @@ -358,36 +315,24 @@ async def get( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore + request = build_get_request( + key=key, + selected_fields=selected_fields, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get.metadata['url'], + )._to_pipeline_transport_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'), - 'key': self._serialize.url("key", key, '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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -401,8 +346,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/docs(\'{key}\')'} # type: ignore + + @distributed_trace_async async def suggest_get( self, search_text: str, @@ -433,7 +381,7 @@ async def suggest_get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + _filter = None _use_fuzzy_matching = None _highlight_post_tag = None @@ -444,8 +392,6 @@ 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 @@ -456,49 +402,31 @@ async def suggest_get( _search_fields = suggest_options.search_fields _select = suggest_options.select _top = suggest_options.top - api_version = "2021-04-30-Preview" - accept = "application/json" + if request_options is not None: + _x_ms_client_request_id = request_options.x_ms_client_request_id - # Construct URL - url = self.suggest_get.metadata['url'] # type: ignore + request = build_suggest_get_request( + 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'], + )._to_pipeline_transport_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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -512,8 +440,11 @@ async def suggest_get( return cls(pipeline_response, deserialized, {}) return deserialized + suggest_get.metadata = {'url': '/docs/search.suggest'} # type: ignore + + @distributed_trace_async async def suggest_post( self, suggest_request: "_models.SuggestRequest", @@ -536,38 +467,27 @@ async def suggest_post( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.suggest_post.metadata['url'] # type: ignore + json = self._serialize.body(suggest_request, 'SuggestRequest') + + request = build_suggest_post_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.suggest_post.metadata['url'], + )._to_pipeline_transport_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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -581,8 +501,11 @@ async def suggest_post( return cls(pipeline_response, deserialized, {}) return deserialized + suggest_post.metadata = {'url': '/docs/search.post.suggest'} # type: ignore + + @distributed_trace_async async def index( self, actions: List["_models.IndexAction"], @@ -605,40 +528,28 @@ async def index( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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) - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.index.metadata['url'] # type: ignore + json = self._serialize.body(_batch, 'IndexBatch') + + request = build_index_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.index.metadata['url'], + )._to_pipeline_transport_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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 207]: @@ -656,8 +567,11 @@ async def index( return cls(pipeline_response, deserialized, {}) return deserialized + index.metadata = {'url': '/docs/search.index'} # type: ignore + + @distributed_trace_async async def autocomplete_get( self, search_text: str, @@ -687,7 +601,7 @@ async def autocomplete_get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + _x_ms_client_request_id = None _autocomplete_mode = None _filter = None @@ -697,6 +611,8 @@ 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 @@ -706,49 +622,28 @@ 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.autocomplete_get.metadata['url'] # type: ignore + request = build_autocomplete_get_request( + 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'], + )._to_pipeline_transport_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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -762,8 +657,11 @@ async def autocomplete_get( return cls(pipeline_response, deserialized, {}) return deserialized + autocomplete_get.metadata = {'url': '/docs/search.autocomplete'} # type: ignore + + @distributed_trace_async async def autocomplete_post( self, autocomplete_request: "_models.AutocompleteRequest", @@ -786,38 +684,27 @@ async def autocomplete_post( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.autocomplete_post.metadata['url'] # type: ignore + json = self._serialize.body(autocomplete_request, 'AutocompleteRequest') + + request = build_autocomplete_post_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.autocomplete_post.metadata['url'], + )._to_pipeline_transport_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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -831,4 +718,6 @@ async def autocomplete_post( return cls(pipeline_response, deserialized, {}) return deserialized + autocomplete_post.metadata = {'url': '/docs/search.post.autocomplete'} # type: ignore + 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 3c18d1464a26..7993e91f7cfe 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 @@ -15,9 +15,9 @@ class AnswerResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] + :paramtype additional_properties: dict[str, any] :ivar score: The score value represents how relevant the answer is to the the query relative to other answers returned for the query. :vartype score: float @@ -92,36 +92,36 @@ def __init__( class AutocompleteOptions(msrest.serialization.Model): """Parameter group. - :param autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use + :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". - :type autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode - :param filter: An OData expression that filters the documents used to produce completed terms + :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. - :type filter: str - :param use_fuzzy_matching: A value indicating whether to use fuzzy matching for the + :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. - :type use_fuzzy_matching: bool - :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :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. - :type highlight_post_tag: str - :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :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. - :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. - :type minimum_coverage: float - :param search_fields: The list of field names to consider when querying for auto-completed + :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. - :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. - :type top: int + :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 """ _attribute_map = { @@ -155,41 +155,41 @@ class AutocompleteRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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". - :type autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode - :param filter: An OData expression that filters the documents used to produce completed terms + :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. - :type filter: str - :param use_fuzzy_matching: A value indicating whether to use fuzzy matching for the + :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. - :type use_fuzzy_matching: bool - :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :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. - :type highlight_post_tag: str - :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :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. - :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. - :type minimum_coverage: float - :param search_fields: The comma-separated list of field names to consider when querying for + :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. - :type search_fields: str - :param suggester_name: Required. The name of the suggester as specified in the suggesters + :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. - :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. - :type top: int + :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 """ _validation = { @@ -265,9 +265,9 @@ class CaptionResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] + :paramtype additional_properties: dict[str, any] :ivar text: A representative text passage extracted from the document most relevant to the search query. :vartype text: str @@ -302,9 +302,9 @@ class FacetResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] + :paramtype additional_properties: dict[str, any] :ivar count: The approximate count of documents falling within the bucket described by this facet. :vartype count: long @@ -331,12 +331,12 @@ def __init__( class IndexAction(msrest.serialization.Model): """Represents an index action that operates on a document. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] - :param action_type: The operation to perform on a document in an indexing batch. Possible + :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". - :type action_type: str or ~azure.search.documents.models.IndexActionType + :paramtype action_type: str or ~azure.search.documents.models.IndexActionType """ _attribute_map = { @@ -358,8 +358,8 @@ class IndexBatch(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param actions: Required. The actions in the batch. - :type actions: list[~azure.search.documents.models.IndexAction] + :keyword actions: Required. The actions in the batch. + :paramtype actions: list[~azure.search.documents.models.IndexAction] """ _validation = { @@ -456,8 +456,8 @@ def __init__( class RequestOptions(msrest.serialization.Model): """Parameter group. - :param x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :type x_ms_client_request_id: str + :keyword x_ms_client_request_id: The tracking ID sent with the request to help with debugging. + :paramtype x_ms_client_request_id: str """ _attribute_map = { @@ -581,98 +581,98 @@ def __init__( class SearchOptions(msrest.serialization.Model): """Parameter group. - :param include_total_result_count: A value that specifies whether to fetch the total count of + :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. - :type include_total_result_count: bool - :param facets: The list of facet expressions to apply to the search query. Each facet + :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. - :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 + :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. - :type highlight_fields: list[str] - :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :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>. - :type highlight_post_tag: str - :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :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>. - :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 + :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. - :type minimum_coverage: float - :param order_by: The list of OData $orderby expressions by which to sort the results. Each + :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. - :type order_by: list[str] - :param query_type: A value that specifies the syntax of the search query. The default is + :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". - :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 + :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). - :type scoring_parameters: list[str] - :param scoring_profile: The name of a scoring profile to evaluate match scores for matching + :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. - :type scoring_profile: str - :param search_fields: The list of field names to which to scope the full-text search. When + :paramtype scoring_profile: 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. - :type search_fields: list[str] - :param query_language: The language of the query. Possible values include: "none", "en-us". - :type query_language: str or ~azure.search.documents.models.QueryLanguage - :param speller: Improve search recall by spell-correcting individual search query terms. + :paramtype search_fields: list[str] + :keyword query_language: The language of the query. Possible values include: "none", "en-us". + :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". - :type speller: str or ~azure.search.documents.models.Speller - :param 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 + :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". - :type answers: str or ~azure.search.documents.models.Answers - :param search_mode: A value that specifies whether any or all of the search terms must be + :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". - :type search_mode: str or ~azure.search.documents.models.SearchMode - :param scoring_statistics: A value that specifies whether we want to calculate scoring + :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". - :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 + :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. - :type session_id: str - :param select: The list of fields to retrieve. If unspecified, all fields marked as retrievable - in the schema are included. - :type select: list[str] - :param skip: The number of search results to skip. This value cannot be greater than 100,000. + :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. - :type skip: int - :param top: The number of search results to retrieve. This can be used in conjunction with + :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. - :type top: int - :param captions: This parameter is only valid if the query type is 'semantic'. If set, the + :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". - :type captions: str or ~azure.search.documents.models.Captions - :param semantic_fields: The list of field names used for semantic search. - :type semantic_fields: list[str] + :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] """ _attribute_map = { @@ -734,99 +734,99 @@ def __init__( class SearchRequest(msrest.serialization.Model): """Parameters for filtering, sorting, faceting, paging, and other search query behaviors. - :param include_total_result_count: A value that specifies whether to fetch the total count of + :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. - :type include_total_result_count: bool - :param facets: The list of facet expressions to apply to the search query. Each facet + :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. - :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. + :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. - :type highlight_fields: str - :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :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>. - :type highlight_post_tag: str - :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :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>. - :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 + :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. - :type minimum_coverage: float - :param order_by: The comma-separated list of OData $orderby expressions by which to sort the + :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. - :type order_by: str - :param query_type: A value that specifies the syntax of the search query. The default is + :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". - :type query_type: str or ~azure.search.documents.models.QueryType - :param scoring_statistics: A value that specifies whether we want to calculate scoring + :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". - :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 + :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. - :type session_id: str - :param scoring_parameters: The list of parameter values to be used in scoring functions (for + :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). - :type scoring_parameters: list[str] - :param scoring_profile: The name of a scoring profile to evaluate match scores for matching + :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. - :type scoring_profile: str - :param search_text: A full-text search query expression; Use "*" or omit this parameter to + :paramtype scoring_profile: str + :keyword 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 + :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. - :type search_fields: str - :param search_mode: A value that specifies whether any or all of the search terms must be + :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". - :type search_mode: str or ~azure.search.documents.models.SearchMode - :param query_language: A value that specifies the language of the search query. Possible values - include: "none", "en-us". - :type query_language: str or ~azure.search.documents.models.QueryLanguage - :param speller: A value that specified the type of the speller to use to spell-correct + :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". + :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". - :type speller: str or ~azure.search.documents.models.Speller - :param answers: A value that specifies whether answers should be returned as part of the search - response. Possible values include: "none", "extractive". - :type answers: str or ~azure.search.documents.models.Answers - :param select: The comma-separated list of fields to retrieve. If unspecified, all fields + :paramtype speller: str or ~azure.search.documents.models.Speller + :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.Answers + :keyword 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. + :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. - :type skip: int - :param top: The number of search results to retrieve. This can be used in conjunction with + :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. - :type top: int - :param captions: A value that specifies whether captions should be returned as part of the + :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". - :type captions: str or ~azure.search.documents.models.Captions - :param semantic_fields: The comma-separated list of field names used for semantic search. - :type semantic_fields: str + :paramtype captions: str or ~azure.search.documents.models.Captions + :keyword semantic_fields: The comma-separated list of field names used for semantic search. + :paramtype semantic_fields: str """ _attribute_map = { @@ -894,9 +894,9 @@ class SearchResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] + :paramtype 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 @@ -976,41 +976,41 @@ def __init__( class SuggestOptions(msrest.serialization.Model): """Parameter group. - :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. - :type use_fuzzy_matching: bool - :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :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. - :type highlight_post_tag: str - :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :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. - :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 + :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. - :type minimum_coverage: float - :param order_by: The list of OData $orderby expressions by which to sort the results. Each + :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. - :type order_by: list[str] - :param search_fields: The list of field names to search for the specified search text. Target + :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. - :type search_fields: list[str] - :param select: The list of fields to retrieve. If unspecified, only the key field will be + :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. - :type select: list[str] - :param top: The number of suggestions to retrieve. The value must be a number between 1 and + :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. - :type top: int + :paramtype top: int """ _attribute_map = { @@ -1046,47 +1046,47 @@ class SuggestRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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. - :type use_fuzzy_matching: bool - :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :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. - :type highlight_post_tag: str - :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :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. - :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 + :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. - :type minimum_coverage: float - :param order_by: The comma-separated list of OData $orderby expressions by which to sort the + :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. - :type order_by: str - :param search_text: Required. The search text to use to suggest documents. Must be at least 1 + :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. - :type search_text: str - :param search_fields: The comma-separated list of field names to search for the specified + :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. - :type search_fields: str - :param select: The comma-separated list of fields to retrieve. If unspecified, only the key + :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. - :type select: str - :param suggester_name: Required. The name of the suggester as specified in the suggesters + :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. - :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. - :type top: int + :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 """ _validation = { @@ -1133,9 +1133,9 @@ class SuggestResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] + :paramtype additional_properties: dict[str, any] :ivar text: Required. The text of the suggestion result. :vartype text: str """ 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 033a095dc8f1..e5e0ece35849 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 @@ -19,9 +19,9 @@ class AnswerResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] + :paramtype additional_properties: dict[str, any] :ivar score: The score value represents how relevant the answer is to the the query relative to other answers returned for the query. :vartype score: float @@ -98,36 +98,36 @@ def __init__( class AutocompleteOptions(msrest.serialization.Model): """Parameter group. - :param autocomplete_mode: Specifies the mode for Autocomplete. The default is 'oneTerm'. Use + :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". - :type autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode - :param filter: An OData expression that filters the documents used to produce completed terms + :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. - :type filter: str - :param use_fuzzy_matching: A value indicating whether to use fuzzy matching for the + :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. - :type use_fuzzy_matching: bool - :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :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. - :type highlight_post_tag: str - :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :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. - :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. - :type minimum_coverage: float - :param search_fields: The list of field names to consider when querying for auto-completed + :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. - :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. - :type top: int + :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 """ _attribute_map = { @@ -170,41 +170,41 @@ class AutocompleteRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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". - :type autocomplete_mode: str or ~azure.search.documents.models.AutocompleteMode - :param filter: An OData expression that filters the documents used to produce completed terms + :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. - :type filter: str - :param use_fuzzy_matching: A value indicating whether to use fuzzy matching for the + :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. - :type use_fuzzy_matching: bool - :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :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. - :type highlight_post_tag: str - :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :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. - :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. - :type minimum_coverage: float - :param search_fields: The comma-separated list of field names to consider when querying for + :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. - :type search_fields: str - :param suggester_name: Required. The name of the suggester as specified in the suggesters + :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. - :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. - :type top: int + :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 """ _validation = { @@ -291,9 +291,9 @@ class CaptionResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] + :paramtype additional_properties: dict[str, any] :ivar text: A representative text passage extracted from the document most relevant to the search query. :vartype text: str @@ -330,9 +330,9 @@ class FacetResult(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] + :paramtype additional_properties: dict[str, any] :ivar count: The approximate count of documents falling within the bucket described by this facet. :vartype count: long @@ -361,12 +361,12 @@ def __init__( class IndexAction(msrest.serialization.Model): """Represents an index action that operates on a document. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] - :param action_type: The operation to perform on a document in an indexing batch. Possible + :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". - :type action_type: str or ~azure.search.documents.models.IndexActionType + :paramtype action_type: str or ~azure.search.documents.models.IndexActionType """ _attribute_map = { @@ -391,8 +391,8 @@ class IndexBatch(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param actions: Required. The actions in the batch. - :type actions: list[~azure.search.documents.models.IndexAction] + :keyword actions: Required. The actions in the batch. + :paramtype actions: list[~azure.search.documents.models.IndexAction] """ _validation = { @@ -491,8 +491,8 @@ def __init__( class RequestOptions(msrest.serialization.Model): """Parameter group. - :param x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :type x_ms_client_request_id: str + :keyword x_ms_client_request_id: The tracking ID sent with the request to help with debugging. + :paramtype x_ms_client_request_id: str """ _attribute_map = { @@ -618,98 +618,98 @@ def __init__( class SearchOptions(msrest.serialization.Model): """Parameter group. - :param include_total_result_count: A value that specifies whether to fetch the total count of + :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. - :type include_total_result_count: bool - :param facets: The list of facet expressions to apply to the search query. Each facet + :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. - :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 + :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. - :type highlight_fields: list[str] - :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :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>. - :type highlight_post_tag: str - :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :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>. - :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 + :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. - :type minimum_coverage: float - :param order_by: The list of OData $orderby expressions by which to sort the results. Each + :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. - :type order_by: list[str] - :param query_type: A value that specifies the syntax of the search query. The default is + :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". - :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 + :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). - :type scoring_parameters: list[str] - :param scoring_profile: The name of a scoring profile to evaluate match scores for matching + :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. - :type scoring_profile: str - :param search_fields: The list of field names to which to scope the full-text search. When + :paramtype scoring_profile: 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. - :type search_fields: list[str] - :param query_language: The language of the query. Possible values include: "none", "en-us". - :type query_language: str or ~azure.search.documents.models.QueryLanguage - :param speller: Improve search recall by spell-correcting individual search query terms. + :paramtype search_fields: list[str] + :keyword query_language: The language of the query. Possible values include: "none", "en-us". + :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". - :type speller: str or ~azure.search.documents.models.Speller - :param 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 + :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". - :type answers: str or ~azure.search.documents.models.Answers - :param search_mode: A value that specifies whether any or all of the search terms must be + :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". - :type search_mode: str or ~azure.search.documents.models.SearchMode - :param scoring_statistics: A value that specifies whether we want to calculate scoring + :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". - :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 + :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. - :type session_id: str - :param select: The list of fields to retrieve. If unspecified, all fields marked as retrievable - in the schema are included. - :type select: list[str] - :param skip: The number of search results to skip. This value cannot be greater than 100,000. + :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. - :type skip: int - :param top: The number of search results to retrieve. This can be used in conjunction with + :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. - :type top: int - :param captions: This parameter is only valid if the query type is 'semantic'. If set, the + :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". - :type captions: str or ~azure.search.documents.models.Captions - :param semantic_fields: The list of field names used for semantic search. - :type semantic_fields: list[str] + :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] """ _attribute_map = { @@ -795,99 +795,99 @@ def __init__( class SearchRequest(msrest.serialization.Model): """Parameters for filtering, sorting, faceting, paging, and other search query behaviors. - :param include_total_result_count: A value that specifies whether to fetch the total count of + :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. - :type include_total_result_count: bool - :param facets: The list of facet expressions to apply to the search query. Each facet + :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. - :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. + :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. - :type highlight_fields: str - :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :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>. - :type highlight_post_tag: str - :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :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>. - :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 + :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. - :type minimum_coverage: float - :param order_by: The comma-separated list of OData $orderby expressions by which to sort the + :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. - :type order_by: str - :param query_type: A value that specifies the syntax of the search query. The default is + :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". - :type query_type: str or ~azure.search.documents.models.QueryType - :param scoring_statistics: A value that specifies whether we want to calculate scoring + :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". - :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 + :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. - :type session_id: str - :param scoring_parameters: The list of parameter values to be used in scoring functions (for + :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). - :type scoring_parameters: list[str] - :param scoring_profile: The name of a scoring profile to evaluate match scores for matching + :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. - :type scoring_profile: str - :param search_text: A full-text search query expression; Use "*" or omit this parameter to + :paramtype scoring_profile: str + :keyword 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 + :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. - :type search_fields: str - :param search_mode: A value that specifies whether any or all of the search terms must be + :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". - :type search_mode: str or ~azure.search.documents.models.SearchMode - :param query_language: A value that specifies the language of the search query. Possible values - include: "none", "en-us". - :type query_language: str or ~azure.search.documents.models.QueryLanguage - :param speller: A value that specified the type of the speller to use to spell-correct + :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". + :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". - :type speller: str or ~azure.search.documents.models.Speller - :param answers: A value that specifies whether answers should be returned as part of the search - response. Possible values include: "none", "extractive". - :type answers: str or ~azure.search.documents.models.Answers - :param select: The comma-separated list of fields to retrieve. If unspecified, all fields + :paramtype speller: str or ~azure.search.documents.models.Speller + :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.Answers + :keyword 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. + :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. - :type skip: int - :param top: The number of search results to retrieve. This can be used in conjunction with + :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. - :type top: int - :param captions: A value that specifies whether captions should be returned as part of the + :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". - :type captions: str or ~azure.search.documents.models.Captions - :param semantic_fields: The comma-separated list of field names used for semantic search. - :type semantic_fields: str + :paramtype captions: str or ~azure.search.documents.models.Captions + :keyword semantic_fields: The comma-separated list of field names used for semantic search. + :paramtype semantic_fields: str """ _attribute_map = { @@ -980,9 +980,9 @@ class SearchResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] + :paramtype 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 @@ -1064,41 +1064,41 @@ def __init__( class SuggestOptions(msrest.serialization.Model): """Parameter group. - :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. - :type use_fuzzy_matching: bool - :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :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. - :type highlight_post_tag: str - :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :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. - :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 + :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. - :type minimum_coverage: float - :param order_by: The list of OData $orderby expressions by which to sort the results. Each + :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. - :type order_by: list[str] - :param search_fields: The list of field names to search for the specified search text. Target + :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. - :type search_fields: list[str] - :param select: The list of fields to retrieve. If unspecified, only the key field will be + :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. - :type select: list[str] - :param top: The number of suggestions to retrieve. The value must be a number between 1 and + :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. - :type top: int + :paramtype top: int """ _attribute_map = { @@ -1144,47 +1144,47 @@ class SuggestRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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. - :type use_fuzzy_matching: bool - :param highlight_post_tag: A string tag that is appended to hit highlights. Must be set with + :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. - :type highlight_post_tag: str - :param highlight_pre_tag: A string tag that is prepended to hit highlights. Must be set with + :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. - :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 + :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. - :type minimum_coverage: float - :param order_by: The comma-separated list of OData $orderby expressions by which to sort the + :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. - :type order_by: str - :param search_text: Required. The search text to use to suggest documents. Must be at least 1 + :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. - :type search_text: str - :param search_fields: The comma-separated list of field names to search for the specified + :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. - :type search_fields: str - :param select: The comma-separated list of fields to retrieve. If unspecified, only the key + :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. - :type select: str - :param suggester_name: Required. The name of the suggester as specified in the suggesters + :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. - :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. - :type top: int + :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 """ _validation = { @@ -1243,9 +1243,9 @@ class SuggestResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] + :paramtype additional_properties: dict[str, any] :ivar text: Required. The text of the suggestion result. :vartype text: str """ 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 c49117818f8e..29a5bdc2c30d 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,27 +6,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum, EnumMeta +from enum import Enum from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - 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 Answers(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Answers(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:` HttpRequest + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + 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] + 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] + + api_version = "2021-04-30-Preview" + 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 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 + 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] + + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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. @@ -43,6 +473,7 @@ 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"] @@ -63,33 +494,22 @@ def count( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.count.metadata['url'] # type: ignore + request = build_count_request( + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.count.metadata['url'], + )._to_pipeline_transport_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'), } - 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') + 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') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -103,8 +523,11 @@ def count( return cls(pipeline_response, deserialized, {}) return deserialized + count.metadata = {'url': '/docs/$count'} # type: ignore + + @distributed_trace def search_get( self, search_text=None, # type: Optional[str] @@ -132,7 +555,7 @@ def search_get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + _include_total_result_count = None _facets = None _filter = None @@ -157,8 +580,6 @@ def search_get( _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 @@ -183,77 +604,44 @@ def search_get( _top = search_options.top _captions = search_options.captions _semantic_fields = search_options.semantic_fields - api_version = "2021-04-30-Preview" - accept = "application/json" + if request_options is not None: + _x_ms_client_request_id = request_options.x_ms_client_request_id - # Construct URL - url = self.search_get.metadata['url'] # type: ignore + request = build_search_get_request( + 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, + 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'], + )._to_pipeline_transport_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'), } - 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 _query_language is not None: - query_parameters['queryLanguage'] = self._serialize.query("query_language", _query_language, 'str') - if _speller is not None: - query_parameters['speller'] = self._serialize.query("speller", _speller, 'str') - if _answers is not None: - query_parameters['answers'] = self._serialize.query("answers", _answers, 'str') - 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') - if _captions is not None: - query_parameters['captions'] = self._serialize.query("captions", _captions, 'str') - if _semantic_fields is not None: - query_parameters['semanticFields'] = self._serialize.query("semantic_fields", _semantic_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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -267,8 +655,11 @@ def search_get( return cls(pipeline_response, deserialized, {}) return deserialized + search_get.metadata = {'url': '/docs'} # type: ignore + + @distributed_trace def search_post( self, search_request, # type: "_models.SearchRequest" @@ -292,38 +683,27 @@ def search_post( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.search_post.metadata['url'] # type: ignore + json = self._serialize.body(search_request, 'SearchRequest') + + request = build_search_post_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.search_post.metadata['url'], + )._to_pipeline_transport_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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -337,8 +717,11 @@ def search_post( return cls(pipeline_response, deserialized, {}) return deserialized + search_post.metadata = {'url': '/docs/search.post.search'} # type: ignore + + @distributed_trace def get( self, key, # type: str @@ -366,36 +749,24 @@ def get( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore + request = build_get_request( + key=key, + selected_fields=selected_fields, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get.metadata['url'], + )._to_pipeline_transport_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'), - 'key': self._serialize.url("key", key, '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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -409,8 +780,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/docs(\'{key}\')'} # type: ignore + + @distributed_trace def suggest_get( self, search_text, # type: str @@ -442,7 +816,7 @@ def suggest_get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + _filter = None _use_fuzzy_matching = None _highlight_post_tag = None @@ -453,8 +827,6 @@ 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 @@ -465,49 +837,31 @@ def suggest_get( _search_fields = suggest_options.search_fields _select = suggest_options.select _top = suggest_options.top - api_version = "2021-04-30-Preview" - accept = "application/json" + if request_options is not None: + _x_ms_client_request_id = request_options.x_ms_client_request_id - # Construct URL - url = self.suggest_get.metadata['url'] # type: ignore + request = build_suggest_get_request( + 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'], + )._to_pipeline_transport_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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -521,8 +875,11 @@ def suggest_get( return cls(pipeline_response, deserialized, {}) return deserialized + suggest_get.metadata = {'url': '/docs/search.suggest'} # type: ignore + + @distributed_trace def suggest_post( self, suggest_request, # type: "_models.SuggestRequest" @@ -546,38 +903,27 @@ def suggest_post( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.suggest_post.metadata['url'] # type: ignore + json = self._serialize.body(suggest_request, 'SuggestRequest') + + request = build_suggest_post_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.suggest_post.metadata['url'], + )._to_pipeline_transport_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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -591,8 +937,11 @@ def suggest_post( return cls(pipeline_response, deserialized, {}) return deserialized + suggest_post.metadata = {'url': '/docs/search.post.suggest'} # type: ignore + + @distributed_trace def index( self, actions, # type: List["_models.IndexAction"] @@ -616,40 +965,28 @@ def index( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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) - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.index.metadata['url'] # type: ignore + json = self._serialize.body(_batch, 'IndexBatch') + + request = build_index_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.index.metadata['url'], + )._to_pipeline_transport_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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 207]: @@ -667,8 +1004,11 @@ def index( return cls(pipeline_response, deserialized, {}) return deserialized + index.metadata = {'url': '/docs/search.index'} # type: ignore + + @distributed_trace def autocomplete_get( self, search_text, # type: str @@ -699,7 +1039,7 @@ def autocomplete_get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + _x_ms_client_request_id = None _autocomplete_mode = None _filter = None @@ -709,6 +1049,8 @@ 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 @@ -718,49 +1060,28 @@ 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.autocomplete_get.metadata['url'] # type: ignore + request = build_autocomplete_get_request( + 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'], + )._to_pipeline_transport_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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -774,8 +1095,11 @@ def autocomplete_get( return cls(pipeline_response, deserialized, {}) return deserialized + autocomplete_get.metadata = {'url': '/docs/search.autocomplete'} # type: ignore + + @distributed_trace def autocomplete_post( self, autocomplete_request, # type: "_models.AutocompleteRequest" @@ -799,38 +1123,27 @@ def autocomplete_post( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.autocomplete_post.metadata['url'] # type: ignore + json = self._serialize.body(autocomplete_request, 'AutocompleteRequest') + + request = build_autocomplete_post_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.autocomplete_post.metadata['url'], + )._to_pipeline_transport_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'), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -844,4 +1157,6 @@ def autocomplete_post( return cls(pipeline_response, deserialized, {}) return deserialized + autocomplete_post.metadata = {'url': '/docs/search.post.autocomplete'} # type: ignore + 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 63cfd315c9e9..23bef882f6a4 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,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 azure.core import PipelineClient from msrest import Deserializer, Serializer +from . import models +from ._configuration import SearchClientConfiguration +from .operations import DataSourcesOperations, IndexersOperations, IndexesOperations, SearchClientOperationsMixin, SkillsetsOperations, SynonymMapsOperations + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any - 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 - + from azure.core.rest import HttpRequest, HttpResponse 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. @@ -50,43 +45,51 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{endpoint}' + _base_url = '{endpoint}' self._config = SearchClientConfiguration(endpoint, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **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._serialize.client_side_validation = False 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.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 + + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse """Runs the network request through the client's chained policies. - :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. + >>> 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. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse + :rtype: ~azure.core.rest.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), } - 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 + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) def close(self): # type: () -> None 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 b8dfb1e0acc0..98dc5ee13869 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,16 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any +from copy import deepcopy +from typing import Any, Awaitable from azure.core import AsyncPipelineClient -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from msrest import Deserializer, Serializer -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 - +from ._configuration import SearchClientConfiguration +from .operations import DataSourcesOperations, IndexersOperations, IndexesOperations, SearchClientOperationsMixin, SkillsetsOperations, SynonymMapsOperations 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. @@ -44,42 +39,50 @@ def __init__( endpoint: str, **kwargs: Any ) -> None: - base_url = '{endpoint}' + _base_url = '{endpoint}' self._config = SearchClientConfiguration(endpoint, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **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._serialize.client_side_validation = False 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.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: + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. - :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. + >>> 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. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + :rtype: ~azure.core.rest.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), } - 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 + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) async def close(self) -> None: await self._client.close() 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 bc7fb52746b1..8f4a05b35c10 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 @@ -5,14 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models +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]] @@ -39,6 +43,7 @@ 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, @@ -75,46 +80,30 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - prefer = "return=representation" - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + json = self._serialize.body(data_source, 'SearchIndexerDataSource') + + request = build_create_or_update_request( + data_source_name=data_source_name, + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + if_match=if_match, + if_none_match=if_none_match, + ignore_reset_requirements=ignore_reset_requirements, + json=json, + template_url=self.create_or_update.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - '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'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') - if ignore_reset_requirements is not None: - query_parameters['ignoreResetRequirements'] = self._serialize.query("ignore_reset_requirements", ignore_reset_requirements, 'bool') - - # 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -132,8 +121,11 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/datasources(\'{dataSourceName}\')'} # type: ignore + + @distributed_trace_async async def delete( self, data_source_name: str, @@ -164,37 +156,24 @@ async def delete( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.delete.metadata['url'] # type: ignore + request = build_delete_request( + data_source_name=data_source_name, + 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'], + )._to_pipeline_transport_request() path_format_arguments = { - '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'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -207,6 +186,8 @@ async def delete( delete.metadata = {'url': '/datasources(\'{dataSourceName}\')'} # type: ignore + + @distributed_trace_async async def get( self, data_source_name: str, @@ -229,33 +210,22 @@ async def get( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore + request = build_get_request( + data_source_name=data_source_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - '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'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -269,8 +239,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/datasources(\'{dataSourceName}\')'} # type: ignore + + @distributed_trace_async async def list( self, select: Optional[str] = None, @@ -295,34 +268,22 @@ async def list( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.list.metadata['url'] # type: ignore + request = build_list_request( + select=select, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.list.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -336,8 +297,11 @@ async def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/datasources'} # type: ignore + + @distributed_trace_async async def create( self, data_source: "_models.SearchIndexerDataSource", @@ -360,37 +324,26 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore + json = self._serialize.body(data_source, 'SearchIndexerDataSource') + + request = build_create_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.create.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: @@ -404,4 +357,6 @@ async def create( return cls(pipeline_response, deserialized, {}) return deserialized + 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 937c9f038e8b..31bdc5b09925 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 @@ -5,14 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models +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]] @@ -39,6 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def reset( self, indexer_name: str, @@ -61,33 +66,91 @@ async def reset( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.reset.metadata['url'] # type: ignore + request = build_reset_request( + indexer_name=indexer_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.reset.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **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, response) + raise HttpResponseError(response=response, model=error) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if cls: + return cls(pipeline_response, None, {}) + + reset.metadata = {'url': '/indexers(\'{indexerName}\')/search.reset'} # type: ignore + + + @distributed_trace_async + async def reset_docs( + self, + indexer_name: str, + overwrite: Optional[bool] = False, + keys_or_ids: Optional["_models.Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema"] = None, + request_options: Optional["_models.RequestOptions"] = None, + **kwargs: Any + ) -> None: + """Resets specific documents in the datasource to be selectively re-ingested by the indexer. - # 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') + :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.Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema + :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', {})) + + 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, 'Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema') + else: + json = None + + request = build_reset_docs_request( + indexer_name=indexer_name, + content_type=content_type, + overwrite=overwrite, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.reset_docs.metadata['url'], + )._to_pipeline_transport_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) - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [204]: @@ -98,8 +161,10 @@ async def reset( if cls: return cls(pipeline_response, None, {}) - reset.metadata = {'url': '/indexers(\'{indexerName}\')/search.reset'} # type: ignore + reset_docs.metadata = {'url': '/indexers(\'{indexerName}\')/search.resetdocs'} # type: ignore + + @distributed_trace_async async def run( self, indexer_name: str, @@ -122,33 +187,22 @@ async def run( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.run.metadata['url'] # type: ignore + request = build_run_request( + indexer_name=indexer_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.run.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.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') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -161,6 +215,8 @@ async def run( run.metadata = {'url': '/indexers(\'{indexerName}\')/search.run'} # type: ignore + + @distributed_trace_async async def create_or_update( self, indexer_name: str, @@ -201,48 +257,31 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - prefer = "return=representation" - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + json = self._serialize.body(indexer, 'SearchIndexer') + + request = build_create_or_update_request( + indexer_name=indexer_name, + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + if_match=if_match, + if_none_match=if_none_match, + disable_cache_reprocessing_change_detection=disable_cache_reprocessing_change_detection, + ignore_reset_requirements=ignore_reset_requirements, + json=json, + template_url=self.create_or_update.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') - if disable_cache_reprocessing_change_detection is not None: - query_parameters['disableCacheReprocessingChangeDetection'] = self._serialize.query("disable_cache_reprocessing_change_detection", disable_cache_reprocessing_change_detection, 'bool') - if ignore_reset_requirements is not None: - query_parameters['ignoreResetRequirements'] = self._serialize.query("ignore_reset_requirements", ignore_reset_requirements, 'bool') - - # 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -260,8 +299,11 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/indexers(\'{indexerName}\')'} # type: ignore + + @distributed_trace_async async def delete( self, indexer_name: str, @@ -292,37 +334,24 @@ async def delete( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.delete.metadata['url'] # type: ignore + request = build_delete_request( + indexer_name=indexer_name, + 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'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -335,6 +364,8 @@ async def delete( delete.metadata = {'url': '/indexers(\'{indexerName}\')'} # type: ignore + + @distributed_trace_async async def get( self, indexer_name: str, @@ -357,33 +388,22 @@ async def get( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore + request = build_get_request( + indexer_name=indexer_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') + 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') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -397,8 +417,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/indexers(\'{indexerName}\')'} # type: ignore + + @distributed_trace_async async def list( self, select: Optional[str] = None, @@ -423,34 +446,22 @@ async def list( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.list.metadata['url'] # type: ignore + request = build_list_request( + select=select, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.list.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -464,8 +475,11 @@ async def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/indexers'} # type: ignore + + @distributed_trace_async async def create( self, indexer: "_models.SearchIndexer", @@ -488,37 +502,26 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore + json = self._serialize.body(indexer, 'SearchIndexer') + + request = build_create_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.create.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: @@ -532,8 +535,11 @@ async def create( return cls(pipeline_response, deserialized, {}) return deserialized + create.metadata = {'url': '/indexers'} # type: ignore + + @distributed_trace_async async def get_status( self, indexer_name: str, @@ -556,33 +562,22 @@ async def get_status( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get_status.metadata['url'] # type: ignore + request = build_get_status_request( + indexer_name=indexer_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get_status.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.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') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -596,4 +591,6 @@ async def get_status( return cls(pipeline_response, deserialized, {}) return deserialized + 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 55cce44a9091..b392a4a7e928 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 @@ -5,15 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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, HttpRequest +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 ...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]] @@ -40,6 +45,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def create( self, index: "_models.SearchIndex", @@ -62,37 +68,26 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore + json = self._serialize.body(index, 'SearchIndex') + + request = build_create_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.create.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: @@ -106,8 +101,11 @@ async def create( return cls(pipeline_response, deserialized, {}) return deserialized + create.metadata = {'url': '/indexes'} # type: ignore + + @distributed_trace def list( self, select: Optional[str] = None, @@ -124,7 +122,8 @@ 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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ListIndexesResult"] @@ -132,46 +131,45 @@ def list( 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 = "2021-04-30-Preview" - 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: - # Construct URL - url = self.list.metadata['url'] # type: ignore + _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( + select=select, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.list.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] + _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( + select=select, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=next_link, + )._to_pipeline_transport_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), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) + request.method = "GET" 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) @@ -184,17 +182,19 @@ async def get_next(next_link=None): 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, response) raise HttpResponseError(response=response, model=error) return pipeline_response + return AsyncItemPaged( get_next, extract_data ) list.metadata = {'url': '/indexes'} # type: ignore + @distributed_trace_async async def create_or_update( self, index_name: str, @@ -235,46 +235,30 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - prefer = "return=representation" - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + json = self._serialize.body(index, 'SearchIndex') + + request = build_create_or_update_request( + index_name=index_name, + content_type=content_type, + 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, + json=json, + template_url=self.create_or_update.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexName': self._serialize.url("index_name", index_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -292,8 +276,11 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore + + @distributed_trace_async async def delete( self, index_name: str, @@ -326,37 +313,24 @@ async def delete( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.delete.metadata['url'] # type: ignore + request = build_delete_request( + index_name=index_name, + 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'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexName': self._serialize.url("index_name", index_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -369,6 +343,8 @@ async def delete( delete.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore + + @distributed_trace_async async def get( self, index_name: str, @@ -391,33 +367,22 @@ async def get( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore + request = build_get_request( + index_name=index_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexName': self._serialize.url("index_name", index_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.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') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -431,8 +396,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore + + @distributed_trace_async async def get_statistics( self, index_name: str, @@ -455,33 +423,22 @@ async def get_statistics( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get_statistics.metadata['url'] # type: ignore + request = build_get_statistics_request( + index_name=index_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get_statistics.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexName': self._serialize.url("index_name", index_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.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') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -495,8 +452,11 @@ async def get_statistics( return cls(pipeline_response, deserialized, {}) return deserialized + get_statistics.metadata = {'url': '/indexes(\'{indexName}\')/search.stats'} # type: ignore + + @distributed_trace_async async def analyze( self, index_name: str, @@ -522,38 +482,27 @@ async def analyze( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.analyze.metadata['url'] # type: ignore + json = self._serialize.body(request, 'AnalyzeRequest') + + request = build_analyze_request( + index_name=index_name, + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.analyze.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexName': self._serialize.url("index_name", index_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -567,4 +516,6 @@ async def analyze( return cls(pipeline_response, deserialized, {}) return deserialized + 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 08508229fda0..259e7f045d3c 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 @@ -5,20 +5,25 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models +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, @@ -38,32 +43,21 @@ async def get_service_statistics( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get_service_statistics.metadata['url'] # type: ignore + request = build_get_service_statistics_request( + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get_service_statistics.metadata['url'], + )._to_pipeline_transport_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), } - 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') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -77,4 +71,6 @@ async def get_service_statistics( return cls(pipeline_response, deserialized, {}) return deserialized + 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 b210122b0551..23db88c2f37a 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 @@ -5,14 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models +from ...operations._skillsets_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]] @@ -39,6 +43,7 @@ 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, @@ -80,48 +85,31 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - prefer = "return=representation" - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + json = self._serialize.body(skillset, 'SearchIndexerSkillset') + + request = build_create_or_update_request( + skillset_name=skillset_name, + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + if_match=if_match, + if_none_match=if_none_match, + disable_cache_reprocessing_change_detection=disable_cache_reprocessing_change_detection, + ignore_reset_requirements=ignore_reset_requirements, + json=json, + template_url=self.create_or_update.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'skillsetName': self._serialize.url("skillset_name", skillset_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') - if disable_cache_reprocessing_change_detection is not None: - query_parameters['disableCacheReprocessingChangeDetection'] = self._serialize.query("disable_cache_reprocessing_change_detection", disable_cache_reprocessing_change_detection, 'bool') - if ignore_reset_requirements is not None: - query_parameters['ignoreResetRequirements'] = self._serialize.query("ignore_reset_requirements", ignore_reset_requirements, 'bool') - - # 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -139,8 +127,11 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/skillsets(\'{skillsetName}\')'} # type: ignore + + @distributed_trace_async async def delete( self, skillset_name: str, @@ -171,37 +162,24 @@ async def delete( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.delete.metadata['url'] # type: ignore + request = build_delete_request( + skillset_name=skillset_name, + 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'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'skillsetName': self._serialize.url("skillset_name", skillset_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -214,6 +192,8 @@ async def delete( delete.metadata = {'url': '/skillsets(\'{skillsetName}\')'} # type: ignore + + @distributed_trace_async async def get( self, skillset_name: str, @@ -236,33 +216,22 @@ async def get( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore + request = build_get_request( + skillset_name=skillset_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'skillsetName': self._serialize.url("skillset_name", skillset_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -276,8 +245,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/skillsets(\'{skillsetName}\')'} # type: ignore + + @distributed_trace_async async def list( self, select: Optional[str] = None, @@ -302,34 +274,22 @@ async def list( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.list.metadata['url'] # type: ignore + request = build_list_request( + select=select, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.list.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -343,8 +303,11 @@ async def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/skillsets'} # type: ignore + + @distributed_trace_async async def create( self, skillset: "_models.SearchIndexerSkillset", @@ -367,37 +330,26 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore + json = self._serialize.body(skillset, 'SearchIndexerSkillset') + + request = build_create_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.create.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: @@ -411,4 +363,6 @@ async def create( return cls(pipeline_response, deserialized, {}) return deserialized + 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 6d1827258fcf..78036d8873d1 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 @@ -5,14 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools 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, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models +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]] @@ -39,6 +43,7 @@ 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, @@ -72,44 +77,29 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - prefer = "return=representation" - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + json = self._serialize.body(synonym_map, 'SynonymMap') + + request = build_create_or_update_request( + synonym_map_name=synonym_map_name, + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + if_match=if_match, + if_none_match=if_none_match, + json=json, + template_url=self.create_or_update.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - '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'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -127,8 +117,11 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/synonymmaps(\'{synonymMapName}\')'} # type: ignore + + @distributed_trace_async async def delete( self, synonym_map_name: str, @@ -159,37 +152,24 @@ async def delete( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.delete.metadata['url'] # type: ignore + request = build_delete_request( + synonym_map_name=synonym_map_name, + 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'], + )._to_pipeline_transport_request() path_format_arguments = { - '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'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -202,6 +182,8 @@ async def delete( delete.metadata = {'url': '/synonymmaps(\'{synonymMapName}\')'} # type: ignore + + @distributed_trace_async async def get( self, synonym_map_name: str, @@ -224,33 +206,22 @@ async def get( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore + request = build_get_request( + synonym_map_name=synonym_map_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - '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'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -264,8 +235,11 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/synonymmaps(\'{synonymMapName}\')'} # type: ignore + + @distributed_trace_async async def list( self, select: Optional[str] = None, @@ -290,34 +264,22 @@ async def list( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.list.metadata['url'] # type: ignore + request = build_list_request( + select=select, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.list.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -331,8 +293,11 @@ async def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/synonymmaps'} # type: ignore + + @distributed_trace_async async def create( self, synonym_map: "_models.SynonymMap", @@ -355,37 +320,26 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore + json = self._serialize.body(synonym_map, 'SynonymMap') + + request = build_create_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.create.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: @@ -399,4 +353,6 @@ async def create( return cls(pipeline_response, deserialized, {}) return deserialized + 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 5e744c700cb1..c358e0dbef5a 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 @@ -49,6 +49,7 @@ 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 @@ -86,6 +87,7 @@ from ._models_py3 import OutputFieldMappingEntry from ._models_py3 import PIIDetectionSkill from ._models_py3 import PathHierarchyTokenizerV2 + from ._models_py3 import Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema from ._models_py3 import PatternAnalyzer from ._models_py3 import PatternCaptureTokenFilter from ._models_py3 import PatternReplaceCharFilter @@ -192,6 +194,7 @@ 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 @@ -229,6 +232,7 @@ from ._models import OutputFieldMappingEntry # type: ignore from ._models import PIIDetectionSkill # type: ignore from ._models import PathHierarchyTokenizerV2 # type: ignore + from ._models import Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema # type: ignore from ._models import PatternAnalyzer # type: ignore from ._models import PatternCaptureTokenFilter # type: ignore from ._models import PatternReplaceCharFilter # type: ignore @@ -308,7 +312,9 @@ ImageDetail, IndexerExecutionEnvironment, IndexerExecutionStatus, + IndexerExecutionStatusDetail, IndexerStatus, + IndexingMode, KeyPhraseExtractionSkillLanguage, LexicalAnalyzerName, LexicalNormalizerName, @@ -379,6 +385,7 @@ 'GetIndexStatisticsResult', 'HighWaterMarkChangeDetectionPolicy', 'ImageAnalysisSkill', + 'IndexerCurrentState', 'IndexerExecutionResult', 'IndexingParameters', 'IndexingParametersConfiguration', @@ -416,6 +423,7 @@ 'OutputFieldMappingEntry', 'PIIDetectionSkill', 'PathHierarchyTokenizerV2', + 'Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema', 'PatternAnalyzer', 'PatternCaptureTokenFilter', 'PatternReplaceCharFilter', @@ -493,7 +501,9 @@ 'ImageDetail', 'IndexerExecutionEnvironment', 'IndexerExecutionStatus', + 'IndexerExecutionStatusDetail', 'IndexerStatus', + 'IndexingMode', 'KeyPhraseExtractionSkillLanguage', 'LexicalAnalyzerName', 'LexicalNormalizerName', 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 158157428cc7..a4a0654cb0cc 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 @@ -60,9 +60,9 @@ class AnalyzeRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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. Possible values + :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", @@ -80,19 +80,20 @@ class AnalyzeRequest(msrest.serialization.Model): "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. Possible values + :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". - :type tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName - :param normalizer: The name of the normalizer to use to normalize the given text. Possible + :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". - :type normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :param token_filters: An optional list of token 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. - :type char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] + :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] """ _validation = { @@ -126,8 +127,9 @@ class AnalyzeResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param tokens: Required. The list of tokens returned by the analyzer specified in the request. - :type tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo] + :keyword tokens: Required. The list of tokens returned by the analyzer specified in the + request. + :paramtype tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo] """ _validation = { @@ -154,13 +156,13 @@ class TokenFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str + :paramtype name: str """ _validation = { @@ -191,16 +193,16 @@ class AsciiFoldingTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param preserve_original: A value indicating whether the original token will be kept. Default + :paramtype name: str + :keyword preserve_original: A value indicating whether the original token will be kept. Default is false. - :type preserve_original: bool + :paramtype preserve_original: bool """ _validation = { @@ -228,12 +230,12 @@ class AzureActiveDirectoryApplicationCredentials(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param application_id: Required. An AAD Application ID that was granted the required access + :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. - :type application_id: str - :param application_secret: The authentication key of the specified AAD application. - :type application_secret: str + :paramtype application_id: str + :keyword application_secret: The authentication key of the specified AAD application. + :paramtype application_secret: str """ _validation = { @@ -262,8 +264,8 @@ class Similarity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Constant filled by server. - :type odata_type: str + :keyword odata_type: Required. Constant filled by server. + :paramtype odata_type: str """ _validation = { @@ -291,16 +293,16 @@ class BM25Similarity(Similarity): All required parameters must be populated in order to send to Azure. - :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 + :keyword odata_type: Required. Constant filled by server. + :paramtype odata_type: str + :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. - :type k1: float - :param b: This property controls how the length of a document affects the relevance score. By + :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. - :type b: float + :paramtype b: float """ _validation = { @@ -331,13 +333,13 @@ class CharFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the char filter.Constant filled by - server. - :type odata_type: str - :param name: Required. The name of the char filter. It must only contain letters, digits, + :keyword odata_type: Required. Identifies the concrete type of the char filter.Constant filled + by server. + :paramtype odata_type: str + :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. - :type name: str + :paramtype name: str """ _validation = { @@ -368,19 +370,19 @@ class CjkBigramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param ignore_scripts: The scripts to ignore. - :type ignore_scripts: list[str or + :paramtype name: str + :keyword ignore_scripts: The scripts to ignore. + :paramtype ignore_scripts: list[str or ~azure.search.documents.indexes.models.CjkBigramTokenFilterScripts] - :param output_unigrams: A value indicating whether to output both unigrams and bigrams (if + :keyword output_unigrams: A value indicating whether to output both unigrams and bigrams (if true), or just bigrams (if false). Default is false. - :type output_unigrams: bool + :paramtype output_unigrams: bool """ _validation = { @@ -410,8 +412,8 @@ class ClassicSimilarity(Similarity): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Constant filled by server. - :type odata_type: str + :keyword odata_type: Required. Constant filled by server. + :paramtype odata_type: str """ _validation = { @@ -438,13 +440,13 @@ class LexicalTokenizer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str + :paramtype odata_type: str + :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 """ _validation = { @@ -475,16 +477,16 @@ class ClassicTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Default is 255. Tokens longer than the + :paramtype odata_type: str + :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. - :type max_token_length: int + :paramtype max_token_length: int """ _validation = { @@ -516,11 +518,11 @@ class CognitiveServicesAccount(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the cognitive service resource + :keyword odata_type: Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server. - :type odata_type: str - :param description: Description of the cognitive service resource attached to a skillset. - :type description: str + :paramtype odata_type: str + :keyword description: Description of the cognitive service resource attached to a skillset. + :paramtype description: str """ _validation = { @@ -550,14 +552,14 @@ class CognitiveServicesAccountKey(CognitiveServicesAccount): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the cognitive service resource + :keyword odata_type: Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server. - :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 + :paramtype odata_type: str + :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. - :type key: str + :paramtype key: str """ _validation = { @@ -585,22 +587,22 @@ class CommonGramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type ignore_case: bool - :param use_query_mode: A value that indicates whether the token filter is in query mode. When + :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. - :type use_query_mode: bool + :paramtype use_query_mode: bool """ _validation = { @@ -636,25 +638,26 @@ class SearchIndexerSkill(msrest.serialization.Model): 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 + :keyword 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 + :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 '#'. - :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] + :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] """ _validation = { @@ -694,25 +697,26 @@ class ConditionalSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] + :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] """ _validation = { @@ -743,14 +747,14 @@ class CorsOptions(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param allowed_origins: Required. The list of origins from which JavaScript code will be + :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). - :type allowed_origins: list[str] - :param max_age_in_seconds: The duration for which browsers should cache CORS preflight + :paramtype allowed_origins: list[str] + :keyword max_age_in_seconds: The duration for which browsers should cache CORS preflight responses. Defaults to 5 minutes. - :type max_age_in_seconds: long + :paramtype max_age_in_seconds: long """ _validation = { @@ -779,13 +783,13 @@ class LexicalAnalyzer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :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. - :type name: str + :paramtype odata_type: str + :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 """ _validation = { @@ -816,27 +820,27 @@ class CustomAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :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. - :type name: str - :param tokenizer: Required. The name of the tokenizer to use to divide continuous text into a + :paramtype odata_type: str + :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". - :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. - :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 + :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. - :type char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] + :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] """ _validation = { @@ -869,51 +873,51 @@ class CustomEntity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The top-level entity descriptor. Matches in the skill output will be + :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. - :type name: str - :param description: This field can be used as a passthrough for custom metadata about the + :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. - :type description: str - :param type: This field can be used as a passthrough for custom metadata about the matched + :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. - :type type: str - :param subtype: This field can be used as a passthrough for custom metadata about the matched + :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. - :type subtype: str - :param id: This field can be used as a passthrough for custom metadata about the matched + :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. - :type id: str - :param case_sensitive: Defaults to false. Boolean value denoting whether comparisons with the + :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. - :type case_sensitive: bool - :param accent_sensitive: Defaults to false. Boolean value denoting whether comparisons with the - entity name should be sensitive to accent. - :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 + :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. - :type fuzzy_edit_distance: int - :param default_case_sensitive: Changes the default case sensitivity value for this entity. It + :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. - :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. - :type default_accent_sensitive: bool - :param default_fuzzy_edit_distance: Changes the default fuzzy edit distance value for this + :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. - :type default_fuzzy_edit_distance: int - :param aliases: An array of complex objects that can be used to specify alternative spellings + :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. - :type aliases: list[~azure.search.documents.indexes.models.CustomEntityAlias] + :paramtype aliases: list[~azure.search.documents.indexes.models.CustomEntityAlias] """ _validation = { @@ -959,14 +963,14 @@ class CustomEntityAlias(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -996,45 +1000,47 @@ class CustomEntityLookupSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. + :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". - :type default_language_code: str or + :paramtype default_language_code: str or ~azure.search.documents.indexes.models.CustomEntityLookupSkillLanguage - :param entities_definition_uri: Path to a JSON or CSV file containing all the target text to + :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. - :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. - :type global_default_case_sensitive: bool - :param global_default_accent_sensitive: A global flag for AccentSensitive. If AccentSensitive + :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. - :type global_default_accent_sensitive: bool - :param global_default_fuzzy_edit_distance: A global flag for FuzzyEditDistance. If + :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. - :type global_default_fuzzy_edit_distance: int + :paramtype global_default_fuzzy_edit_distance: int """ _validation = { @@ -1077,13 +1083,13 @@ class LexicalNormalizer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the normalizer. - :type odata_type: str - :param name: Required. The name of the normalizer. It must only contain letters, digits, + :keyword odata_type: Required. Identifies the concrete type of the normalizer. + :paramtype odata_type: str + :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'. - :type name: str + :paramtype name: str """ _validation = { @@ -1110,21 +1116,21 @@ class CustomNormalizer(LexicalNormalizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the normalizer. - :type odata_type: str - :param name: Required. The name of the normalizer. It must only contain letters, digits, + :keyword odata_type: Required. Identifies the concrete type of the normalizer. + :paramtype odata_type: str + :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'. - :type name: str - :param 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 + :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. - :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 + :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. - :type char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] + :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] """ _validation = { @@ -1156,9 +1162,9 @@ class DataChangeDetectionPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the data change detection + :keyword odata_type: Required. Identifies the concrete type of the data change detection policy.Constant filled by server. - :type odata_type: str + :paramtype odata_type: str """ _validation = { @@ -1189,9 +1195,9 @@ class DataDeletionDetectionPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the data deletion detection + :keyword odata_type: Required. Identifies the concrete type of the data deletion detection policy.Constant filled by server. - :type odata_type: str + :paramtype odata_type: str """ _validation = { @@ -1217,9 +1223,9 @@ def __init__( class DataSourceCredentials(msrest.serialization.Model): """Represents credentials that can be used to connect to a datasource. - :param connection_string: The connection string for the datasource. Set to + :keyword connection_string: The connection string for the datasource. Set to ':code:``' if you do not want the connection string updated. - :type connection_string: str + :paramtype connection_string: str """ _attribute_map = { @@ -1239,11 +1245,11 @@ class DefaultCognitiveServicesAccount(CognitiveServicesAccount): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the cognitive service resource + :keyword odata_type: Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server. - :type odata_type: str - :param description: Description of the cognitive service resource attached to a skillset. - :type description: str + :paramtype odata_type: str + :keyword description: Description of the cognitive service resource attached to a skillset. + :paramtype description: str """ _validation = { @@ -1268,27 +1274,27 @@ class DictionaryDecompounderTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type min_word_size: int - :param min_subword_size: The minimum subword size. Only subwords longer than this are + :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. - :type min_subword_size: int - :param max_subword_size: The maximum subword size. Only subwords shorter than this are + :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. - :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. - :type only_longest_match: bool + :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 """ _validation = { @@ -1331,18 +1337,19 @@ class ScoringFunction(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Indicates the type of function to use. Valid values include magnitude, + :keyword 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. - :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. - :type boost: float - :param interpolation: A value indicating how boosting will be interpolated across document + :paramtype type: str + :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". - :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation + :paramtype interpolation: str or + ~azure.search.documents.indexes.models.ScoringFunctionInterpolation """ _validation = { @@ -1378,20 +1385,21 @@ class DistanceScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :param type: Required. Indicates the type of function to use. Valid values include magnitude, + :keyword 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. - :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. - :type boost: float - :param interpolation: A value indicating how boosting will be interpolated across document + :paramtype type: str + :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". - :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 + :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 """ _validation = { @@ -1423,12 +1431,12 @@ class DistanceScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param reference_point_parameter: Required. The name of the parameter passed in search queries - to specify the reference location. - :type reference_point_parameter: str - :param boosting_distance: Required. The distance in kilometers from the reference location + :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. - :type boosting_distance: float + :paramtype boosting_distance: float """ _validation = { @@ -1455,32 +1463,33 @@ class DocumentExtractionSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :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 + :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. - :type data_to_extract: str - :param configuration: A dictionary of configurations for the skill. - :type configuration: dict[str, any] + :paramtype data_to_extract: str + :keyword configuration: A dictionary of configurations for the skill. + :paramtype configuration: dict[str, any] """ _validation = { @@ -1517,21 +1526,21 @@ class EdgeNGramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param min_gram: The minimum n-gram length. Default is 1. Must be less than the value of + :paramtype name: str + :keyword min_gram: The minimum n-gram length. Default is 1. Must be less than the value of maxGram. - :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". - :type side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide + :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 """ _validation = { @@ -1563,21 +1572,21 @@ class EdgeNGramTokenFilterV2(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :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". - :type side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide + :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 """ _validation = { @@ -1611,20 +1620,20 @@ class EdgeNGramTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :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. - :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] + :paramtype odata_type: str + :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] """ _validation = { @@ -1658,15 +1667,15 @@ class ElisionTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param articles: The set of articles to remove. - :type articles: list[str] + :paramtype name: str + :keyword articles: The set of articles to remove. + :paramtype articles: list[str] """ _validation = { @@ -1694,35 +1703,36 @@ class EntityLinkingSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. - :type default_language_code: str - :param minimum_precision: A value between 0 and 1 that be used to only include entities whose + :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. - :type minimum_precision: float - :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. - :type model_version: str + :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 """ _validation = { @@ -1760,41 +1770,42 @@ class EntityRecognitionSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :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. + :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". - :type default_language_code: str or + :paramtype default_language_code: str or ~azure.search.documents.indexes.models.EntityRecognitionSkillLanguage - :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. - :type include_typeless_entities: bool - :param minimum_precision: A value between 0 and 1 that be used to only include entities whose + :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. - :type minimum_precision: float + :paramtype minimum_precision: float """ _validation = { @@ -1833,37 +1844,38 @@ class EntityRecognitionSkillV3(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param categories: A list of entity categories that should be extracted. - :type categories: list[str] - :param default_language_code: A value indicating which language code to use. Default is en. - :type default_language_code: str - :param minimum_precision: A value between 0 and 1 that be used to only include entities whose + :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. - :type minimum_precision: float - :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. - :type model_version: str + :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 """ _validation = { @@ -1903,13 +1915,13 @@ class FieldMapping(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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. - :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 + :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 """ _validation = { @@ -1937,11 +1949,11 @@ class FieldMappingFunction(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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. - :type parameters: dict[str, any] + :paramtype parameters: dict[str, any] """ _validation = { @@ -1967,20 +1979,21 @@ class FreshnessScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :param type: Required. Indicates the type of function to use. Valid values include magnitude, + :keyword 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. - :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. - :type boost: float - :param interpolation: A value indicating how boosting will be interpolated across document + :paramtype type: str + :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". - :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 + :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 """ _validation = { @@ -2012,9 +2025,9 @@ class FreshnessScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param boosting_duration: Required. The expiration period after which boosting will stop for a - particular document. - :type boosting_duration: ~datetime.timedelta + :keyword boosting_duration: Required. The expiration period after which boosting will stop for + a particular document. + :paramtype boosting_duration: ~datetime.timedelta """ _validation = { @@ -2070,11 +2083,11 @@ class HighWaterMarkChangeDetectionPolicy(DataChangeDetectionPolicy): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the data change detection + :keyword odata_type: Required. Identifies the concrete type of the data change detection policy.Constant filled by server. - :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 + :paramtype odata_type: str + :keyword high_water_mark_column_name: Required. The name of the high water mark column. + :paramtype high_water_mark_column_name: str """ _validation = { @@ -2101,33 +2114,34 @@ class ImageAnalysisSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. + :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". - :type default_language_code: str or + :paramtype default_language_code: str or ~azure.search.documents.indexes.models.ImageAnalysisSkillLanguage - :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] + :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] """ _validation = { @@ -2159,6 +2173,70 @@ 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. @@ -2169,6 +2247,13 @@ 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. @@ -2194,6 +2279,8 @@ 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}, @@ -2207,6 +2294,8 @@ 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'}, @@ -2224,6 +2313,8 @@ def __init__( ): 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 @@ -2238,18 +2329,19 @@ def __init__( class IndexingParameters(msrest.serialization.Model): """Represents parameters for indexer execution. - :param batch_size: The number of items that are read from the data source and indexed as a + :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. - :type batch_size: int - :param max_failed_items: The maximum number of items that can fail indexing for indexer + :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. - :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. - :type max_failed_items_per_batch: int - :param configuration: A dictionary of indexer-specific configuration properties. Each name is + :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. - :type configuration: ~azure.search.documents.indexes.models.IndexingParametersConfiguration + :paramtype configuration: + ~azure.search.documents.indexes.models.IndexingParametersConfiguration """ _attribute_map = { @@ -2273,72 +2365,73 @@ 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. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] - :param parsing_mode: Represents the parsing mode for indexing from an Azure blob data source. + :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". - :type parsing_mode: str or ~azure.search.documents.indexes.models.BlobIndexerParsingMode - :param excluded_file_name_extensions: Comma-delimited list of filename extensions to ignore + :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. - :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 + :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. - :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. - :type fail_on_unsupported_content_type: bool - :param fail_on_unprocessable_document: For Azure blobs, set to false if you want to continue + :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. - :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. + :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. - :type index_storage_metadata_only_for_oversized_documents: bool - :param delimited_text_headers: For CSV blobs, specifies a comma-delimited list of column + :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. - :type delimited_text_headers: str - :param delimited_text_delimiter: For CSV blobs, specifies the end-of-line single-character + :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, "|"). - :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. - :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. - :type document_root: str - :param data_to_extract: Specifies the data to extract from Azure blob storage and tells the + :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". - :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 + :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". - :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 + :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. - :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". - :type pdf_text_rotation_algorithm: str or + :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 - :param execution_environment: Specifies the environment in which the indexer should execute. + :keyword execution_environment: Specifies the environment in which the indexer should execute. Possible values include: "standard", "private". Default value: "standard". - :type execution_environment: str or + :paramtype execution_environment: str or ~azure.search.documents.indexes.models.IndexerExecutionEnvironment - :param query_timeout: Increases the timeout beyond the 5-minute default for Azure SQL database - data sources, specified in the format "hh:mm:ss". - :type query_timeout: str + :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 """ _attribute_map = { @@ -2390,10 +2483,10 @@ class IndexingSchedule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -2419,14 +2512,14 @@ class InputFieldMappingEntry(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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] + :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] """ _validation = { @@ -2456,18 +2549,18 @@ class KeepTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type lower_case_keep_words: bool + :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 """ _validation = { @@ -2498,37 +2591,38 @@ class KeyPhraseExtractionSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. + :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". - :type default_language_code: str or + :paramtype default_language_code: str or ~azure.search.documents.indexes.models.KeyPhraseExtractionSkillLanguage - :param max_key_phrase_count: A number indicating how many key phrases to return. If absent, all - identified key phrases will be returned. - :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. - :type model_version: str + :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 """ _validation = { @@ -2565,18 +2659,18 @@ class KeywordMarkerTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type ignore_case: bool + :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 """ _validation = { @@ -2607,15 +2701,15 @@ class KeywordTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param buffer_size: The read buffer size in bytes. Default is 256. - :type buffer_size: int + :paramtype odata_type: str + :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 """ _validation = { @@ -2643,16 +2737,16 @@ class KeywordTokenizerV2(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Default is 256. Tokens longer than the + :paramtype odata_type: str + :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. - :type max_token_length: int + :paramtype max_token_length: int """ _validation = { @@ -2681,32 +2775,33 @@ class LanguageDetectionSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_country_hint: A country code to use as a hint to the language detection model if - it cannot disambiguate the language. - :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. - :type model_version: str + :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 """ _validation = { @@ -2741,18 +2836,18 @@ class LengthTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type min_length: int - :param max_length: The maximum length in characters. Default and maximum is 300. - :type max_length: int + :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 """ _validation = { @@ -2784,18 +2879,18 @@ class LimitTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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 + :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. - :type consume_all_tokens: bool + :paramtype consume_all_tokens: bool """ _validation = { @@ -2960,18 +3055,18 @@ class LuceneStandardAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Default is 255. Tokens longer than the + :paramtype odata_type: str + :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. - :type max_token_length: int - :param stopwords: A list of stopwords. - :type stopwords: list[str] + :paramtype max_token_length: int + :keyword stopwords: A list of stopwords. + :paramtype stopwords: list[str] """ _validation = { @@ -3002,16 +3097,16 @@ class LuceneStandardTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Default is 255. Tokens longer than the + :paramtype odata_type: str + :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. - :type max_token_length: int + :paramtype max_token_length: int """ _validation = { @@ -3039,16 +3134,16 @@ class LuceneStandardTokenizerV2(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Default is 255. Tokens longer than the + :paramtype odata_type: str + :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. - :type max_token_length: int + :paramtype max_token_length: int """ _validation = { @@ -3077,20 +3172,21 @@ class MagnitudeScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :param type: Required. Indicates the type of function to use. Valid values include magnitude, + :keyword 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. - :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. - :type boost: float - :param interpolation: A value indicating how boosting will be interpolated across document + :paramtype type: str + :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". - :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 + :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 """ _validation = { @@ -3122,13 +3218,13 @@ class MagnitudeScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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. - :type should_boost_beyond_range_by_constant: bool + :paramtype should_boost_beyond_range_by_constant: bool """ _validation = { @@ -3157,16 +3253,16 @@ class MappingCharFilter(CharFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the char filter.Constant filled by - server. - :type odata_type: str - :param name: Required. The name of the char filter. It must only contain letters, digits, + :keyword odata_type: Required. Identifies the concrete type of the char filter.Constant filled + by server. + :paramtype odata_type: str + :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. - :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"). - :type mappings: list[str] + :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] """ _validation = { @@ -3195,31 +3291,32 @@ class MergeSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param insert_pre_tag: The tag indicates the start of the merged text. By default, the tag is + :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. - :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. - :type insert_post_tag: str + :paramtype insert_post_tag: str """ _validation = { @@ -3254,29 +3351,29 @@ class MicrosoftLanguageStemmingTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Tokens longer than the maximum length are + :paramtype odata_type: str + :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. - :type max_token_length: int - :param is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used + :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. - :type is_search_tokenizer: bool - :param language: The language to use. The default is English. Possible values include: + :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". - :type language: str or + :paramtype language: str or ~azure.search.documents.indexes.models.MicrosoftStemmingTokenizerLanguage """ @@ -3310,29 +3407,29 @@ class MicrosoftLanguageTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Tokens longer than the maximum length are + :paramtype odata_type: str + :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. - :type max_token_length: int - :param is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used + :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. - :type is_search_tokenizer: bool - :param language: The language to use. The default is English. Possible values include: + :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". - :type language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage + :paramtype language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage """ _validation = { @@ -3365,18 +3462,18 @@ class NGramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param min_gram: The minimum n-gram length. Default is 1. Must be less than the value of + :paramtype name: str + :keyword min_gram: The minimum n-gram length. Default is 1. Must be less than the value of maxGram. - :type min_gram: int - :param max_gram: The maximum n-gram length. Default is 2. - :type max_gram: int + :paramtype min_gram: int + :keyword max_gram: The maximum n-gram length. Default is 2. + :paramtype max_gram: int """ _validation = { @@ -3406,18 +3503,18 @@ class NGramTokenFilterV2(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type min_gram: int - :param max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :type max_gram: int + :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 """ _validation = { @@ -3449,20 +3546,20 @@ class NGramTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :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. - :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] + :paramtype odata_type: str + :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] """ _validation = { @@ -3496,37 +3593,39 @@ class OcrSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. + :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". - :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. + :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. - :type should_detect_orientation: bool - :param line_ending: Defines the sequence of characters to use between the lines of text + :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". - :type line_ending: str or ~azure.search.documents.indexes.models.LineEnding + :paramtype line_ending: str or ~azure.search.documents.indexes.models.LineEnding """ _validation = { @@ -3563,10 +3662,10 @@ class OutputFieldMappingEntry(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -3592,24 +3691,24 @@ class PathHierarchyTokenizerV2(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :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. + :paramtype odata_type: str + :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. - :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 + :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 """ _validation = { @@ -3641,29 +3740,52 @@ def __init__( self.number_of_tokens_to_skip = kwargs.get('number_of_tokens_to_skip', 0) +class Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema(msrest.serialization.Model): + """Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema. + + :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] + """ + + _attribute_map = { + 'document_keys': {'key': 'documentKeys', 'type': '[str]'}, + 'datasource_document_ids': {'key': 'datasourceDocumentIds', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema, self).__init__(**kwargs) + self.document_keys = kwargs.get('document_keys', None) + self.datasource_document_ids = kwargs.get('datasource_document_ids', None) + + class PatternAnalyzer(LexicalAnalyzer): """Flexibly separates text into terms via a regular expression pattern. This analyzer is implemented using Apache Lucene. All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :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. - :type name: str - :param lower_case_terms: A value indicating whether terms should be lower-cased. Default is + :paramtype odata_type: str + :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. - :type lower_case_terms: bool - :param pattern: A regular expression pattern to match token separators. Default is an + :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. - :type pattern: str - :param flags: Regular expression flags. Possible values include: "CANON_EQ", + :paramtype pattern: str + :keyword 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] + :paramtype flags: str or ~azure.search.documents.indexes.models.RegexFlags + :keyword stopwords: A list of stopwords. + :paramtype stopwords: list[str] """ _validation = { @@ -3697,18 +3819,18 @@ class PatternCaptureTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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 + :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. - :type preserve_original: bool + :paramtype preserve_original: bool """ _validation = { @@ -3739,17 +3861,17 @@ class PatternReplaceCharFilter(CharFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the char filter.Constant filled by - server. - :type odata_type: str - :param name: Required. The name of the char filter. It must only contain letters, digits, + :keyword odata_type: Required. Identifies the concrete type of the char filter.Constant filled + by server. + :paramtype odata_type: str + :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. - :type name: str - :param pattern: Required. A regular expression pattern. - :type pattern: str - :param replacement: Required. The replacement text. - :type replacement: str + :paramtype name: str + :keyword pattern: Required. A regular expression pattern. + :paramtype pattern: str + :keyword replacement: Required. The replacement text. + :paramtype replacement: str """ _validation = { @@ -3781,17 +3903,17 @@ class PatternReplaceTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param pattern: Required. A regular expression pattern. - :type pattern: str - :param replacement: Required. The replacement text. - :type replacement: str + :paramtype name: str + :keyword pattern: Required. A regular expression pattern. + :paramtype pattern: str + :keyword replacement: Required. The replacement text. + :paramtype replacement: str """ _validation = { @@ -3823,23 +3945,23 @@ class PatternTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param pattern: A regular expression pattern to match token separators. Default is an + :paramtype odata_type: str + :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. - :type pattern: str - :param flags: Regular expression flags. Possible values include: "CANON_EQ", + :paramtype pattern: str + :keyword 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 + :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. - :type group: int + :paramtype group: int """ _validation = { @@ -3871,20 +3993,20 @@ class PhoneticTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param encoder: The phonetic encoder to use. Default is "metaphone". Possible values include: + :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". - :type encoder: str or ~azure.search.documents.indexes.models.PhoneticEncoder - :param replace_original_tokens: A value indicating whether encoded tokens should replace + :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. - :type replace_original_tokens: bool + :paramtype replace_original_tokens: bool """ _validation = { @@ -3914,46 +4036,48 @@ class PIIDetectionSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. - :type default_language_code: str - :param minimum_precision: A value between 0 and 1 that be used to only include entities whose + :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. - :type minimum_precision: float - :param masking_mode: A parameter that provides various ways to mask the personal information + :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". - :type masking_mode: str or ~azure.search.documents.indexes.models.PIIDetectionSkillMaskingMode - :param masking_character: The character used to mask the text if the maskingMode parameter is + :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 '*'. - :type masking_character: 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. - :type model_version: str - :param pii_categories: A list of PII entity categories that should be extracted and masked. - :type pii_categories: list[str] - :param domain: If specified, will set the PII domain to include only a subset of the entity + :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'. - :type domain: str + :paramtype domain: str """ _validation = { @@ -3998,8 +4122,8 @@ def __init__( class RequestOptions(msrest.serialization.Model): """Parameter group. - :param x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :type x_ms_client_request_id: str + :keyword x_ms_client_request_id: The tracking ID sent with the request to help with debugging. + :paramtype x_ms_client_request_id: str """ _attribute_map = { @@ -4019,10 +4143,10 @@ class ResourceCounter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param usage: Required. The resource usage amount. - :type usage: long - :param quota: The resource amount quota. - :type quota: long + :keyword usage: Required. The resource usage amount. + :paramtype usage: long + :keyword quota: The resource amount quota. + :paramtype quota: long """ _validation = { @@ -4048,17 +4172,17 @@ class ScoringProfile(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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. - :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". - :type function_aggregation: str or + :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 """ @@ -4126,43 +4250,43 @@ class SearchField(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the field, which must be unique within the fields collection - of the index or parent field. - :type name: str - :param type: Required. The data type of the field. Possible values include: "Edm.String", + :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". - :type type: str or ~azure.search.documents.indexes.models.SearchFieldDataType - :param key: A value indicating whether the field uniquely identifies documents in the index. + :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. - :type key: bool - :param retrievable: A value indicating whether the field can be returned in a search result. + :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. - :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 + :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. - :type searchable: bool - :param filterable: A value indicating whether to enable the field to be referenced in $filter + :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. - :type filterable: bool - :param sortable: A value indicating whether to enable the field to be referenced in $orderby + :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 @@ -4172,15 +4296,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. - :type sortable: bool - :param facetable: A value indicating whether to enable the field to be referenced in facet + :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. - :type facetable: bool - :param analyzer: The name of the analyzer to use for the field. This option can be used only + :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", @@ -4200,11 +4324,11 @@ 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". - :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 + :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", @@ -4223,8 +4347,8 @@ 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". - :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 + :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 @@ -4246,21 +4370,21 @@ 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". - :type index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :param normalizer: The name of the normalizer to use for the field. This option can be used + :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". - :type normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :param synonym_maps: A list of the names of synonym maps to associate with this field. This + :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. - :type synonym_maps: list[str] - :param fields: A list of sub-fields if this is a field of type Edm.ComplexType or + :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. - :type fields: list[~azure.search.documents.indexes.models.SearchField] + :paramtype fields: list[~azure.search.documents.indexes.models.SearchField] """ _validation = { @@ -4311,31 +4435,31 @@ class SearchIndex(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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. - :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 normalizers: The normalizers for the index. - :type normalizers: list[~azure.search.documents.indexes.models.LexicalNormalizer] - :param encryption_key: A description of an encryption key that you create in Azure Key Vault. + :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 @@ -4343,14 +4467,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. - :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :param similarity: The type of similarity algorithm to be used when scoring and ranking the + :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. - :type similarity: ~azure.search.documents.indexes.models.Similarity - :param e_tag: The ETag of the index. - :type e_tag: str + :paramtype similarity: ~azure.search.documents.indexes.models.Similarity + :keyword e_tag: The ETag of the index. + :paramtype e_tag: str """ _validation = { @@ -4401,32 +4525,32 @@ class SearchIndexer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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. - :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 + :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. - :type field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] - :param output_field_mappings: Output field mappings are applied after enrichment and + :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. - :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. + :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 @@ -4435,10 +4559,10 @@ 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. - :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :param cache: Adds caching to an enrichment pipeline to allow for incremental modification + :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. - :type cache: ~azure.search.documents.indexes.models.SearchIndexerCache + :paramtype cache: ~azure.search.documents.indexes.models.SearchIndexerCache """ _validation = { @@ -4486,11 +4610,11 @@ def __init__( class SearchIndexerCache(msrest.serialization.Model): """SearchIndexerCache. - :param storage_connection_string: The connection string to the storage account where the cache - data will be persisted. - :type storage_connection_string: str - :param enable_reprocessing: Specifies whether incremental reprocessing is enabled. - :type enable_reprocessing: bool + :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 """ _attribute_map = { @@ -4512,12 +4636,12 @@ class SearchIndexerDataContainer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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. - :type name: str - :param query: A query that is applied to this data container. The syntax and meaning of this + :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. - :type query: str + :paramtype query: str """ _validation = { @@ -4546,9 +4670,9 @@ class SearchIndexerDataIdentity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the identity.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the identity.Constant filled by server. - :type odata_type: str + :paramtype odata_type: str """ _validation = { @@ -4576,9 +4700,9 @@ class SearchIndexerDataNoneIdentity(SearchIndexerDataIdentity): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the identity.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the identity.Constant filled by server. - :type odata_type: str + :paramtype odata_type: str """ _validation = { @@ -4602,31 +4726,31 @@ class SearchIndexerDataSource(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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", + :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". - :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 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. - :type identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity - :param data_change_detection_policy: The data change detection policy for the datasource. - :type data_change_detection_policy: + :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 - :param data_deletion_detection_policy: The data deletion detection policy for the datasource. - :type data_deletion_detection_policy: + :keyword data_deletion_detection_policy: The data deletion detection policy for the datasource. + :paramtype data_deletion_detection_policy: ~azure.search.documents.indexes.models.DataDeletionDetectionPolicy - :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. + :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 @@ -4635,7 +4759,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. - :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey """ _validation = { @@ -4680,14 +4804,14 @@ class SearchIndexerDataUserAssignedIdentity(SearchIndexerDataIdentity): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the identity.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the identity.Constant filled by server. - :type odata_type: str - :param user_assigned_identity: Required. The fully qualified Azure resource Id of a user + :paramtype odata_type: str + :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. - :type user_assigned_identity: str + :paramtype user_assigned_identity: str """ _validation = { @@ -4773,11 +4897,11 @@ class SearchIndexerKnowledgeStore(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param storage_connection_string: Required. The connection string to the storage account + :keyword storage_connection_string: Required. The connection string to the storage account projections will be stored in. - :type storage_connection_string: str - :param projections: Required. A list of additional projections to perform during indexing. - :type projections: + :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] """ @@ -4803,16 +4927,16 @@ def __init__( class SearchIndexerKnowledgeStoreProjectionSelector(msrest.serialization.Model): """Abstract class to share properties between concrete selectors. - :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] + :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] """ _attribute_map = { @@ -4840,18 +4964,18 @@ class SearchIndexerKnowledgeStoreBlobProjectionSelector(SearchIndexerKnowledgeSt All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -4880,18 +5004,18 @@ class SearchIndexerKnowledgeStoreFileProjectionSelector(SearchIndexerKnowledgeSt All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -4919,18 +5043,18 @@ class SearchIndexerKnowledgeStoreObjectProjectionSelector(SearchIndexerKnowledge All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -4956,14 +5080,14 @@ def __init__( class SearchIndexerKnowledgeStoreProjection(msrest.serialization.Model): """Container object for various projection selectors. - :param tables: Projections to Azure Table storage. - :type tables: + :keyword tables: Projections to Azure Table storage. + :paramtype tables: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreTableProjectionSelector] - :param objects: Projections to Azure Blob storage. - :type objects: + :keyword objects: Projections to Azure Blob storage. + :paramtype objects: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreObjectProjectionSelector] - :param files: Projections to Azure File storage. - :type files: + :keyword files: Projections to Azure File storage. + :paramtype files: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreFileProjectionSelector] """ @@ -4988,18 +5112,18 @@ class SearchIndexerKnowledgeStoreTableProjectionSelector(SearchIndexerKnowledgeS All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -5066,22 +5190,22 @@ class SearchIndexerSkillset(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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. - :type cognitive_services_account: + :paramtype cognitive_services_account: ~azure.search.documents.indexes.models.CognitiveServicesAccount - :param knowledge_store: Definition of additional projections to azure blob, table, or files, of - enriched data. - :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. + :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 @@ -5090,7 +5214,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. - :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey """ _validation = { @@ -5222,25 +5346,25 @@ class SearchResourceEncryptionKey(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param key_name: Required. The name of your Azure Key Vault key to be used to encrypt your data - at rest. - :type key_name: str - :param key_version: Required. The version of your Azure Key Vault key to be used to encrypt + :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. - :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 + :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. - :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. - :type access_credentials: + :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 - :param 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. - :type identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity + :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 """ _validation = { @@ -5274,29 +5398,30 @@ class SentimentSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. + :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". - :type default_language_code: str or + :paramtype default_language_code: str or ~azure.search.documents.indexes.models.SentimentSkillLanguage """ @@ -5330,35 +5455,36 @@ class SentimentSkillV3(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. - :type default_language_code: str - :param include_opinion_mining: If set to true, the skill output will include information from + :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. - :type include_opinion_mining: bool - :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. - :type model_version: str + :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 """ _validation = { @@ -5395,20 +5521,21 @@ class ServiceCounters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -5447,17 +5574,17 @@ def __init__( class ServiceLimits(msrest.serialization.Model): """Represents various service level limits. - :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. - :type max_field_nesting_depth_per_index: int - :param max_complex_collection_fields_per_index: The maximum number of fields of type + :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. - :type max_complex_collection_fields_per_index: int - :param max_complex_objects_in_collections_per_document: The maximum number of objects in + :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. - :type max_complex_objects_in_collections_per_document: int + :paramtype max_complex_objects_in_collections_per_document: int """ _attribute_map = { @@ -5483,10 +5610,10 @@ class ServiceStatistics(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -5513,25 +5640,26 @@ class ShaperSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] + :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] """ _validation = { @@ -5562,31 +5690,31 @@ class ShingleTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type min_shingle_size: int - :param output_unigrams: A value indicating whether the output stream will contain the input + :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. - :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. - :type output_unigrams_if_no_shingles: bool - :param token_separator: The string to use when joining adjacent tokens to form a shingle. + :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 (" "). - :type token_separator: str - :param filter_token: The string to insert for each position at which there is no token. Default - is an underscore ("_"). - :type filter_token: str + :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 """ _validation = { @@ -5626,18 +5754,18 @@ class SnowballTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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". - :type language: str or ~azure.search.documents.indexes.models.SnowballTokenFilterLanguage + :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 """ _validation = { @@ -5666,13 +5794,13 @@ class SoftDeleteColumnDeletionDetectionPolicy(DataDeletionDetectionPolicy): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the data deletion detection + :keyword odata_type: Required. Identifies the concrete type of the data deletion detection policy.Constant filled by server. - :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 + :paramtype odata_type: str + :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 """ _validation = { @@ -5700,33 +5828,35 @@ class SplitSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. + :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". - :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 + :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". - :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 + :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 """ _validation = { @@ -5763,9 +5893,9 @@ class SqlIntegratedChangeTrackingPolicy(DataChangeDetectionPolicy): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the data change detection + :keyword odata_type: Required. Identifies the concrete type of the data change detection policy.Constant filled by server. - :type odata_type: str + :paramtype odata_type: str """ _validation = { @@ -5789,16 +5919,16 @@ class StemmerOverrideTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param rules: Required. A list of stemming rules in the following format: "word => stem", for + :paramtype name: str + :keyword rules: Required. A list of stemming rules in the following format: "word => stem", for example: "ran => run". - :type rules: list[str] + :paramtype rules: list[str] """ _validation = { @@ -5827,23 +5957,23 @@ class StemmerTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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", + :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". - :type language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage + :paramtype language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage """ _validation = { @@ -5872,15 +6002,15 @@ class StopAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :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. - :type name: str - :param stopwords: A list of stopwords. - :type stopwords: list[str] + :paramtype odata_type: str + :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] """ _validation = { @@ -5908,29 +6038,29 @@ class StopwordsTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param stopwords: The list of stopwords. This property and the stopwords list property cannot + :paramtype name: str + :keyword stopwords: The list of stopwords. This property and the stopwords list property cannot both be set. - :type stopwords: list[str] - :param stopwords_list: A predefined list of stopwords to use. This property and the stopwords + :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". - :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. - :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. - :type remove_trailing_stop_words: bool + :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 """ _validation = { @@ -5966,14 +6096,14 @@ class Suggester(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the suggester. - :type name: str + :keyword name: Required. The name of the suggester. + :paramtype name: str :ivar search_mode: A value indicating the capabilities of the suggester. Has constant value: "analyzingInfixMatching". :vartype search_mode: str - :param source_fields: Required. The list of field names to which the suggester applies. Each + :keyword source_fields: Required. The list of field names to which the suggester applies. Each field must be searchable. - :type source_fields: list[str] + :paramtype source_fields: list[str] """ _validation = { @@ -6006,15 +6136,15 @@ class SynonymMap(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the synonym map. - :type name: str + :keyword name: Required. The name of the synonym map. + :paramtype name: str :ivar format: The format of the synonym map. Only the 'solr' format is currently supported. Has constant value: "solr". :vartype format: str - :param synonyms: Required. A series of synonym rules in the specified synonym map format. The + :keyword synonyms: Required. A series of synonym rules in the specified synonym map format. The rules must be separated by newlines. - :type synonyms: str - :param encryption_key: A description of an encryption key that you create in Azure Key Vault. + :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 @@ -6022,9 +6152,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. - :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :param e_tag: The ETag of the synonym map. - :type e_tag: str + :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :keyword e_tag: The ETag of the synonym map. + :paramtype e_tag: str """ _validation = { @@ -6059,30 +6189,30 @@ class SynonymTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param synonyms: Required. A list of synonyms in following one of two formats: 1. incredible, + :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. - :type synonyms: list[str] - :param ignore_case: A value indicating whether to case-fold input for matching. Default is + :paramtype synonyms: list[str] + :keyword ignore_case: A value indicating whether to case-fold input for matching. Default is false. - :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, + :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. - :type expand: bool + :paramtype expand: bool """ _validation = { @@ -6115,20 +6245,21 @@ class TagScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :param type: Required. Indicates the type of function to use. Valid values include magnitude, + :keyword 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. - :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. - :type boost: float - :param interpolation: A value indicating how boosting will be interpolated across document + :paramtype type: str + :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". - :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 + :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 """ _validation = { @@ -6160,9 +6291,9 @@ class TagScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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. - :type tags_parameter: str + :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 """ _validation = { @@ -6186,44 +6317,45 @@ class TextTranslationSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_to_language_code: Required. The language code to translate documents into for + :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". - :type default_to_language_code: str or + :paramtype default_to_language_code: str or ~azure.search.documents.indexes.models.TextTranslationSkillLanguage - :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". - :type default_from_language_code: str or + :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 - :param suggested_from: The language code to translate documents from when neither the + :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", @@ -6232,7 +6364,7 @@ class TextTranslationSkill(SearchIndexerSkill): "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". - :type suggested_from: str or + :paramtype suggested_from: str or ~azure.search.documents.indexes.models.TextTranslationSkillLanguage """ @@ -6271,9 +6403,9 @@ class TextWeights(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param weights: Required. The dictionary of per-field weights to boost document scoring. The + :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. - :type weights: dict[str, float] + :paramtype weights: dict[str, float] """ _validation = { @@ -6297,15 +6429,15 @@ class TruncateTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param length: The length at which terms will be truncated. Default and maximum is 300. - :type length: int + :paramtype name: str + :keyword length: The length at which terms will be truncated. Default and maximum is 300. + :paramtype length: int """ _validation = { @@ -6334,16 +6466,16 @@ class UaxUrlEmailTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Default is 255. Tokens longer than the + :paramtype odata_type: str + :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. - :type max_token_length: int + :paramtype max_token_length: int """ _validation = { @@ -6372,16 +6504,16 @@ class UniqueTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param only_on_same_position: A value indicating whether to remove duplicates only at the same - position. Default is false. - :type only_on_same_position: bool + :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 """ _validation = { @@ -6409,38 +6541,39 @@ class WebApiSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :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. - :type degree_of_parallelism: int + :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 """ _validation = { @@ -6484,43 +6617,44 @@ class WordDelimiterTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param generate_word_parts: A value indicating whether to generate part words. If set, causes + :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. - :type generate_word_parts: bool - :param generate_number_parts: A value indicating whether to generate number subwords. Default + :paramtype generate_word_parts: bool + :keyword 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. - :type catenate_words: bool - :param catenate_numbers: A value indicating whether maximum runs of number parts will be + :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. - :type catenate_numbers: bool - :param catenate_all: A value indicating whether all subword parts will be catenated. For + :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. - :type catenate_all: bool - :param split_on_case_change: A value indicating whether to split words on caseChange. For + :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. - :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. - :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. - :type split_on_numerics: bool - :param stem_english_possessive: A value indicating whether to remove trailing "'s" for each + :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. - :type stem_english_possessive: bool - :param protected_words: A list of tokens to protect from being delimited. - :type protected_words: list[str] + :paramtype stem_english_possessive: bool + :keyword protected_words: A list of tokens to protect from being delimited. + :paramtype protected_words: list[str] """ _validation = { 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 ec9c9d4f72ac..21b03c1ff677 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 @@ -65,9 +65,9 @@ class AnalyzeRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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. Possible values + :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", @@ -85,19 +85,20 @@ class AnalyzeRequest(msrest.serialization.Model): "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. Possible values + :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". - :type tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName - :param normalizer: The name of the normalizer to use to normalize the given text. Possible + :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". - :type normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :param token_filters: An optional list of token 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. - :type char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] + :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] """ _validation = { @@ -138,8 +139,9 @@ class AnalyzeResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param tokens: Required. The list of tokens returned by the analyzer specified in the request. - :type tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo] + :keyword tokens: Required. The list of tokens returned by the analyzer specified in the + request. + :paramtype tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo] """ _validation = { @@ -168,13 +170,13 @@ class TokenFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str + :paramtype name: str """ _validation = { @@ -207,16 +209,16 @@ class AsciiFoldingTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param preserve_original: A value indicating whether the original token will be kept. Default + :paramtype name: str + :keyword preserve_original: A value indicating whether the original token will be kept. Default is false. - :type preserve_original: bool + :paramtype preserve_original: bool """ _validation = { @@ -247,12 +249,12 @@ class AzureActiveDirectoryApplicationCredentials(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param application_id: Required. An AAD Application ID that was granted the required access + :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. - :type application_id: str - :param application_secret: The authentication key of the specified AAD application. - :type application_secret: str + :paramtype application_id: str + :keyword application_secret: The authentication key of the specified AAD application. + :paramtype application_secret: str """ _validation = { @@ -284,8 +286,8 @@ class Similarity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Constant filled by server. - :type odata_type: str + :keyword odata_type: Required. Constant filled by server. + :paramtype odata_type: str """ _validation = { @@ -313,16 +315,16 @@ class BM25Similarity(Similarity): All required parameters must be populated in order to send to Azure. - :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 + :keyword odata_type: Required. Constant filled by server. + :paramtype odata_type: str + :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. - :type k1: float - :param b: This property controls how the length of a document affects the relevance score. By + :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. - :type b: float + :paramtype b: float """ _validation = { @@ -356,13 +358,13 @@ class CharFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the char filter.Constant filled by - server. - :type odata_type: str - :param name: Required. The name of the char filter. It must only contain letters, digits, + :keyword odata_type: Required. Identifies the concrete type of the char filter.Constant filled + by server. + :paramtype odata_type: str + :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. - :type name: str + :paramtype name: str """ _validation = { @@ -395,19 +397,19 @@ class CjkBigramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param ignore_scripts: The scripts to ignore. - :type ignore_scripts: list[str or + :paramtype name: str + :keyword ignore_scripts: The scripts to ignore. + :paramtype ignore_scripts: list[str or ~azure.search.documents.indexes.models.CjkBigramTokenFilterScripts] - :param output_unigrams: A value indicating whether to output both unigrams and bigrams (if + :keyword output_unigrams: A value indicating whether to output both unigrams and bigrams (if true), or just bigrams (if false). Default is false. - :type output_unigrams: bool + :paramtype output_unigrams: bool """ _validation = { @@ -441,8 +443,8 @@ class ClassicSimilarity(Similarity): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Constant filled by server. - :type odata_type: str + :keyword odata_type: Required. Constant filled by server. + :paramtype odata_type: str """ _validation = { @@ -469,13 +471,13 @@ class LexicalTokenizer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str + :paramtype odata_type: str + :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 """ _validation = { @@ -508,16 +510,16 @@ class ClassicTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Default is 255. Tokens longer than the + :paramtype odata_type: str + :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. - :type max_token_length: int + :paramtype max_token_length: int """ _validation = { @@ -552,11 +554,11 @@ class CognitiveServicesAccount(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the cognitive service resource + :keyword odata_type: Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server. - :type odata_type: str - :param description: Description of the cognitive service resource attached to a skillset. - :type description: str + :paramtype odata_type: str + :keyword description: Description of the cognitive service resource attached to a skillset. + :paramtype description: str """ _validation = { @@ -588,14 +590,14 @@ class CognitiveServicesAccountKey(CognitiveServicesAccount): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the cognitive service resource + :keyword odata_type: Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server. - :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 + :paramtype odata_type: str + :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. - :type key: str + :paramtype key: str """ _validation = { @@ -626,22 +628,22 @@ class CommonGramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type ignore_case: bool - :param use_query_mode: A value that indicates whether the token filter is in query mode. When + :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. - :type use_query_mode: bool + :paramtype use_query_mode: bool """ _validation = { @@ -682,25 +684,26 @@ class SearchIndexerSkill(msrest.serialization.Model): 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 + :keyword 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 + :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 '#'. - :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] + :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] """ _validation = { @@ -746,25 +749,26 @@ class ConditionalSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] + :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] """ _validation = { @@ -801,14 +805,14 @@ class CorsOptions(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param allowed_origins: Required. The list of origins from which JavaScript code will be + :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). - :type allowed_origins: list[str] - :param max_age_in_seconds: The duration for which browsers should cache CORS preflight + :paramtype allowed_origins: list[str] + :keyword max_age_in_seconds: The duration for which browsers should cache CORS preflight responses. Defaults to 5 minutes. - :type max_age_in_seconds: long + :paramtype max_age_in_seconds: long """ _validation = { @@ -840,13 +844,13 @@ class LexicalAnalyzer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :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. - :type name: str + :paramtype odata_type: str + :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 """ _validation = { @@ -879,27 +883,27 @@ class CustomAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :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. - :type name: str - :param tokenizer: Required. The name of the tokenizer to use to divide continuous text into a + :paramtype odata_type: str + :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". - :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. - :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 + :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. - :type char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] + :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] """ _validation = { @@ -937,51 +941,51 @@ class CustomEntity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The top-level entity descriptor. Matches in the skill output will be + :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. - :type name: str - :param description: This field can be used as a passthrough for custom metadata about the + :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. - :type description: str - :param type: This field can be used as a passthrough for custom metadata about the matched + :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. - :type type: str - :param subtype: This field can be used as a passthrough for custom metadata about the matched + :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. - :type subtype: str - :param id: This field can be used as a passthrough for custom metadata about the matched + :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. - :type id: str - :param case_sensitive: Defaults to false. Boolean value denoting whether comparisons with the + :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. - :type case_sensitive: bool - :param accent_sensitive: Defaults to false. Boolean value denoting whether comparisons with the - entity name should be sensitive to accent. - :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 + :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. - :type fuzzy_edit_distance: int - :param default_case_sensitive: Changes the default case sensitivity value for this entity. It + :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. - :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. - :type default_accent_sensitive: bool - :param default_fuzzy_edit_distance: Changes the default fuzzy edit distance value for this + :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. - :type default_fuzzy_edit_distance: int - :param aliases: An array of complex objects that can be used to specify alternative spellings + :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. - :type aliases: list[~azure.search.documents.indexes.models.CustomEntityAlias] + :paramtype aliases: list[~azure.search.documents.indexes.models.CustomEntityAlias] """ _validation = { @@ -1040,14 +1044,14 @@ class CustomEntityAlias(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -1082,45 +1086,47 @@ class CustomEntityLookupSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. + :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". - :type default_language_code: str or + :paramtype default_language_code: str or ~azure.search.documents.indexes.models.CustomEntityLookupSkillLanguage - :param entities_definition_uri: Path to a JSON or CSV file containing all the target text to + :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. - :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. - :type global_default_case_sensitive: bool - :param global_default_accent_sensitive: A global flag for AccentSensitive. If AccentSensitive + :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. - :type global_default_accent_sensitive: bool - :param global_default_fuzzy_edit_distance: A global flag for FuzzyEditDistance. If + :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. - :type global_default_fuzzy_edit_distance: int + :paramtype global_default_fuzzy_edit_distance: int """ _validation = { @@ -1175,13 +1181,13 @@ class LexicalNormalizer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the normalizer. - :type odata_type: str - :param name: Required. The name of the normalizer. It must only contain letters, digits, + :keyword odata_type: Required. Identifies the concrete type of the normalizer. + :paramtype odata_type: str + :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'. - :type name: str + :paramtype name: str """ _validation = { @@ -1211,21 +1217,21 @@ class CustomNormalizer(LexicalNormalizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the normalizer. - :type odata_type: str - :param name: Required. The name of the normalizer. It must only contain letters, digits, + :keyword odata_type: Required. Identifies the concrete type of the normalizer. + :paramtype odata_type: str + :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'. - :type name: str - :param 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 + :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. - :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 + :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. - :type char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] + :paramtype char_filters: list[str or ~azure.search.documents.indexes.models.CharFilterName] """ _validation = { @@ -1262,9 +1268,9 @@ class DataChangeDetectionPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the data change detection + :keyword odata_type: Required. Identifies the concrete type of the data change detection policy.Constant filled by server. - :type odata_type: str + :paramtype odata_type: str """ _validation = { @@ -1295,9 +1301,9 @@ class DataDeletionDetectionPolicy(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the data deletion detection + :keyword odata_type: Required. Identifies the concrete type of the data deletion detection policy.Constant filled by server. - :type odata_type: str + :paramtype odata_type: str """ _validation = { @@ -1323,9 +1329,9 @@ def __init__( class DataSourceCredentials(msrest.serialization.Model): """Represents credentials that can be used to connect to a datasource. - :param connection_string: The connection string for the datasource. Set to + :keyword connection_string: The connection string for the datasource. Set to ':code:``' if you do not want the connection string updated. - :type connection_string: str + :paramtype connection_string: str """ _attribute_map = { @@ -1347,11 +1353,11 @@ class DefaultCognitiveServicesAccount(CognitiveServicesAccount): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the cognitive service resource + :keyword odata_type: Required. Identifies the concrete type of the cognitive service resource attached to a skillset.Constant filled by server. - :type odata_type: str - :param description: Description of the cognitive service resource attached to a skillset. - :type description: str + :paramtype odata_type: str + :keyword description: Description of the cognitive service resource attached to a skillset. + :paramtype description: str """ _validation = { @@ -1378,27 +1384,27 @@ class DictionaryDecompounderTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type min_word_size: int - :param min_subword_size: The minimum subword size. Only subwords longer than this are + :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. - :type min_subword_size: int - :param max_subword_size: The maximum subword size. Only subwords shorter than this are + :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. - :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. - :type only_longest_match: bool + :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 """ _validation = { @@ -1448,18 +1454,19 @@ class ScoringFunction(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Indicates the type of function to use. Valid values include magnitude, + :keyword 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. - :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. - :type boost: float - :param interpolation: A value indicating how boosting will be interpolated across document + :paramtype type: str + :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". - :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation + :paramtype interpolation: str or + ~azure.search.documents.indexes.models.ScoringFunctionInterpolation """ _validation = { @@ -1499,20 +1506,21 @@ class DistanceScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :param type: Required. Indicates the type of function to use. Valid values include magnitude, + :keyword 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. - :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. - :type boost: float - :param interpolation: A value indicating how boosting will be interpolated across document + :paramtype type: str + :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". - :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 + :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 """ _validation = { @@ -1549,12 +1557,12 @@ class DistanceScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param reference_point_parameter: Required. The name of the parameter passed in search queries - to specify the reference location. - :type reference_point_parameter: str - :param boosting_distance: Required. The distance in kilometers from the reference location + :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. - :type boosting_distance: float + :paramtype boosting_distance: float """ _validation = { @@ -1584,32 +1592,33 @@ class DocumentExtractionSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :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 + :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. - :type data_to_extract: str - :param configuration: A dictionary of configurations for the skill. - :type configuration: dict[str, any] + :paramtype data_to_extract: str + :keyword configuration: A dictionary of configurations for the skill. + :paramtype configuration: dict[str, any] """ _validation = { @@ -1655,21 +1664,21 @@ class EdgeNGramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param min_gram: The minimum n-gram length. Default is 1. Must be less than the value of + :paramtype name: str + :keyword min_gram: The minimum n-gram length. Default is 1. Must be less than the value of maxGram. - :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". - :type side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide + :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 """ _validation = { @@ -1706,21 +1715,21 @@ class EdgeNGramTokenFilterV2(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :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". - :type side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide + :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 """ _validation = { @@ -1759,20 +1768,20 @@ class EdgeNGramTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :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. - :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] + :paramtype odata_type: str + :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] """ _validation = { @@ -1811,15 +1820,15 @@ class ElisionTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param articles: The set of articles to remove. - :type articles: list[str] + :paramtype name: str + :keyword articles: The set of articles to remove. + :paramtype articles: list[str] """ _validation = { @@ -1850,35 +1859,36 @@ class EntityLinkingSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. - :type default_language_code: str - :param minimum_precision: A value between 0 and 1 that be used to only include entities whose + :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. - :type minimum_precision: float - :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. - :type model_version: str + :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 """ _validation = { @@ -1925,41 +1935,42 @@ class EntityRecognitionSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :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. + :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". - :type default_language_code: str or + :paramtype default_language_code: str or ~azure.search.documents.indexes.models.EntityRecognitionSkillLanguage - :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. - :type include_typeless_entities: bool - :param minimum_precision: A value between 0 and 1 that be used to only include entities whose + :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. - :type minimum_precision: float + :paramtype minimum_precision: float """ _validation = { @@ -2008,37 +2019,38 @@ class EntityRecognitionSkillV3(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param categories: A list of entity categories that should be extracted. - :type categories: list[str] - :param default_language_code: A value indicating which language code to use. Default is en. - :type default_language_code: str - :param minimum_precision: A value between 0 and 1 that be used to only include entities whose + :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. - :type minimum_precision: float - :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. - :type model_version: str + :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 """ _validation = { @@ -2088,13 +2100,13 @@ class FieldMapping(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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. - :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 + :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 """ _validation = { @@ -2126,11 +2138,11 @@ class FieldMappingFunction(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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. - :type parameters: dict[str, any] + :paramtype parameters: dict[str, any] """ _validation = { @@ -2159,20 +2171,21 @@ class FreshnessScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :param type: Required. Indicates the type of function to use. Valid values include magnitude, + :keyword 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. - :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. - :type boost: float - :param interpolation: A value indicating how boosting will be interpolated across document + :paramtype type: str + :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". - :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 + :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 """ _validation = { @@ -2209,9 +2222,9 @@ class FreshnessScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param boosting_duration: Required. The expiration period after which boosting will stop for a - particular document. - :type boosting_duration: ~datetime.timedelta + :keyword boosting_duration: Required. The expiration period after which boosting will stop for + a particular document. + :paramtype boosting_duration: ~datetime.timedelta """ _validation = { @@ -2269,11 +2282,11 @@ class HighWaterMarkChangeDetectionPolicy(DataChangeDetectionPolicy): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the data change detection + :keyword odata_type: Required. Identifies the concrete type of the data change detection policy.Constant filled by server. - :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 + :paramtype odata_type: str + :keyword high_water_mark_column_name: Required. The name of the high water mark column. + :paramtype high_water_mark_column_name: str """ _validation = { @@ -2302,33 +2315,34 @@ class ImageAnalysisSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. + :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". - :type default_language_code: str or + :paramtype default_language_code: str or ~azure.search.documents.indexes.models.ImageAnalysisSkillLanguage - :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] + :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] """ _validation = { @@ -2369,6 +2383,70 @@ 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. @@ -2379,6 +2457,13 @@ 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. @@ -2404,6 +2489,8 @@ 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}, @@ -2417,6 +2504,8 @@ 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'}, @@ -2434,6 +2523,8 @@ def __init__( ): 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 @@ -2448,18 +2539,19 @@ def __init__( class IndexingParameters(msrest.serialization.Model): """Represents parameters for indexer execution. - :param batch_size: The number of items that are read from the data source and indexed as a + :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. - :type batch_size: int - :param max_failed_items: The maximum number of items that can fail indexing for indexer + :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. - :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. - :type max_failed_items_per_batch: int - :param configuration: A dictionary of indexer-specific configuration properties. Each name is + :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. - :type configuration: ~azure.search.documents.indexes.models.IndexingParametersConfiguration + :paramtype configuration: + ~azure.search.documents.indexes.models.IndexingParametersConfiguration """ _attribute_map = { @@ -2488,72 +2580,73 @@ 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. - :param additional_properties: Unmatched properties from the message are deserialized to this + :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, any] - :param parsing_mode: Represents the parsing mode for indexing from an Azure blob data source. + :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". - :type parsing_mode: str or ~azure.search.documents.indexes.models.BlobIndexerParsingMode - :param excluded_file_name_extensions: Comma-delimited list of filename extensions to ignore + :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. - :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 + :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. - :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. - :type fail_on_unsupported_content_type: bool - :param fail_on_unprocessable_document: For Azure blobs, set to false if you want to continue + :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. - :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. + :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. - :type index_storage_metadata_only_for_oversized_documents: bool - :param delimited_text_headers: For CSV blobs, specifies a comma-delimited list of column + :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. - :type delimited_text_headers: str - :param delimited_text_delimiter: For CSV blobs, specifies the end-of-line single-character + :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, "|"). - :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. - :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. - :type document_root: str - :param data_to_extract: Specifies the data to extract from Azure blob storage and tells the + :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". - :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 + :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". - :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 + :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. - :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". - :type pdf_text_rotation_algorithm: str or + :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 - :param execution_environment: Specifies the environment in which the indexer should execute. + :keyword execution_environment: Specifies the environment in which the indexer should execute. Possible values include: "standard", "private". Default value: "standard". - :type execution_environment: str or + :paramtype execution_environment: str or ~azure.search.documents.indexes.models.IndexerExecutionEnvironment - :param query_timeout: Increases the timeout beyond the 5-minute default for Azure SQL database - data sources, specified in the format "hh:mm:ss". - :type query_timeout: str + :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 """ _attribute_map = { @@ -2623,10 +2716,10 @@ class IndexingSchedule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -2655,14 +2748,14 @@ class InputFieldMappingEntry(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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] + :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] """ _validation = { @@ -2697,18 +2790,18 @@ class KeepTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type lower_case_keep_words: bool + :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 """ _validation = { @@ -2743,37 +2836,38 @@ class KeyPhraseExtractionSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. + :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". - :type default_language_code: str or + :paramtype default_language_code: str or ~azure.search.documents.indexes.models.KeyPhraseExtractionSkillLanguage - :param max_key_phrase_count: A number indicating how many key phrases to return. If absent, all - identified key phrases will be returned. - :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. - :type model_version: str + :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 """ _validation = { @@ -2819,18 +2913,18 @@ class KeywordMarkerTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type ignore_case: bool + :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 """ _validation = { @@ -2865,15 +2959,15 @@ class KeywordTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param buffer_size: The read buffer size in bytes. Default is 256. - :type buffer_size: int + :paramtype odata_type: str + :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 """ _validation = { @@ -2904,16 +2998,16 @@ class KeywordTokenizerV2(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Default is 256. Tokens longer than the + :paramtype odata_type: str + :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. - :type max_token_length: int + :paramtype max_token_length: int """ _validation = { @@ -2945,32 +3039,33 @@ class LanguageDetectionSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_country_hint: A country code to use as a hint to the language detection model if - it cannot disambiguate the language. - :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. - :type model_version: str + :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 """ _validation = { @@ -3013,18 +3108,18 @@ class LengthTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type min_length: int - :param max_length: The maximum length in characters. Default and maximum is 300. - :type max_length: int + :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 """ _validation = { @@ -3060,18 +3155,18 @@ class LimitTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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 + :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. - :type consume_all_tokens: bool + :paramtype consume_all_tokens: bool """ _validation = { @@ -3240,18 +3335,18 @@ class LuceneStandardAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Default is 255. Tokens longer than the + :paramtype odata_type: str + :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. - :type max_token_length: int - :param stopwords: A list of stopwords. - :type stopwords: list[str] + :paramtype max_token_length: int + :keyword stopwords: A list of stopwords. + :paramtype stopwords: list[str] """ _validation = { @@ -3286,16 +3381,16 @@ class LuceneStandardTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Default is 255. Tokens longer than the + :paramtype odata_type: str + :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. - :type max_token_length: int + :paramtype max_token_length: int """ _validation = { @@ -3326,16 +3421,16 @@ class LuceneStandardTokenizerV2(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Default is 255. Tokens longer than the + :paramtype odata_type: str + :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. - :type max_token_length: int + :paramtype max_token_length: int """ _validation = { @@ -3367,20 +3462,21 @@ class MagnitudeScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :param type: Required. Indicates the type of function to use. Valid values include magnitude, + :keyword 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. - :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. - :type boost: float - :param interpolation: A value indicating how boosting will be interpolated across document + :paramtype type: str + :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". - :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 + :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 """ _validation = { @@ -3417,13 +3513,13 @@ class MagnitudeScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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. - :type should_boost_beyond_range_by_constant: bool + :paramtype should_boost_beyond_range_by_constant: bool """ _validation = { @@ -3456,16 +3552,16 @@ class MappingCharFilter(CharFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the char filter.Constant filled by - server. - :type odata_type: str - :param name: Required. The name of the char filter. It must only contain letters, digits, + :keyword odata_type: Required. Identifies the concrete type of the char filter.Constant filled + by server. + :paramtype odata_type: str + :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. - :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"). - :type mappings: list[str] + :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] """ _validation = { @@ -3497,31 +3593,32 @@ class MergeSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param insert_pre_tag: The tag indicates the start of the merged text. By default, the tag is + :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. - :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. - :type insert_post_tag: str + :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 """ _validation = { @@ -3564,29 +3661,29 @@ class MicrosoftLanguageStemmingTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Tokens longer than the maximum length are + :paramtype odata_type: str + :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. - :type max_token_length: int - :param is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used + :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. - :type is_search_tokenizer: bool - :param language: The language to use. The default is English. Possible values include: + :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". - :type language: str or + :paramtype language: str or ~azure.search.documents.indexes.models.MicrosoftStemmingTokenizerLanguage """ @@ -3625,29 +3722,29 @@ class MicrosoftLanguageTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Tokens longer than the maximum length are + :paramtype odata_type: str + :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. - :type max_token_length: int - :param is_search_tokenizer: A value indicating how the tokenizer is used. Set to true if used + :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. - :type is_search_tokenizer: bool - :param language: The language to use. The default is English. Possible values include: + :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". - :type language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage + :paramtype language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage """ _validation = { @@ -3685,18 +3782,18 @@ class NGramTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param min_gram: The minimum n-gram length. Default is 1. Must be less than the value of + :paramtype name: str + :keyword min_gram: The minimum n-gram length. Default is 1. Must be less than the value of maxGram. - :type min_gram: int - :param max_gram: The maximum n-gram length. Default is 2. - :type max_gram: int + :paramtype min_gram: int + :keyword max_gram: The maximum n-gram length. Default is 2. + :paramtype max_gram: int """ _validation = { @@ -3730,18 +3827,18 @@ class NGramTokenFilterV2(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type min_gram: int - :param max_gram: The maximum n-gram length. Default is 2. Maximum is 300. - :type max_gram: int + :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 """ _validation = { @@ -3777,20 +3874,20 @@ class NGramTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :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. - :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] + :paramtype odata_type: str + :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] """ _validation = { @@ -3829,37 +3926,39 @@ class OcrSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. + :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". - :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. + :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. - :type should_detect_orientation: bool - :param line_ending: Defines the sequence of characters to use between the lines of text + :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". - :type line_ending: str or ~azure.search.documents.indexes.models.LineEnding + :paramtype line_ending: str or ~azure.search.documents.indexes.models.LineEnding """ _validation = { @@ -3905,10 +4004,10 @@ class OutputFieldMappingEntry(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -3937,24 +4036,24 @@ class PathHierarchyTokenizerV2(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :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. + :paramtype odata_type: str + :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. - :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 + :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 """ _validation = { @@ -3993,29 +4092,55 @@ def __init__( self.number_of_tokens_to_skip = number_of_tokens_to_skip +class Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema(msrest.serialization.Model): + """Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema. + + :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] + """ + + _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 + ): + super(Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema, self).__init__(**kwargs) + self.document_keys = document_keys + self.datasource_document_ids = datasource_document_ids + + class PatternAnalyzer(LexicalAnalyzer): """Flexibly separates text into terms via a regular expression pattern. This analyzer is implemented using Apache Lucene. All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :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. - :type name: str - :param lower_case_terms: A value indicating whether terms should be lower-cased. Default is + :paramtype odata_type: str + :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. - :type lower_case_terms: bool - :param pattern: A regular expression pattern to match token separators. Default is an + :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. - :type pattern: str - :param flags: Regular expression flags. Possible values include: "CANON_EQ", + :paramtype pattern: str + :keyword 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] + :paramtype flags: str or ~azure.search.documents.indexes.models.RegexFlags + :keyword stopwords: A list of stopwords. + :paramtype stopwords: list[str] """ _validation = { @@ -4055,18 +4180,18 @@ class PatternCaptureTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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 + :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. - :type preserve_original: bool + :paramtype preserve_original: bool """ _validation = { @@ -4101,17 +4226,17 @@ class PatternReplaceCharFilter(CharFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the char filter.Constant filled by - server. - :type odata_type: str - :param name: Required. The name of the char filter. It must only contain letters, digits, + :keyword odata_type: Required. Identifies the concrete type of the char filter.Constant filled + by server. + :paramtype odata_type: str + :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. - :type name: str - :param pattern: Required. A regular expression pattern. - :type pattern: str - :param replacement: Required. The replacement text. - :type replacement: str + :paramtype name: str + :keyword pattern: Required. A regular expression pattern. + :paramtype pattern: str + :keyword replacement: Required. The replacement text. + :paramtype replacement: str """ _validation = { @@ -4147,17 +4272,17 @@ class PatternReplaceTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param pattern: Required. A regular expression pattern. - :type pattern: str - :param replacement: Required. The replacement text. - :type replacement: str + :paramtype name: str + :keyword pattern: Required. A regular expression pattern. + :paramtype pattern: str + :keyword replacement: Required. The replacement text. + :paramtype replacement: str """ _validation = { @@ -4193,23 +4318,23 @@ class PatternTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param pattern: A regular expression pattern to match token separators. Default is an + :paramtype odata_type: str + :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. - :type pattern: str - :param flags: Regular expression flags. Possible values include: "CANON_EQ", + :paramtype pattern: str + :keyword 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 + :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. - :type group: int + :paramtype group: int """ _validation = { @@ -4246,20 +4371,20 @@ class PhoneticTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param encoder: The phonetic encoder to use. Default is "metaphone". Possible values include: + :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". - :type encoder: str or ~azure.search.documents.indexes.models.PhoneticEncoder - :param replace_original_tokens: A value indicating whether encoded tokens should replace + :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. - :type replace_original_tokens: bool + :paramtype replace_original_tokens: bool """ _validation = { @@ -4293,46 +4418,48 @@ class PIIDetectionSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. - :type default_language_code: str - :param minimum_precision: A value between 0 and 1 that be used to only include entities whose + :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. - :type minimum_precision: float - :param masking_mode: A parameter that provides various ways to mask the personal information + :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". - :type masking_mode: str or ~azure.search.documents.indexes.models.PIIDetectionSkillMaskingMode - :param masking_character: The character used to mask the text if the maskingMode parameter is + :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 '*'. - :type masking_character: 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. - :type model_version: str - :param pii_categories: A list of PII entity categories that should be extracted and masked. - :type pii_categories: list[str] - :param domain: If specified, will set the PII domain to include only a subset of the entity + :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'. - :type domain: str + :paramtype domain: str """ _validation = { @@ -4390,8 +4517,8 @@ def __init__( class RequestOptions(msrest.serialization.Model): """Parameter group. - :param x_ms_client_request_id: The tracking ID sent with the request to help with debugging. - :type x_ms_client_request_id: str + :keyword x_ms_client_request_id: The tracking ID sent with the request to help with debugging. + :paramtype x_ms_client_request_id: str """ _attribute_map = { @@ -4413,10 +4540,10 @@ class ResourceCounter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param usage: Required. The resource usage amount. - :type usage: long - :param quota: The resource amount quota. - :type quota: long + :keyword usage: Required. The resource usage amount. + :paramtype usage: long + :keyword quota: The resource amount quota. + :paramtype quota: long """ _validation = { @@ -4445,17 +4572,17 @@ class ScoringProfile(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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. - :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". - :type function_aggregation: str or + :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 """ @@ -4528,43 +4655,43 @@ class SearchField(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the field, which must be unique within the fields collection - of the index or parent field. - :type name: str - :param type: Required. The data type of the field. Possible values include: "Edm.String", + :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". - :type type: str or ~azure.search.documents.indexes.models.SearchFieldDataType - :param key: A value indicating whether the field uniquely identifies documents in the index. + :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. - :type key: bool - :param retrievable: A value indicating whether the field can be returned in a search result. + :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. - :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 + :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. - :type searchable: bool - :param filterable: A value indicating whether to enable the field to be referenced in $filter + :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. - :type filterable: bool - :param sortable: A value indicating whether to enable the field to be referenced in $orderby + :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 @@ -4574,15 +4701,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. - :type sortable: bool - :param facetable: A value indicating whether to enable the field to be referenced in facet + :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. - :type facetable: bool - :param analyzer: The name of the analyzer to use for the field. This option can be used only + :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", @@ -4602,11 +4729,11 @@ 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". - :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 + :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", @@ -4625,8 +4752,8 @@ 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". - :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 + :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 @@ -4648,21 +4775,21 @@ 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". - :type index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName - :param normalizer: The name of the normalizer to use for the field. This option can be used + :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". - :type normalizer: str or ~azure.search.documents.indexes.models.LexicalNormalizerName - :param synonym_maps: A list of the names of synonym maps to associate with this field. This + :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. - :type synonym_maps: list[str] - :param fields: A list of sub-fields if this is a field of type Edm.ComplexType or + :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. - :type fields: list[~azure.search.documents.indexes.models.SearchField] + :paramtype fields: list[~azure.search.documents.indexes.models.SearchField] """ _validation = { @@ -4728,31 +4855,31 @@ class SearchIndex(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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. - :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 normalizers: The normalizers for the index. - :type normalizers: list[~azure.search.documents.indexes.models.LexicalNormalizer] - :param encryption_key: A description of an encryption key that you create in Azure Key Vault. + :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 @@ -4760,14 +4887,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. - :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :param similarity: The type of similarity algorithm to be used when scoring and ranking the + :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. - :type similarity: ~azure.search.documents.indexes.models.Similarity - :param e_tag: The ETag of the index. - :type e_tag: str + :paramtype similarity: ~azure.search.documents.indexes.models.Similarity + :keyword e_tag: The ETag of the index. + :paramtype e_tag: str """ _validation = { @@ -4833,32 +4960,32 @@ class SearchIndexer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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. - :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 + :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. - :type field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] - :param output_field_mappings: Output field mappings are applied after enrichment and + :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. - :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. + :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 @@ -4867,10 +4994,10 @@ 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. - :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :param cache: Adds caching to an enrichment pipeline to allow for incremental modification + :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. - :type cache: ~azure.search.documents.indexes.models.SearchIndexerCache + :paramtype cache: ~azure.search.documents.indexes.models.SearchIndexerCache """ _validation = { @@ -4932,11 +5059,11 @@ def __init__( class SearchIndexerCache(msrest.serialization.Model): """SearchIndexerCache. - :param storage_connection_string: The connection string to the storage account where the cache - data will be persisted. - :type storage_connection_string: str - :param enable_reprocessing: Specifies whether incremental reprocessing is enabled. - :type enable_reprocessing: bool + :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 """ _attribute_map = { @@ -4961,12 +5088,12 @@ class SearchIndexerDataContainer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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. - :type name: str - :param query: A query that is applied to this data container. The syntax and meaning of this + :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. - :type query: str + :paramtype query: str """ _validation = { @@ -4998,9 +5125,9 @@ class SearchIndexerDataIdentity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the identity.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the identity.Constant filled by server. - :type odata_type: str + :paramtype odata_type: str """ _validation = { @@ -5028,9 +5155,9 @@ class SearchIndexerDataNoneIdentity(SearchIndexerDataIdentity): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the identity.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the identity.Constant filled by server. - :type odata_type: str + :paramtype odata_type: str """ _validation = { @@ -5054,31 +5181,31 @@ class SearchIndexerDataSource(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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", + :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". - :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 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. - :type identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity - :param data_change_detection_policy: The data change detection policy for the datasource. - :type data_change_detection_policy: + :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 - :param data_deletion_detection_policy: The data deletion detection policy for the datasource. - :type data_deletion_detection_policy: + :keyword data_deletion_detection_policy: The data deletion detection policy for the datasource. + :paramtype data_deletion_detection_policy: ~azure.search.documents.indexes.models.DataDeletionDetectionPolicy - :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. + :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 @@ -5087,7 +5214,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. - :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey """ _validation = { @@ -5143,14 +5270,14 @@ class SearchIndexerDataUserAssignedIdentity(SearchIndexerDataIdentity): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the identity.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the identity.Constant filled by server. - :type odata_type: str - :param user_assigned_identity: Required. The fully qualified Azure resource Id of a user + :paramtype odata_type: str + :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. - :type user_assigned_identity: str + :paramtype user_assigned_identity: str """ _validation = { @@ -5238,11 +5365,11 @@ class SearchIndexerKnowledgeStore(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param storage_connection_string: Required. The connection string to the storage account + :keyword storage_connection_string: Required. The connection string to the storage account projections will be stored in. - :type storage_connection_string: str - :param projections: Required. A list of additional projections to perform during indexing. - :type projections: + :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] """ @@ -5271,16 +5398,16 @@ def __init__( class SearchIndexerKnowledgeStoreProjectionSelector(msrest.serialization.Model): """Abstract class to share properties between concrete selectors. - :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] + :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] """ _attribute_map = { @@ -5314,18 +5441,18 @@ class SearchIndexerKnowledgeStoreBlobProjectionSelector(SearchIndexerKnowledgeSt All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -5361,18 +5488,18 @@ class SearchIndexerKnowledgeStoreFileProjectionSelector(SearchIndexerKnowledgeSt All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -5407,18 +5534,18 @@ class SearchIndexerKnowledgeStoreObjectProjectionSelector(SearchIndexerKnowledge All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -5451,14 +5578,14 @@ def __init__( class SearchIndexerKnowledgeStoreProjection(msrest.serialization.Model): """Container object for various projection selectors. - :param tables: Projections to Azure Table storage. - :type tables: + :keyword tables: Projections to Azure Table storage. + :paramtype tables: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreTableProjectionSelector] - :param objects: Projections to Azure Blob storage. - :type objects: + :keyword objects: Projections to Azure Blob storage. + :paramtype objects: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreObjectProjectionSelector] - :param files: Projections to Azure File storage. - :type files: + :keyword files: Projections to Azure File storage. + :paramtype files: list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreFileProjectionSelector] """ @@ -5487,18 +5614,18 @@ class SearchIndexerKnowledgeStoreTableProjectionSelector(SearchIndexerKnowledgeS All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -5572,22 +5699,22 @@ class SearchIndexerSkillset(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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. - :type cognitive_services_account: + :paramtype cognitive_services_account: ~azure.search.documents.indexes.models.CognitiveServicesAccount - :param knowledge_store: Definition of additional projections to azure blob, table, or files, of - enriched data. - :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. + :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 @@ -5596,7 +5723,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. - :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey """ _validation = { @@ -5736,25 +5863,25 @@ class SearchResourceEncryptionKey(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param key_name: Required. The name of your Azure Key Vault key to be used to encrypt your data - at rest. - :type key_name: str - :param key_version: Required. The version of your Azure Key Vault key to be used to encrypt + :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. - :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 + :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. - :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. - :type access_credentials: + :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 - :param 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. - :type identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity + :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 """ _validation = { @@ -5794,29 +5921,30 @@ class SentimentSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. + :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". - :type default_language_code: str or + :paramtype default_language_code: str or ~azure.search.documents.indexes.models.SentimentSkillLanguage """ @@ -5857,35 +5985,36 @@ class SentimentSkillV3(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. - :type default_language_code: str - :param include_opinion_mining: If set to true, the skill output will include information from + :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. - :type include_opinion_mining: bool - :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. - :type model_version: str + :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 """ _validation = { @@ -5931,20 +6060,21 @@ class ServiceCounters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -5991,17 +6121,17 @@ def __init__( class ServiceLimits(msrest.serialization.Model): """Represents various service level limits. - :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. - :type max_field_nesting_depth_per_index: int - :param max_complex_collection_fields_per_index: The maximum number of fields of type + :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. - :type max_complex_collection_fields_per_index: int - :param max_complex_objects_in_collections_per_document: The maximum number of objects in + :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. - :type max_complex_objects_in_collections_per_document: int + :paramtype max_complex_objects_in_collections_per_document: int """ _attribute_map = { @@ -6032,10 +6162,10 @@ class ServiceStatistics(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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 + :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 """ _validation = { @@ -6065,25 +6195,26 @@ class ShaperSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] + :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] """ _validation = { @@ -6120,31 +6251,31 @@ class ShingleTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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. - :type min_shingle_size: int - :param output_unigrams: A value indicating whether the output stream will contain the input + :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. - :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. - :type output_unigrams_if_no_shingles: bool - :param token_separator: The string to use when joining adjacent tokens to form a shingle. + :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 (" "). - :type token_separator: str - :param filter_token: The string to insert for each position at which there is no token. Default - is an underscore ("_"). - :type filter_token: str + :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 """ _validation = { @@ -6192,18 +6323,18 @@ class SnowballTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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". - :type language: str or ~azure.search.documents.indexes.models.SnowballTokenFilterLanguage + :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 """ _validation = { @@ -6235,13 +6366,13 @@ class SoftDeleteColumnDeletionDetectionPolicy(DataDeletionDetectionPolicy): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the data deletion detection + :keyword odata_type: Required. Identifies the concrete type of the data deletion detection policy.Constant filled by server. - :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 + :paramtype odata_type: str + :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 """ _validation = { @@ -6272,33 +6403,35 @@ class SplitSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_language_code: A value indicating which language code to use. Default is en. + :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". - :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 + :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". - :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 + :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 """ _validation = { @@ -6344,9 +6477,9 @@ class SqlIntegratedChangeTrackingPolicy(DataChangeDetectionPolicy): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the data change detection + :keyword odata_type: Required. Identifies the concrete type of the data change detection policy.Constant filled by server. - :type odata_type: str + :paramtype odata_type: str """ _validation = { @@ -6370,16 +6503,16 @@ class StemmerOverrideTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param rules: Required. A list of stemming rules in the following format: "word => stem", for + :paramtype name: str + :keyword rules: Required. A list of stemming rules in the following format: "word => stem", for example: "ran => run". - :type rules: list[str] + :paramtype rules: list[str] """ _validation = { @@ -6411,23 +6544,23 @@ class StemmerTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :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", + :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". - :type language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage + :paramtype language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage """ _validation = { @@ -6459,15 +6592,15 @@ class StopAnalyzer(LexicalAnalyzer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the analyzer.Constant filled by server. - :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. - :type name: str - :param stopwords: A list of stopwords. - :type stopwords: list[str] + :paramtype odata_type: str + :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] """ _validation = { @@ -6498,29 +6631,29 @@ class StopwordsTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param stopwords: The list of stopwords. This property and the stopwords list property cannot + :paramtype name: str + :keyword stopwords: The list of stopwords. This property and the stopwords list property cannot both be set. - :type stopwords: list[str] - :param stopwords_list: A predefined list of stopwords to use. This property and the stopwords + :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". - :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. - :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. - :type remove_trailing_stop_words: bool + :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 """ _validation = { @@ -6562,14 +6695,14 @@ class Suggester(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the suggester. - :type name: str + :keyword name: Required. The name of the suggester. + :paramtype name: str :ivar search_mode: A value indicating the capabilities of the suggester. Has constant value: "analyzingInfixMatching". :vartype search_mode: str - :param source_fields: Required. The list of field names to which the suggester applies. Each + :keyword source_fields: Required. The list of field names to which the suggester applies. Each field must be searchable. - :type source_fields: list[str] + :paramtype source_fields: list[str] """ _validation = { @@ -6605,15 +6738,15 @@ class SynonymMap(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the synonym map. - :type name: str + :keyword name: Required. The name of the synonym map. + :paramtype name: str :ivar format: The format of the synonym map. Only the 'solr' format is currently supported. Has constant value: "solr". :vartype format: str - :param synonyms: Required. A series of synonym rules in the specified synonym map format. The + :keyword synonyms: Required. A series of synonym rules in the specified synonym map format. The rules must be separated by newlines. - :type synonyms: str - :param encryption_key: A description of an encryption key that you create in Azure Key Vault. + :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 @@ -6621,9 +6754,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. - :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey - :param e_tag: The ETag of the synonym map. - :type e_tag: str + :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey + :keyword e_tag: The ETag of the synonym map. + :paramtype e_tag: str """ _validation = { @@ -6663,30 +6796,30 @@ class SynonymTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param synonyms: Required. A list of synonyms in following one of two formats: 1. incredible, + :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. - :type synonyms: list[str] - :param ignore_case: A value indicating whether to case-fold input for matching. Default is + :paramtype synonyms: list[str] + :keyword ignore_case: A value indicating whether to case-fold input for matching. Default is false. - :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, + :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. - :type expand: bool + :paramtype expand: bool """ _validation = { @@ -6724,20 +6857,21 @@ class TagScoringFunction(ScoringFunction): All required parameters must be populated in order to send to Azure. - :param type: Required. Indicates the type of function to use. Valid values include magnitude, + :keyword 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. - :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. - :type boost: float - :param interpolation: A value indicating how boosting will be interpolated across document + :paramtype type: str + :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". - :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 + :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 """ _validation = { @@ -6774,9 +6908,9 @@ class TagScoringParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :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. - :type tags_parameter: str + :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 """ _validation = { @@ -6802,44 +6936,45 @@ class TextTranslationSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :param default_to_language_code: Required. The language code to translate documents into for + :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". - :type default_to_language_code: str or + :paramtype default_to_language_code: str or ~azure.search.documents.indexes.models.TextTranslationSkillLanguage - :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". - :type default_from_language_code: str or + :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 - :param suggested_from: The language code to translate documents from when neither the + :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", @@ -6848,7 +6983,7 @@ class TextTranslationSkill(SearchIndexerSkill): "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". - :type suggested_from: str or + :paramtype suggested_from: str or ~azure.search.documents.indexes.models.TextTranslationSkillLanguage """ @@ -6896,9 +7031,9 @@ class TextWeights(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param weights: Required. The dictionary of per-field weights to boost document scoring. The + :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. - :type weights: dict[str, float] + :paramtype weights: dict[str, float] """ _validation = { @@ -6924,15 +7059,15 @@ class TruncateTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param length: The length at which terms will be truncated. Default and maximum is 300. - :type length: int + :paramtype name: str + :keyword length: The length at which terms will be truncated. Default and maximum is 300. + :paramtype length: int """ _validation = { @@ -6964,16 +7099,16 @@ class UaxUrlEmailTokenizer(LexicalTokenizer): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by + :keyword odata_type: Required. Identifies the concrete type of the tokenizer.Constant filled by server. - :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. - :type name: str - :param max_token_length: The maximum token length. Default is 255. Tokens longer than the + :paramtype odata_type: str + :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. - :type max_token_length: int + :paramtype max_token_length: int """ _validation = { @@ -7005,16 +7140,16 @@ class UniqueTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param only_on_same_position: A value indicating whether to remove duplicates only at the same - position. Default is false. - :type only_on_same_position: bool + :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 """ _validation = { @@ -7045,38 +7180,39 @@ class WebApiSkill(SearchIndexerSkill): 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 + :keyword 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 + :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 '#'. - :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] - :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. - :type degree_of_parallelism: int + :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 """ _validation = { @@ -7132,43 +7268,44 @@ class WordDelimiterTokenFilter(TokenFilter): All required parameters must be populated in order to send to Azure. - :param odata_type: Required. Identifies the concrete type of the token filter.Constant filled + :keyword 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, + :paramtype odata_type: str + :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. - :type name: str - :param generate_word_parts: A value indicating whether to generate part words. If set, causes + :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. - :type generate_word_parts: bool - :param generate_number_parts: A value indicating whether to generate number subwords. Default + :paramtype generate_word_parts: bool + :keyword 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. - :type catenate_words: bool - :param catenate_numbers: A value indicating whether maximum runs of number parts will be + :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. - :type catenate_numbers: bool - :param catenate_all: A value indicating whether all subword parts will be catenated. For + :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. - :type catenate_all: bool - :param split_on_case_change: A value indicating whether to split words on caseChange. For + :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. - :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. - :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. - :type split_on_numerics: bool - :param stem_english_possessive: A value indicating whether to remove trailing "'s" for each + :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. - :type stem_english_possessive: bool - :param protected_words: A list of tokens to protect from being delimited. - :type protected_words: list[str] + :paramtype stem_english_possessive: bool + :keyword protected_words: A list of tokens to protect from being delimited. + :paramtype protected_words: list[str] """ _validation = { 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 77c43a6bebf4..f2833c5a3851 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,27 +6,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum, EnumMeta +from enum import Enum from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - 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)): +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 @@ -41,7 +26,7 @@ class BlobIndexerDataToExtract(with_metaclass(_CaseInsensitiveEnumMeta, str, Enu #: 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. @@ -61,7 +46,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. """ @@ -80,7 +65,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. """ @@ -92,7 +77,7 @@ class BlobIndexerPDFTextRotationAlgorithm(with_metaclass(_CaseInsensitiveEnumMet #: 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. """ @@ -100,7 +85,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. """ @@ -113,7 +98,7 @@ class CjkBigramTokenFilterScripts(with_metaclass(_CaseInsensitiveEnumMeta, str, #: 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. """ @@ -136,7 +121,7 @@ class CustomEntityLookupSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, s #: 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. """ @@ -145,7 +130,7 @@ class EdgeNGramTokenFilterSide(with_metaclass(_CaseInsensitiveEnumMeta, str, Enu #: 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. """ @@ -164,7 +149,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. """ @@ -215,7 +200,7 @@ class EntityRecognitionSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, st #: 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. """ @@ -230,7 +215,7 @@ class ImageAnalysisSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, E #: 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. """ @@ -239,7 +224,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. """ @@ -251,7 +236,7 @@ class IndexerExecutionEnvironment(with_metaclass(_CaseInsensitiveEnumMeta, str, #: 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. """ @@ -265,7 +250,14 @@ class IndexerExecutionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) #: Indexer has been reset. RESET = "reset" -class IndexerStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +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)): """Represents the overall indexer status. """ @@ -277,7 +269,17 @@ class IndexerStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Indicates that the indexer is running normally. RUNNING = "running" -class KeyPhraseExtractionSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +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)): """The language codes supported for input text by KeyPhraseExtractionSkill. """ @@ -314,7 +316,7 @@ class KeyPhraseExtractionSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, #: 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. """ @@ -512,7 +514,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)): +class LexicalNormalizerName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Defines the names of all text normalizers supported by Azure Cognitive Search. """ @@ -534,7 +536,7 @@ class LexicalNormalizerName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) #: 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. """ @@ -577,7 +579,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)): +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". """ @@ -591,7 +593,7 @@ class LineEnding(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: 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. """ @@ -686,7 +688,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. """ @@ -775,7 +777,7 @@ class MicrosoftTokenizerLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, E #: 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. """ @@ -832,7 +834,7 @@ class OcrSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Slovak. SK = "sk" -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. """ @@ -859,7 +861,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)): +class PIIDetectionSkillMaskingMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """A string indicating what maskingMode to use to mask the personal information detected in the input text. """ @@ -871,7 +873,7 @@ class PIIDetectionSkillMaskingMode(with_metaclass(_CaseInsensitiveEnumMeta, str, #: 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. """ @@ -893,7 +895,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. """ @@ -909,7 +911,7 @@ class ScoringFunctionAggregation(with_metaclass(_CaseInsensitiveEnumMeta, str, E #: 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. """ @@ -927,7 +929,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. """ @@ -949,7 +951,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. """ @@ -966,7 +968,7 @@ class SearchIndexerDataSourceType(with_metaclass(_CaseInsensitiveEnumMeta, str, #: 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. """ @@ -1001,7 +1003,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. """ @@ -1053,7 +1055,7 @@ class SnowballTokenFilterLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, #: 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. """ @@ -1076,7 +1078,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. """ @@ -1190,7 +1192,7 @@ class StemmerTokenFilterLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, E #: 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. """ @@ -1257,7 +1259,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. """ @@ -1266,7 +1268,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. """ @@ -1415,7 +1417,7 @@ class TextTranslationSkillLanguage(with_metaclass(_CaseInsensitiveEnumMeta, str, #: 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. """ @@ -1430,7 +1432,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. """ @@ -1542,7 +1544,7 @@ class TokenFilterName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: 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/_data_sources_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/operations/_data_sources_operations.py index 177f5b818a9a..85a4b01663ec 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 @@ -5,12 +5,17 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING 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 HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.pipeline.transport._base import _format_url_section +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models @@ -21,6 +26,203 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_create_or_update_request( + data_source_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + 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] + ignore_reset_requirements = kwargs.pop('ignore_reset_requirements', None) # type: Optional[bool] + + prefer = "return=representation" + api_version = "2021-04-30-Preview" + 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 ignore_reset_requirements is not None: + query_parameters['ignoreResetRequirements'] = _SERIALIZER.query("ignore_reset_requirements", ignore_reset_requirements, '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 + 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] + + api_version = "2021-04-30-Preview" + 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 + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + select = kwargs.pop('select', None) # type: Optional[str] + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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. @@ -43,6 +245,7 @@ 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 @@ -80,46 +283,30 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - prefer = "return=representation" - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + json = self._serialize.body(data_source, 'SearchIndexerDataSource') + + request = build_create_or_update_request( + data_source_name=data_source_name, + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + if_match=if_match, + if_none_match=if_none_match, + ignore_reset_requirements=ignore_reset_requirements, + json=json, + template_url=self.create_or_update.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - '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'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') - if ignore_reset_requirements is not None: - query_parameters['ignoreResetRequirements'] = self._serialize.query("ignore_reset_requirements", ignore_reset_requirements, 'bool') - - # 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -137,8 +324,11 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/datasources(\'{dataSourceName}\')'} # type: ignore + + @distributed_trace def delete( self, data_source_name, # type: str @@ -170,37 +360,24 @@ def delete( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.delete.metadata['url'] # type: ignore + request = build_delete_request( + data_source_name=data_source_name, + 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'], + )._to_pipeline_transport_request() path_format_arguments = { - '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'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -213,6 +390,8 @@ def delete( delete.metadata = {'url': '/datasources(\'{dataSourceName}\')'} # type: ignore + + @distributed_trace def get( self, data_source_name, # type: str @@ -236,33 +415,22 @@ def get( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore + request = build_get_request( + data_source_name=data_source_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - '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'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -276,8 +444,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/datasources(\'{dataSourceName}\')'} # type: ignore + + @distributed_trace def list( self, select=None, # type: Optional[str] @@ -303,34 +474,22 @@ def list( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.list.metadata['url'] # type: ignore + request = build_list_request( + select=select, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.list.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -344,8 +503,11 @@ def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/datasources'} # type: ignore + + @distributed_trace def create( self, data_source, # type: "_models.SearchIndexerDataSource" @@ -369,37 +531,26 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore + json = self._serialize.body(data_source, 'SearchIndexerDataSource') + + request = build_create_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.create.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: @@ -413,4 +564,6 @@ def create( return cls(pipeline_response, deserialized, {}) return deserialized + 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 db8baeb1ff2f..ae85d03e1d14 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 @@ -5,12 +5,17 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING 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 HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.pipeline.transport._base import _format_url_section +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models @@ -21,6 +26,356 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_reset_request( + indexer_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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 + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + 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] + disable_cache_reprocessing_change_detection = kwargs.pop('disable_cache_reprocessing_change_detection', None) # type: Optional[bool] + ignore_reset_requirements = kwargs.pop('ignore_reset_requirements', None) # type: Optional[bool] + + prefer = "return=representation" + api_version = "2021-04-30-Preview" + 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 disable_cache_reprocessing_change_detection is not None: + query_parameters['disableCacheReprocessingChangeDetection'] = _SERIALIZER.query("disable_cache_reprocessing_change_detection", disable_cache_reprocessing_change_detection, 'bool') + if ignore_reset_requirements is not None: + query_parameters['ignoreResetRequirements'] = _SERIALIZER.query("ignore_reset_requirements", ignore_reset_requirements, '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 + 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] + + api_version = "2021-04-30-Preview" + 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 + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + select = kwargs.pop('select', None) # type: Optional[str] + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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 + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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. @@ -43,6 +398,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def reset( self, indexer_name, # type: str @@ -66,33 +422,92 @@ def reset( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.reset.metadata['url'] # type: ignore + request = build_reset_request( + indexer_name=indexer_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.reset.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **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, 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( + self, + indexer_name, # type: str + overwrite=False, # type: Optional[bool] + keys_or_ids=None, # type: Optional["_models.Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema"] + 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. - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + :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.Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema + :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', {})) - # 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + _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, 'Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema') + else: + json = None + + request = build_reset_docs_request( + indexer_name=indexer_name, + content_type=content_type, + overwrite=overwrite, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.reset_docs.metadata['url'], + )._to_pipeline_transport_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.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [204]: @@ -103,8 +518,10 @@ def reset( if cls: return cls(pipeline_response, None, {}) - reset.metadata = {'url': '/indexers(\'{indexerName}\')/search.reset'} # type: ignore + reset_docs.metadata = {'url': '/indexers(\'{indexerName}\')/search.resetdocs'} # type: ignore + + @distributed_trace def run( self, indexer_name, # type: str @@ -128,33 +545,22 @@ def run( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.run.metadata['url'] # type: ignore + request = build_run_request( + indexer_name=indexer_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.run.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.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') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -167,6 +573,8 @@ def run( run.metadata = {'url': '/indexers(\'{indexerName}\')/search.run'} # type: ignore + + @distributed_trace def create_or_update( self, indexer_name, # type: str @@ -208,48 +616,31 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - prefer = "return=representation" - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + json = self._serialize.body(indexer, 'SearchIndexer') + + request = build_create_or_update_request( + indexer_name=indexer_name, + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + if_match=if_match, + if_none_match=if_none_match, + disable_cache_reprocessing_change_detection=disable_cache_reprocessing_change_detection, + ignore_reset_requirements=ignore_reset_requirements, + json=json, + template_url=self.create_or_update.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') - if disable_cache_reprocessing_change_detection is not None: - query_parameters['disableCacheReprocessingChangeDetection'] = self._serialize.query("disable_cache_reprocessing_change_detection", disable_cache_reprocessing_change_detection, 'bool') - if ignore_reset_requirements is not None: - query_parameters['ignoreResetRequirements'] = self._serialize.query("ignore_reset_requirements", ignore_reset_requirements, 'bool') - - # 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -267,8 +658,11 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/indexers(\'{indexerName}\')'} # type: ignore + + @distributed_trace def delete( self, indexer_name, # type: str @@ -300,37 +694,24 @@ def delete( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.delete.metadata['url'] # type: ignore + request = build_delete_request( + indexer_name=indexer_name, + 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'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -343,6 +724,8 @@ def delete( delete.metadata = {'url': '/indexers(\'{indexerName}\')'} # type: ignore + + @distributed_trace def get( self, indexer_name, # type: str @@ -366,33 +749,22 @@ def get( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore + request = build_get_request( + indexer_name=indexer_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') + 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') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -406,8 +778,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/indexers(\'{indexerName}\')'} # type: ignore + + @distributed_trace def list( self, select=None, # type: Optional[str] @@ -433,34 +808,22 @@ def list( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.list.metadata['url'] # type: ignore + request = build_list_request( + select=select, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.list.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -474,8 +837,11 @@ def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/indexers'} # type: ignore + + @distributed_trace def create( self, indexer, # type: "_models.SearchIndexer" @@ -499,37 +865,26 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore + json = self._serialize.body(indexer, 'SearchIndexer') + + request = build_create_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.create.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: @@ -543,8 +898,11 @@ def create( return cls(pipeline_response, deserialized, {}) return deserialized + create.metadata = {'url': '/indexers'} # type: ignore + + @distributed_trace def get_status( self, indexer_name, # type: str @@ -568,33 +926,22 @@ def get_status( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get_status.metadata['url'] # type: ignore + request = build_get_status_request( + indexer_name=indexer_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get_status.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexerName': self._serialize.url("indexer_name", indexer_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.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') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -608,4 +955,6 @@ def get_status( return cls(pipeline_response, deserialized, {}) return deserialized + 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 edbae386616f..c5a7e11c1930 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 @@ -5,13 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING 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 HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.pipeline.transport._base import _format_url_section +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models @@ -22,6 +27,278 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_create_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + 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] + + api_version = "2021-04-30-Preview" + 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 + select = kwargs.pop('select', None) # type: Optional[str] + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + 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] + + prefer = "return=representation" + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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 + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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. @@ -44,6 +321,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def create( self, index, # type: "_models.SearchIndex" @@ -67,37 +345,26 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore + json = self._serialize.body(index, 'SearchIndex') + + request = build_create_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.create.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: @@ -111,8 +378,11 @@ def create( return cls(pipeline_response, deserialized, {}) return deserialized + create.metadata = {'url': '/indexes'} # type: ignore + + @distributed_trace def list( self, select=None, # type: Optional[str] @@ -138,46 +408,45 @@ def list( 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 = "2021-04-30-Preview" - 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: - # Construct URL - url = self.list.metadata['url'] # type: ignore + _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( + select=select, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.list.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] + _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( + select=select, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=next_link, + )._to_pipeline_transport_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), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) + request.method = "GET" 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) @@ -190,17 +459,19 @@ def get_next(next_link=None): 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, response) raise HttpResponseError(response=response, model=error) return pipeline_response + return ItemPaged( get_next, extract_data ) list.metadata = {'url': '/indexes'} # type: ignore + @distributed_trace def create_or_update( self, index_name, # type: str @@ -242,46 +513,30 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - prefer = "return=representation" - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + json = self._serialize.body(index, 'SearchIndex') + + request = build_create_or_update_request( + index_name=index_name, + content_type=content_type, + 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, + json=json, + template_url=self.create_or_update.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexName': self._serialize.url("index_name", index_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -299,8 +554,11 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore + + @distributed_trace def delete( self, index_name, # type: str @@ -334,37 +592,24 @@ def delete( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.delete.metadata['url'] # type: ignore + request = build_delete_request( + index_name=index_name, + 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'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexName': self._serialize.url("index_name", index_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -377,6 +622,8 @@ def delete( delete.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore + + @distributed_trace def get( self, index_name, # type: str @@ -400,33 +647,22 @@ def get( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore + request = build_get_request( + index_name=index_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexName': self._serialize.url("index_name", index_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.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') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -440,8 +676,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/indexes(\'{indexName}\')'} # type: ignore + + @distributed_trace def get_statistics( self, index_name, # type: str @@ -465,33 +704,22 @@ def get_statistics( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get_statistics.metadata['url'] # type: ignore + request = build_get_statistics_request( + index_name=index_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get_statistics.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexName': self._serialize.url("index_name", index_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.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') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -505,8 +733,11 @@ def get_statistics( return cls(pipeline_response, deserialized, {}) return deserialized + get_statistics.metadata = {'url': '/indexes(\'{indexName}\')/search.stats'} # type: ignore + + @distributed_trace def analyze( self, index_name, # type: str @@ -533,38 +764,27 @@ def analyze( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.analyze.metadata['url'] # type: ignore + json = self._serialize.body(request, 'AnalyzeRequest') + + request = build_analyze_request( + index_name=index_name, + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.analyze.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'indexName': self._serialize.url("index_name", index_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -578,4 +798,6 @@ def analyze( return cls(pipeline_response, deserialized, {}) return deserialized + 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 3c79b0d83faa..c717faa75ed0 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 @@ -5,12 +5,16 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING 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 HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models @@ -21,8 +25,42 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_get_service_statistics_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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"] @@ -43,32 +81,21 @@ def get_service_statistics( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get_service_statistics.metadata['url'] # type: ignore + request = build_get_service_statistics_request( + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get_service_statistics.metadata['url'], + )._to_pipeline_transport_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), } - 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') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -82,4 +109,6 @@ def get_service_statistics( return cls(pipeline_response, deserialized, {}) return deserialized + 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 5a18fca7d630..55ca1000e361 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 @@ -5,12 +5,17 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING 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 HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.pipeline.transport._base import _format_url_section +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models @@ -21,6 +26,206 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_create_or_update_request( + skillset_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + 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] + disable_cache_reprocessing_change_detection = kwargs.pop('disable_cache_reprocessing_change_detection', None) # type: Optional[bool] + ignore_reset_requirements = kwargs.pop('ignore_reset_requirements', None) # type: Optional[bool] + + prefer = "return=representation" + api_version = "2021-04-30-Preview" + 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 disable_cache_reprocessing_change_detection is not None: + query_parameters['disableCacheReprocessingChangeDetection'] = _SERIALIZER.query("disable_cache_reprocessing_change_detection", disable_cache_reprocessing_change_detection, 'bool') + if ignore_reset_requirements is not None: + query_parameters['ignoreResetRequirements'] = _SERIALIZER.query("ignore_reset_requirements", ignore_reset_requirements, '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 + 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] + + api_version = "2021-04-30-Preview" + 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 + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + select = kwargs.pop('select', None) # type: Optional[str] + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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 + ) + +# fmt: on class SkillsetsOperations(object): """SkillsetsOperations operations. @@ -43,6 +248,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def create_or_update( self, skillset_name, # type: str @@ -85,48 +291,31 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - prefer = "return=representation" - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + json = self._serialize.body(skillset, 'SearchIndexerSkillset') + + request = build_create_or_update_request( + skillset_name=skillset_name, + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + if_match=if_match, + if_none_match=if_none_match, + disable_cache_reprocessing_change_detection=disable_cache_reprocessing_change_detection, + ignore_reset_requirements=ignore_reset_requirements, + json=json, + template_url=self.create_or_update.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'skillsetName': self._serialize.url("skillset_name", skillset_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') - if disable_cache_reprocessing_change_detection is not None: - query_parameters['disableCacheReprocessingChangeDetection'] = self._serialize.query("disable_cache_reprocessing_change_detection", disable_cache_reprocessing_change_detection, 'bool') - if ignore_reset_requirements is not None: - query_parameters['ignoreResetRequirements'] = self._serialize.query("ignore_reset_requirements", ignore_reset_requirements, 'bool') - - # 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -144,8 +333,11 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/skillsets(\'{skillsetName}\')'} # type: ignore + + @distributed_trace def delete( self, skillset_name, # type: str @@ -177,37 +369,24 @@ def delete( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.delete.metadata['url'] # type: ignore + request = build_delete_request( + skillset_name=skillset_name, + 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'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'skillsetName': self._serialize.url("skillset_name", skillset_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -220,6 +399,8 @@ def delete( delete.metadata = {'url': '/skillsets(\'{skillsetName}\')'} # type: ignore + + @distributed_trace def get( self, skillset_name, # type: str @@ -243,33 +424,22 @@ def get( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore + request = build_get_request( + skillset_name=skillset_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'skillsetName': self._serialize.url("skillset_name", skillset_name, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -283,8 +453,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/skillsets(\'{skillsetName}\')'} # type: ignore + + @distributed_trace def list( self, select=None, # type: Optional[str] @@ -310,34 +483,22 @@ def list( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.list.metadata['url'] # type: ignore + request = build_list_request( + select=select, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.list.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -351,8 +512,11 @@ def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/skillsets'} # type: ignore + + @distributed_trace def create( self, skillset, # type: "_models.SearchIndexerSkillset" @@ -376,37 +540,26 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore + json = self._serialize.body(skillset, 'SearchIndexerSkillset') + + request = build_create_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.create.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: @@ -420,4 +573,6 @@ def create( return cls(pipeline_response, deserialized, {}) return deserialized + 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 d061bcec2898..0ce0864491c3 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 @@ -5,12 +5,17 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING 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 HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.pipeline.transport._base import _format_url_section +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models @@ -21,6 +26,200 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_create_or_update_request( + synonym_map_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + 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] + + prefer = "return=representation" + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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 + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + select = kwargs.pop('select', None) # type: Optional[str] + x_ms_client_request_id = kwargs.pop('x_ms_client_request_id', None) # type: Optional[str] + + api_version = "2021-04-30-Preview" + 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 + 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] + + api_version = "2021-04-30-Preview" + 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. @@ -43,6 +242,7 @@ 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 @@ -77,44 +277,29 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - prefer = "return=representation" - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + json = self._serialize.body(synonym_map, 'SynonymMap') + + request = build_create_or_update_request( + synonym_map_name=synonym_map_name, + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + if_match=if_match, + if_none_match=if_none_match, + json=json, + template_url=self.create_or_update.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - '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'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -132,8 +317,11 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized + create_or_update.metadata = {'url': '/synonymmaps(\'{synonymMapName}\')'} # type: ignore + + @distributed_trace def delete( self, synonym_map_name, # type: str @@ -165,37 +353,24 @@ def delete( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.delete.metadata['url'] # type: ignore + request = build_delete_request( + synonym_map_name=synonym_map_name, + 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'], + )._to_pipeline_transport_request() path_format_arguments = { - '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'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -208,6 +383,8 @@ def delete( delete.metadata = {'url': '/synonymmaps(\'{synonymMapName}\')'} # type: ignore + + @distributed_trace def get( self, synonym_map_name, # type: str @@ -231,33 +408,22 @@ def get( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore + request = build_get_request( + synonym_map_name=synonym_map_name, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.get.metadata['url'], + )._to_pipeline_transport_request() path_format_arguments = { - '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'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - 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') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -271,8 +437,11 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/synonymmaps(\'{synonymMapName}\')'} # type: ignore + + @distributed_trace def list( self, select=None, # type: Optional[str] @@ -298,34 +467,22 @@ def list( 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 = "2021-04-30-Preview" - accept = "application/json" - # Construct URL - url = self.list.metadata['url'] # type: ignore + request = build_list_request( + select=select, + x_ms_client_request_id=_x_ms_client_request_id, + template_url=self.list.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -339,8 +496,11 @@ def list( return cls(pipeline_response, deserialized, {}) return deserialized + list.metadata = {'url': '/synonymmaps'} # type: ignore + + @distributed_trace def create( self, synonym_map, # type: "_models.SynonymMap" @@ -364,37 +524,26 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - + + 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 - api_version = "2021-04-30-Preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create.metadata['url'] # type: ignore + json = self._serialize.body(synonym_map, 'SynonymMap') + + request = build_create_request( + content_type=content_type, + x_ms_client_request_id=_x_ms_client_request_id, + json=json, + template_url=self.create.metadata['url'], + )._to_pipeline_transport_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), } - 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) + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: @@ -408,4 +557,6 @@ def create( return cls(pipeline_response, deserialized, {}) return deserialized + create.metadata = {'url': '/synonymmaps'} # type: ignore + diff --git a/sdk/search/azure-search-documents/setup.py b/sdk/search/azure-search-documents/setup.py index 53197e7f08a4..446aae1aa38c 100644 --- a/sdk/search/azure-search-documents/setup.py +++ b/sdk/search/azure-search-documents/setup.py @@ -78,7 +78,7 @@ 'azure.search', ]), install_requires=[ - "azure-core<2.0.0,>=1.14.0", + "azure-core<2.0.0,>=1.18.0", "msrest>=0.6.21", "azure-common~=1.1", "typing-extensions" diff --git a/shared_requirements.txt b/shared_requirements.txt index d4abde6017be..bc96cd664b58 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -152,7 +152,7 @@ chardet<5,>=3.0.2 #override azure-ai-textanalytics azure-core<2.0.0,>=1.14.0 #override azure-ai-language-questionanswering azure-core<2.0.0,>=1.16.0 #override azure-ai-language-questionanswering msrest>=0.6.21 -#override azure-search-documents azure-core<2.0.0,>=1.14.0 +#override azure-search-documents azure-core<2.0.0,>=1.18.0 #override azure-ai-formrecognizer msrest>=0.6.21 #override azure-ai-formrecognizer azure-core<2.0.0,>=1.13.0 #override azure-storage-blob azure-core<2.0.0,>=1.10.0