diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/_search_service_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/_search_service_client.py index d049c0cf0dc8..b1d72b617439 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/_search_service_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/_search_service_client.py @@ -29,15 +29,15 @@ class SearchServiceClient(SearchServiceClientOperationsMixin): """Client that can be used to manage and query indexes and documents, as well as manage other resources, on a search service. :ivar data_sources: DataSourcesOperations operations - :vartype data_sources: azure.search.documents.operations.DataSourcesOperations + :vartype data_sources: azure.search.documents.indexes.operations.DataSourcesOperations :ivar indexers: IndexersOperations operations - :vartype indexers: azure.search.documents.operations.IndexersOperations + :vartype indexers: azure.search.documents.indexes.operations.IndexersOperations :ivar skillsets: SkillsetsOperations operations - :vartype skillsets: azure.search.documents.operations.SkillsetsOperations + :vartype skillsets: azure.search.documents.indexes.operations.SkillsetsOperations :ivar synonym_maps: SynonymMapsOperations operations - :vartype synonym_maps: azure.search.documents.operations.SynonymMapsOperations + :vartype synonym_maps: azure.search.documents.indexes.operations.SynonymMapsOperations :ivar indexes: IndexesOperations operations - :vartype indexes: azure.search.documents.operations.IndexesOperations + :vartype indexes: azure.search.documents.indexes.operations.IndexesOperations :param endpoint: The endpoint URL of the search service. :type endpoint: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/_search_service_client_async.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/_search_service_client_async.py index a9b8636149fc..a71bdf2c88bd 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/_search_service_client_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/_search_service_client_async.py @@ -25,15 +25,15 @@ class SearchServiceClient(SearchServiceClientOperationsMixin): """Client that can be used to manage and query indexes and documents, as well as manage other resources, on a search service. :ivar data_sources: DataSourcesOperations operations - :vartype data_sources: azure.search.documents.aio.operations_async.DataSourcesOperations + :vartype data_sources: azure.search.documents.indexes.aio.operations_async.DataSourcesOperations :ivar indexers: IndexersOperations operations - :vartype indexers: azure.search.documents.aio.operations_async.IndexersOperations + :vartype indexers: azure.search.documents.indexes.aio.operations_async.IndexersOperations :ivar skillsets: SkillsetsOperations operations - :vartype skillsets: azure.search.documents.aio.operations_async.SkillsetsOperations + :vartype skillsets: azure.search.documents.indexes.aio.operations_async.SkillsetsOperations :ivar synonym_maps: SynonymMapsOperations operations - :vartype synonym_maps: azure.search.documents.aio.operations_async.SynonymMapsOperations + :vartype synonym_maps: azure.search.documents.indexes.aio.operations_async.SynonymMapsOperations :ivar indexes: IndexesOperations operations - :vartype indexes: azure.search.documents.aio.operations_async.IndexesOperations + :vartype indexes: azure.search.documents.indexes.aio.operations_async.IndexesOperations :param endpoint: The endpoint URL of the search service. :type endpoint: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_data_sources_operations_async.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_data_sources_operations_async.py index 5e8069a9d406..d3782d53e7c9 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_data_sources_operations_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_data_sources_operations_async.py @@ -24,7 +24,7 @@ class DataSourcesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.models + :type models: ~azure.search.documents.indexes.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,7 +53,7 @@ async def create_or_update( :param data_source_name: The name of the datasource to create or update. :type data_source_name: str :param data_source: The definition of the datasource to create or update. - :type data_source: ~azure.search.documents.models.SearchIndexerDataSource + :type data_source: ~azure.search.documents.indexes.models.SearchIndexerDataSource :param if_match: Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. :type if_match: str @@ -61,10 +61,10 @@ async def create_or_update( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerDataSource or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerDataSource + :rtype: ~azure.search.documents.indexes.models.SearchIndexerDataSource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerDataSource"] @@ -148,7 +148,7 @@ async def delete( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -210,10 +210,10 @@ async def get( :param data_source_name: The name of the datasource to retrieve. :type data_source_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerDataSource or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerDataSource + :rtype: ~azure.search.documents.indexes.models.SearchIndexerDataSource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerDataSource"] @@ -274,10 +274,10 @@ async def list( properties. :type select: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: ListDataSourcesResult or the result of cls(response) - :rtype: ~azure.search.documents.models.ListDataSourcesResult + :rtype: ~azure.search.documents.indexes.models.ListDataSourcesResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ListDataSourcesResult"] @@ -335,12 +335,12 @@ async def create( """Creates a new datasource. :param data_source: The definition of the datasource to create. - :type data_source: ~azure.search.documents.models.SearchIndexerDataSource + :type data_source: ~azure.search.documents.indexes.models.SearchIndexerDataSource :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerDataSource or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerDataSource + :rtype: ~azure.search.documents.indexes.models.SearchIndexerDataSource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerDataSource"] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_indexers_operations_async.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_indexers_operations_async.py index 4d5b5c3466a9..43febb2b23e8 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_indexers_operations_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_indexers_operations_async.py @@ -24,7 +24,7 @@ class IndexersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.models + :type models: ~azure.search.documents.indexes.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ async def reset( :param indexer_name: The name of the indexer to reset. :type indexer_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -108,7 +108,7 @@ async def run( :param indexer_name: The name of the indexer to run. :type indexer_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -169,7 +169,7 @@ async def create_or_update( :param indexer_name: The name of the indexer to create or update. :type indexer_name: str :param indexer: The definition of the indexer to create or update. - :type indexer: ~azure.search.documents.models.SearchIndexer + :type indexer: ~azure.search.documents.indexes.models.SearchIndexer :param if_match: Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. :type if_match: str @@ -177,10 +177,10 @@ async def create_or_update( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexer or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexer + :rtype: ~azure.search.documents.indexes.models.SearchIndexer :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexer"] @@ -264,7 +264,7 @@ async def delete( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -326,10 +326,10 @@ async def get( :param indexer_name: The name of the indexer to retrieve. :type indexer_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexer or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexer + :rtype: ~azure.search.documents.indexes.models.SearchIndexer :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexer"] @@ -390,10 +390,10 @@ async def list( properties. :type select: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: ListIndexersResult or the result of cls(response) - :rtype: ~azure.search.documents.models.ListIndexersResult + :rtype: ~azure.search.documents.indexes.models.ListIndexersResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ListIndexersResult"] @@ -451,12 +451,12 @@ async def create( """Creates a new indexer. :param indexer: The definition of the indexer to create. - :type indexer: ~azure.search.documents.models.SearchIndexer + :type indexer: ~azure.search.documents.indexes.models.SearchIndexer :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexer or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexer + :rtype: ~azure.search.documents.indexes.models.SearchIndexer :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexer"] @@ -520,10 +520,10 @@ async def get_status( :param indexer_name: The name of the indexer for which to retrieve status. :type indexer_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerStatus or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerStatus + :rtype: ~azure.search.documents.indexes.models.SearchIndexerStatus :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerStatus"] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_indexes_operations_async.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_indexes_operations_async.py index ce6b938f8148..44a0d72e616a 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_indexes_operations_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_indexes_operations_async.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +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 HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest @@ -24,7 +25,7 @@ class IndexesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.models + :type models: ~azure.search.documents.indexes.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,18 +49,18 @@ async def create( """Creates a new search index. :param index: The definition of the index to create. - :type index: ~azure.search.documents.models.SearchIndex + :type index: ~azure.search.documents.indexes.models.SearchIndex :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndex or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndex + :rtype: ~azure.search.documents.indexes.models.SearchIndex :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndex"] error_map = {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 @@ -106,69 +107,88 @@ async def create( return deserialized create.metadata = {'url': '/indexes'} # type: ignore - async def list( + def list( self, select: Optional[str] = None, request_options: Optional["models.RequestOptions"] = None, **kwargs - ) -> "models.ListIndexesResult": + ) -> AsyncIterable["models.ListIndexesResult"]: """Lists all indexes available for a search service. :param select: Selects which top-level properties of the index definitions to retrieve. - Specified as a comma-separated list of JSON property names, or '*' for all properties. The - default is all properties. + Specified as a comma-separated list of JSON property names, or '*' for all properties. The + default is all properties. :type select: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: ListIndexesResult or the result of cls(response) - :rtype: ~azure.search.documents.models.ListIndexesResult + :return: An iterator like instance of ListIndexesResult or the result of cls(response) + :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"] error_map = {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 = "2019-05-06-Preview" - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - 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'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.SearchError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('ListIndexesResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + 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') + + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(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'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListIndexesResult', pipeline_response) + list_of_elem = deserialized.indexes + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.SearchError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) list.metadata = {'url': '/indexes'} # type: ignore async def create_or_update( @@ -186,7 +206,7 @@ async def create_or_update( :param index_name: The definition of the index to create or update. :type index_name: str :param index: The definition of the index to create or update. - :type index: ~azure.search.documents.models.SearchIndex + :type index: ~azure.search.documents.indexes.models.SearchIndex :param allow_index_downtime: Allows new analyzers, tokenizers, token filters, or char filters to be added to an index by taking the index offline for at least a few seconds. This temporarily causes indexing and query requests to fail. Performance and write availability of @@ -200,16 +220,16 @@ async def create_or_update( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndex or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndex + :rtype: ~azure.search.documents.indexes.models.SearchIndex :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndex"] error_map = {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 @@ -289,7 +309,7 @@ async def delete( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -298,7 +318,7 @@ async def delete( cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = {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 @@ -351,16 +371,16 @@ async def get( :param index_name: The name of the index to retrieve. :type index_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndex or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndex + :rtype: ~azure.search.documents.indexes.models.SearchIndex :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndex"] error_map = {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 @@ -413,16 +433,16 @@ async def get_statistics( :param index_name: The name of the index for which to retrieve statistics. :type index_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: GetIndexStatisticsResult or the result of cls(response) - :rtype: ~azure.search.documents.models.GetIndexStatisticsResult + :rtype: ~azure.search.documents.indexes.models.GetIndexStatisticsResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.GetIndexStatisticsResult"] error_map = {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 @@ -476,18 +496,18 @@ async def analyze( :param index_name: The name of the index for which to test an analyzer. :type index_name: str :param request: The text and analyzer or analysis components to test. - :type request: ~azure.search.documents.models.AnalyzeRequest + :type request: ~azure.search.documents.indexes.models.AnalyzeRequest :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: AnalyzeResult or the result of cls(response) - :rtype: ~azure.search.documents.models.AnalyzeResult + :rtype: ~azure.search.documents.indexes.models.AnalyzeResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.AnalyzeResult"] error_map = {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 diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_search_service_client_operations_async.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_search_service_client_operations_async.py index 473c7c33fa3b..58d5cc484857 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_search_service_client_operations_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_search_service_client_operations_async.py @@ -27,10 +27,10 @@ async def get_service_statistics( """Gets service level statistics for a search service. :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: ServiceStatistics or the result of cls(response) - :rtype: ~azure.search.documents.models.ServiceStatistics + :rtype: ~azure.search.documents.indexes.models.ServiceStatistics :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ServiceStatistics"] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_skillsets_operations_async.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_skillsets_operations_async.py index 693760d1612b..989641d054d3 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_skillsets_operations_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_skillsets_operations_async.py @@ -24,7 +24,7 @@ class SkillsetsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.models + :type models: ~azure.search.documents.indexes.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ async def create_or_update( :type skillset_name: str :param skillset: The skillset containing one or more skills to create or update in a search service. - :type skillset: ~azure.search.documents.models.SearchIndexerSkillset + :type skillset: ~azure.search.documents.indexes.models.SearchIndexerSkillset :param if_match: Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. :type if_match: str @@ -62,10 +62,10 @@ async def create_or_update( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerSkillset or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerSkillset + :rtype: ~azure.search.documents.indexes.models.SearchIndexerSkillset :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerSkillset"] @@ -149,7 +149,7 @@ async def delete( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -211,10 +211,10 @@ async def get( :param skillset_name: The name of the skillset to retrieve. :type skillset_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerSkillset or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerSkillset + :rtype: ~azure.search.documents.indexes.models.SearchIndexerSkillset :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerSkillset"] @@ -275,10 +275,10 @@ async def list( properties. :type select: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: ListSkillsetsResult or the result of cls(response) - :rtype: ~azure.search.documents.models.ListSkillsetsResult + :rtype: ~azure.search.documents.indexes.models.ListSkillsetsResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ListSkillsetsResult"] @@ -336,12 +336,12 @@ async def create( """Creates a new skillset in a search service. :param skillset: The skillset containing one or more skills to create in a search service. - :type skillset: ~azure.search.documents.models.SearchIndexerSkillset + :type skillset: ~azure.search.documents.indexes.models.SearchIndexerSkillset :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerSkillset or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerSkillset + :rtype: ~azure.search.documents.indexes.models.SearchIndexerSkillset :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerSkillset"] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_synonym_maps_operations_async.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_synonym_maps_operations_async.py index 1df4d8001380..f2c1d4f3c259 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_synonym_maps_operations_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/aio/operations_async/_synonym_maps_operations_async.py @@ -24,7 +24,7 @@ class SynonymMapsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.models + :type models: ~azure.search.documents.indexes.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,7 +53,7 @@ async def create_or_update( :param synonym_map_name: The name of the synonym map to create or update. :type synonym_map_name: str :param synonym_map: The definition of the synonym map to create or update. - :type synonym_map: ~azure.search.documents.models.SynonymMap + :type synonym_map: ~azure.search.documents.indexes.models.SynonymMap :param if_match: Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. :type if_match: str @@ -61,10 +61,10 @@ async def create_or_update( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SynonymMap or the result of cls(response) - :rtype: ~azure.search.documents.models.SynonymMap + :rtype: ~azure.search.documents.indexes.models.SynonymMap :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SynonymMap"] @@ -148,7 +148,7 @@ async def delete( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -210,10 +210,10 @@ async def get( :param synonym_map_name: The name of the synonym map to retrieve. :type synonym_map_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SynonymMap or the result of cls(response) - :rtype: ~azure.search.documents.models.SynonymMap + :rtype: ~azure.search.documents.indexes.models.SynonymMap :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SynonymMap"] @@ -274,10 +274,10 @@ async def list( properties. :type select: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: ListSynonymMapsResult or the result of cls(response) - :rtype: ~azure.search.documents.models.ListSynonymMapsResult + :rtype: ~azure.search.documents.indexes.models.ListSynonymMapsResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ListSynonymMapsResult"] @@ -335,12 +335,12 @@ async def create( """Creates a new synonym map. :param synonym_map: The definition of the synonym map to create. - :type synonym_map: ~azure.search.documents.models.SynonymMap + :type synonym_map: ~azure.search.documents.indexes.models.SynonymMap :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SynonymMap or the result of cls(response) - :rtype: ~azure.search.documents.models.SynonymMap + :rtype: ~azure.search.documents.indexes.models.SynonymMap :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SynonymMap"] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/models/_models.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/models/_models.py index 23293adcf2b6..b284a982b199 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/models/_models.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/models/_models.py @@ -81,16 +81,16 @@ class AnalyzeRequest(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.models.LexicalAnalyzerName + :type analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName :param tokenizer: The name of the tokenizer to use to break the given text. If this parameter is not specified, you must specify an analyzer instead. The tokenizer and analyzer parameters are mutually exclusive. Possible values include: "classic", "edgeNGram", "keyword_v2", "letter", "lowercase", "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", "nGram", "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", "whitespace". - :type tokenizer: str or ~azure.search.documents.models.LexicalTokenizerName + :type tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName :param token_filters: An optional list of token filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter. - :type token_filters: list[str or ~azure.search.documents.models.TokenFilterName] + :type token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] :param char_filters: An optional list of character filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter. :type char_filters: list[str] @@ -126,7 +126,7 @@ 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.models.AnalyzedTokenInfo] + :type tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo] """ _validation = { @@ -375,7 +375,8 @@ class CjkBigramTokenFilter(TokenFilter): limited to 128 characters. :type name: str :param ignore_scripts: The scripts to ignore. - :type ignore_scripts: list[str or ~azure.search.documents.models.CjkBigramTokenFilterScripts] + :type 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 true), or just bigrams (if false). Default is false. :type output_unigrams: bool @@ -649,10 +650,10 @@ class SearchIndexerSkill(msrest.serialization.Model): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] """ _validation = { @@ -707,10 +708,10 @@ class ConditionalSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] """ _validation = { @@ -825,11 +826,11 @@ class CustomAnalyzer(LexicalAnalyzer): "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.models.LexicalTokenizerName + :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.models.TokenFilterName] + :type token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] :param char_filters: A list of character filters used to prepare input text before it is processed by the tokenizer. For instance, they can replace certain characters or symbols. The filters are run in the order in which they are listed. @@ -1054,7 +1055,7 @@ class ScoringFunction(msrest.serialization.Model): :param 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.models.ScoringFunctionInterpolation + :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation """ _validation = { @@ -1101,9 +1102,9 @@ class DistanceScoringFunction(ScoringFunction): :param 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.models.ScoringFunctionInterpolation + :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.models.DistanceScoringParameters + :type parameters: ~azure.search.documents.indexes.models.DistanceScoringParameters """ _validation = { @@ -1181,7 +1182,7 @@ class EdgeNGramTokenFilter(TokenFilter): :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.models.EdgeNGramTokenFilterSide + :type side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide """ _validation = { @@ -1227,7 +1228,7 @@ class EdgeNGramTokenFilterV2(TokenFilter): :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.models.EdgeNGramTokenFilterSide + :type side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide """ _validation = { @@ -1274,7 +1275,7 @@ class EdgeNGramTokenizer(LexicalTokenizer): :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.models.TokenCharacterKind] + :type token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] """ _validation = { @@ -1359,17 +1360,17 @@ class EntityRecognitionSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :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.models.EntityCategory] + :type categories: list[str or ~azure.search.documents.indexes.models.EntityCategory] :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "ar", "cs", "zh-Hans", "zh-Hant", "da", "nl", "en", "fi", "fr", "de", "el", "hu", "it", "ja", "ko", "no", "pl", "pt-PT", "pt-BR", "ru", "es", "sv", "tr". :type default_language_code: str or - ~azure.search.documents.models.EntityRecognitionSkillLanguage + ~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 @@ -1423,7 +1424,7 @@ class FieldMapping(msrest.serialization.Model): 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.models.FieldMappingFunction + :type mapping_function: ~azure.search.documents.indexes.models.FieldMappingFunction """ _validation = { @@ -1492,9 +1493,9 @@ class FreshnessScoringFunction(ScoringFunction): :param 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.models.ScoringFunctionInterpolation + :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.models.FreshnessScoringParameters + :type parameters: ~azure.search.documents.indexes.models.FreshnessScoringParameters """ _validation = { @@ -1630,17 +1631,18 @@ class ImageAnalysisSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "en", "es", "ja", "pt", "zh". - :type default_language_code: str or ~azure.search.documents.models.ImageAnalysisSkillLanguage + :type 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.models.VisualFeature] + :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.models.ImageDetail] + :type details: list[str or ~azure.search.documents.indexes.models.ImageDetail] """ _validation = { @@ -1681,7 +1683,7 @@ 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.models.IndexerExecutionStatus + :vartype status: str or ~azure.search.documents.indexes.models.IndexerExecutionStatus :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. @@ -1689,9 +1691,9 @@ class IndexerExecutionResult(msrest.serialization.Model): :ivar end_time: The end time of this indexer execution, if the execution has already completed. :vartype end_time: ~datetime.datetime :ivar errors: Required. The item-level indexing errors. - :vartype errors: list[~azure.search.documents.models.SearchIndexerError] + :vartype errors: list[~azure.search.documents.indexes.models.SearchIndexerError] :ivar warnings: Required. The item-level indexing warnings. - :vartype warnings: list[~azure.search.documents.models.SearchIndexerWarning] + :vartype warnings: list[~azure.search.documents.indexes.models.SearchIndexerWarning] :ivar item_count: Required. The number of items that were processed during this indexer execution. This includes both successfully processed items and items where indexing was attempted but failed. @@ -1824,7 +1826,7 @@ class InputFieldMappingEntry(msrest.serialization.Model): :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.models.InputFieldMappingEntry] + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] """ _validation = { @@ -1911,15 +1913,15 @@ class KeyPhraseExtractionSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "nl", "en", "fi", "fr", "de", "it", "ja", "ko", "no", "pl", "pt- PT", "pt-BR", "ru", "es", "sv". :type default_language_code: str or - ~azure.search.documents.models.KeyPhraseExtractionSkillLanguage + ~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 @@ -2088,10 +2090,10 @@ class LanguageDetectionSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] """ _validation = { @@ -2209,7 +2211,7 @@ class ListDataSourcesResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar data_sources: Required. The datasources in the Search service. - :vartype data_sources: list[~azure.search.documents.models.SearchIndexerDataSource] + :vartype data_sources: list[~azure.search.documents.indexes.models.SearchIndexerDataSource] """ _validation = { @@ -2236,7 +2238,7 @@ class ListIndexersResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar indexers: Required. The indexers in the Search service. - :vartype indexers: list[~azure.search.documents.models.SearchIndexer] + :vartype indexers: list[~azure.search.documents.indexes.models.SearchIndexer] """ _validation = { @@ -2263,7 +2265,7 @@ class ListIndexesResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar indexes: Required. The indexes in the Search service. - :vartype indexes: list[~azure.search.documents.models.SearchIndex] + :vartype indexes: list[~azure.search.documents.indexes.models.SearchIndex] """ _validation = { @@ -2290,7 +2292,7 @@ class ListSkillsetsResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar skillsets: Required. The skillsets defined in the Search service. - :vartype skillsets: list[~azure.search.documents.models.SearchIndexerSkillset] + :vartype skillsets: list[~azure.search.documents.indexes.models.SearchIndexerSkillset] """ _validation = { @@ -2317,7 +2319,7 @@ class ListSynonymMapsResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar synonym_maps: Required. The synonym maps in the Search service. - :vartype synonym_maps: list[~azure.search.documents.models.SynonymMap] + :vartype synonym_maps: list[~azure.search.documents.indexes.models.SynonymMap] """ _validation = { @@ -2469,9 +2471,9 @@ class MagnitudeScoringFunction(ScoringFunction): :param 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.models.ScoringFunctionInterpolation + :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.models.MagnitudeScoringParameters + :type parameters: ~azure.search.documents.indexes.models.MagnitudeScoringParameters """ _validation = { @@ -2591,10 +2593,10 @@ class MergeSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param insert_pre_tag: The tag indicates the start of the merged text. By default, the tag is an empty space. :type insert_pre_tag: str @@ -2657,7 +2659,8 @@ class MicrosoftLanguageStemmingTokenizer(LexicalTokenizer): "marathi", "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", "romanian", "russian", "serbianCyrillic", "serbianLatin", "slovak", "slovenian", "spanish", "swedish", "tamil", "telugu", "turkish", "ukrainian", "urdu". - :type language: str or ~azure.search.documents.models.MicrosoftStemmingTokenizerLanguage + :type language: str or + ~azure.search.documents.indexes.models.MicrosoftStemmingTokenizerLanguage """ _validation = { @@ -2712,7 +2715,7 @@ class MicrosoftLanguageTokenizer(LexicalTokenizer): "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.models.MicrosoftTokenizerLanguage + :type language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage """ _validation = { @@ -2842,7 +2845,7 @@ class NGramTokenizer(LexicalTokenizer): :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.models.TokenCharacterKind] + :type token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] """ _validation = { @@ -2891,18 +2894,19 @@ class OcrSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param text_extraction_algorithm: A value indicating which algorithm to use for extracting text. Default is printed. Possible values include: "printed", "handwritten". - :type text_extraction_algorithm: str or ~azure.search.documents.models.TextExtractionAlgorithm + :type text_extraction_algorithm: str or + ~azure.search.documents.indexes.models.TextExtractionAlgorithm :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "zh-Hans", "zh-Hant", "cs", "da", "nl", "en", "fi", "fr", "de", "el", "hu", "it", "ja", "ko", "nb", "pl", "pt", "ru", "es", "sv", "tr", "ar", "ro", "sr-Cyrl", "sr- Latn", "sk". - :type default_language_code: str or ~azure.search.documents.models.OcrSkillLanguage + :type default_language_code: str or ~azure.search.documents.indexes.models.OcrSkillLanguage :param should_detect_orientation: A value indicating to turn orientation detection on or not. Default is false. :type should_detect_orientation: bool @@ -3040,7 +3044,7 @@ class PatternAnalyzer(LexicalAnalyzer): :type pattern: str :param flags: Regular expression flags. Possible values include: "CANON_EQ", "CASE_INSENSITIVE", "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". - :type flags: str or ~azure.search.documents.models.RegexFlags + :type flags: str or ~azure.search.documents.indexes.models.RegexFlags :param stopwords: A list of stopwords. :type stopwords: list[str] """ @@ -3214,7 +3218,7 @@ class PatternTokenizer(LexicalTokenizer): :type pattern: str :param flags: Regular expression flags. Possible values include: "CANON_EQ", "CASE_INSENSITIVE", "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". - :type flags: str or ~azure.search.documents.models.RegexFlags + :type flags: str or ~azure.search.documents.indexes.models.RegexFlags :param group: The zero-based ordinal of the matching group in the regular expression pattern to extract into tokens. Use -1 if you want to use the entire pattern to split the input into tokens, irrespective of matching groups. Default is -1. @@ -3260,7 +3264,7 @@ class PhoneticTokenFilter(TokenFilter): :param 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.models.PhoneticEncoder + :type encoder: str or ~azure.search.documents.indexes.models.PhoneticEncoder :param replace_original_tokens: A value indicating whether encoded tokens should replace original tokens. If false, encoded tokens are added as synonyms. Default is true. :type replace_original_tokens: bool @@ -3345,13 +3349,14 @@ class ScoringProfile(msrest.serialization.Model): :type name: str :param text_weights: Parameters that boost scoring based on text matches in certain index fields. - :type text_weights: ~azure.search.documents.models.TextWeights + :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.models.ScoringFunction] + :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 ~azure.search.documents.models.ScoringFunctionAggregation + :type function_aggregation: str or + ~azure.search.documents.indexes.models.ScoringFunctionAggregation """ _validation = { @@ -3388,7 +3393,7 @@ class SearchError(msrest.serialization.Model): :ivar message: Required. A human-readable representation of the error. :vartype message: str :ivar details: An array of details about specific errors that led to this reported error. - :vartype details: list[~azure.search.documents.models.SearchError] + :vartype details: list[~azure.search.documents.indexes.models.SearchError] """ _validation = { @@ -3424,7 +3429,7 @@ class SearchField(msrest.serialization.Model): :param type: Required. The data type of the field. Possible values include: "Edm.String", "Edm.Int32", "Edm.Int64", "Edm.Double", "Edm.Boolean", "Edm.DateTimeOffset", "Edm.GeographyPoint", "Edm.ComplexType". - :type type: str or ~azure.search.documents.models.SearchFieldDataType + :type type: str or ~azure.search.documents.indexes.models.SearchFieldDataType :param key: A value indicating whether the field uniquely identifies documents in the index. Exactly one top-level field in each index must be chosen as the key field and it must be of type Edm.String. Key fields can be used to look up documents directly and update or delete @@ -3492,7 +3497,7 @@ 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.models.LexicalAnalyzerName + :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 @@ -3515,7 +3520,7 @@ 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.models.LexicalAnalyzerName + :type search_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName :param index_analyzer: The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of @@ -3538,7 +3543,7 @@ 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.models.LexicalAnalyzerName + :type index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName :param synonym_maps: A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are @@ -3547,7 +3552,7 @@ class SearchField(msrest.serialization.Model): :type synonym_maps: list[str] :param fields: A list of sub-fields if this is a field of type Edm.ComplexType or Collection(Edm.ComplexType). Must be null or empty for simple fields. - :type fields: list[~azure.search.documents.models.SearchField] + :type fields: list[~azure.search.documents.indexes.models.SearchField] """ _validation = { @@ -3599,25 +3604,25 @@ class SearchIndex(msrest.serialization.Model): :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.models.SearchField] + :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.models.ScoringProfile] + :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.models.CorsOptions + :type cors_options: ~azure.search.documents.indexes.models.CorsOptions :param suggesters: The suggesters for the index. - :type suggesters: list[~azure.search.documents.models.Suggester] + :type suggesters: list[~azure.search.documents.indexes.models.Suggester] :param analyzers: The analyzers for the index. - :type analyzers: list[~azure.search.documents.models.LexicalAnalyzer] + :type analyzers: list[~azure.search.documents.indexes.models.LexicalAnalyzer] :param tokenizers: The tokenizers for the index. - :type tokenizers: list[~azure.search.documents.models.LexicalTokenizer] + :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.models.TokenFilter] + :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.models.CharFilter] + :type char_filters: list[~azure.search.documents.indexes.models.CharFilter] :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive @@ -3626,12 +3631,12 @@ 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.models.SearchResourceEncryptionKey + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey :param similarity: The type of similarity algorithm to be used when scoring and ranking the documents matching a search query. The similarity algorithm can only be defined at index creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity algorithm is used. - :type similarity: ~azure.search.documents.models.Similarity + :type similarity: ~azure.search.documents.indexes.models.Similarity :param e_tag: The ETag of the index. :type e_tag: str """ @@ -3694,15 +3699,15 @@ class SearchIndexer(msrest.serialization.Model): :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.models.IndexingSchedule + :type schedule: ~azure.search.documents.indexes.models.IndexingSchedule :param parameters: Parameters for indexer execution. - :type parameters: ~azure.search.documents.models.IndexingParameters + :type parameters: ~azure.search.documents.indexes.models.IndexingParameters :param field_mappings: Defines mappings between fields in the data source and corresponding target fields in the index. - :type field_mappings: list[~azure.search.documents.models.FieldMapping] + :type field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] :param output_field_mappings: Output field mappings are applied after enrichment and immediately before indexing. - :type output_field_mappings: list[~azure.search.documents.models.FieldMapping] + :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. @@ -3789,16 +3794,17 @@ class SearchIndexerDataSource(msrest.serialization.Model): :type description: str :param type: Required. The type of the datasource. Possible values include: "azuresql", "cosmosdb", "azureblob", "azuretable", "mysql". - :type type: str or ~azure.search.documents.models.SearchIndexerDataSourceType + :type type: str or ~azure.search.documents.indexes.models.SearchIndexerDataSourceType :param credentials: Required. Credentials for the datasource. - :type credentials: ~azure.search.documents.models.DataSourceCredentials + :type credentials: ~azure.search.documents.indexes.models.DataSourceCredentials :param container: Required. The data container for the datasource. - :type container: ~azure.search.documents.models.SearchIndexerDataContainer + :type container: ~azure.search.documents.indexes.models.SearchIndexerDataContainer :param data_change_detection_policy: The data change detection policy for the datasource. - :type data_change_detection_policy: ~azure.search.documents.models.DataChangeDetectionPolicy + :type 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: - ~azure.search.documents.models.DataDeletionDetectionPolicy + ~azure.search.documents.indexes.models.DataDeletionDetectionPolicy :param e_tag: The ETag of the data source. :type e_tag: str """ @@ -3943,10 +3949,11 @@ class SearchIndexerSkillset(msrest.serialization.Model): :param description: Required. The description of the skillset. :type description: str :param skills: Required. A list of skills in the skillset. - :type skills: list[~azure.search.documents.models.SearchIndexerSkill] + :type skills: list[~azure.search.documents.indexes.models.SearchIndexerSkill] :param cognitive_services_account: Details about cognitive services to be used when running skills. - :type cognitive_services_account: ~azure.search.documents.models.CognitiveServicesAccount + :type cognitive_services_account: + ~azure.search.documents.indexes.models.CognitiveServicesAccount :param e_tag: The ETag of the skillset. :type e_tag: str """ @@ -3986,14 +3993,14 @@ class SearchIndexerStatus(msrest.serialization.Model): :ivar status: Required. Overall indexer status. Possible values include: "unknown", "error", "running". - :vartype status: str or ~azure.search.documents.models.IndexerStatus + :vartype status: str or ~azure.search.documents.indexes.models.IndexerStatus :ivar last_result: The result of the most recent or an in-progress indexer execution. - :vartype last_result: ~azure.search.documents.models.IndexerExecutionResult + :vartype last_result: ~azure.search.documents.indexes.models.IndexerExecutionResult :ivar execution_history: Required. History of the recent indexer executions, sorted in reverse chronological order. - :vartype execution_history: list[~azure.search.documents.models.IndexerExecutionResult] + :vartype execution_history: list[~azure.search.documents.indexes.models.IndexerExecutionResult] :ivar limits: Required. The execution limits for the indexer. - :vartype limits: ~azure.search.documents.models.SearchIndexerLimits + :vartype limits: ~azure.search.documents.indexes.models.SearchIndexerLimits """ _validation = { @@ -4090,7 +4097,7 @@ class SearchResourceEncryptionKey(msrest.serialization.Model): :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: - ~azure.search.documents.models.AzureActiveDirectoryApplicationCredentials + ~azure.search.documents.indexes.models.AzureActiveDirectoryApplicationCredentials """ _validation = { @@ -4137,14 +4144,15 @@ class SentimentSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "nl", "en", "fi", "fr", "de", "el", "it", "no", "pl", "pt-PT", "ru", "es", "sv", "tr". - :type default_language_code: str or ~azure.search.documents.models.SentimentSkillLanguage + :type default_language_code: str or + ~azure.search.documents.indexes.models.SentimentSkillLanguage """ _validation = { @@ -4178,19 +4186,19 @@ 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.models.ResourceCounter + :type document_counter: ~azure.search.documents.indexes.models.ResourceCounter :param index_counter: Required. Total number of indexes. - :type index_counter: ~azure.search.documents.models.ResourceCounter + :type index_counter: ~azure.search.documents.indexes.models.ResourceCounter :param indexer_counter: Required. Total number of indexers. - :type indexer_counter: ~azure.search.documents.models.ResourceCounter + :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.models.ResourceCounter + :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.models.ResourceCounter + :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.models.ResourceCounter + :type synonym_map_counter: ~azure.search.documents.indexes.models.ResourceCounter :param skillset_counter: Required. Total number of skillsets. - :type skillset_counter: ~azure.search.documents.models.ResourceCounter + :type skillset_counter: ~azure.search.documents.indexes.models.ResourceCounter """ _validation = { @@ -4267,9 +4275,9 @@ 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.models.ServiceCounters + :type counters: ~azure.search.documents.indexes.models.ServiceCounters :param limits: Required. Service level general limits. - :type limits: ~azure.search.documents.models.ServiceLimits + :type limits: ~azure.search.documents.indexes.models.ServiceLimits """ _validation = { @@ -4311,10 +4319,10 @@ class ShaperSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] """ _validation = { @@ -4420,7 +4428,7 @@ class SnowballTokenFilter(TokenFilter): "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.models.SnowballTokenFilterLanguage + :type language: str or ~azure.search.documents.indexes.models.SnowballTokenFilterLanguage """ _validation = { @@ -4498,16 +4506,16 @@ class SplitSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "de", "en", "es", "fi", "fr", "it", "ko", "pt". - :type default_language_code: str or ~azure.search.documents.models.SplitSkillLanguage + :type default_language_code: str or ~azure.search.documents.indexes.models.SplitSkillLanguage :param text_split_mode: A value indicating which split mode to perform. Possible values include: "pages", "sentences". - :type text_split_mode: str or ~azure.search.documents.models.TextSplitMode + :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 """ @@ -4626,7 +4634,7 @@ class StemmerTokenFilter(TokenFilter): "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.models.StemmerTokenFilterLanguage + :type language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage """ _validation = { @@ -4707,7 +4715,7 @@ class StopwordsTokenFilter(TokenFilter): "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.models.StopwordsList + :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 @@ -4805,7 +4813,7 @@ 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.models.SearchResourceEncryptionKey + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey :param e_tag: The ETag of the synonym map. :type e_tag: str """ @@ -4909,9 +4917,9 @@ class TagScoringFunction(ScoringFunction): :param 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.models.ScoringFunctionInterpolation + :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.models.TagScoringParameters + :type parameters: ~azure.search.documents.indexes.models.TagScoringParameters """ _validation = { @@ -4984,10 +4992,10 @@ class TextTranslationSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param default_to_language_code: Required. The language code to translate documents into for documents that don't specify the to language explicitly. Possible values include: "af", "ar", "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", @@ -4996,7 +5004,7 @@ class TextTranslationSkill(SearchIndexerSkill): "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua". :type default_to_language_code: str or - ~azure.search.documents.models.TextTranslationSkillLanguage + ~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", @@ -5005,7 +5013,7 @@ class TextTranslationSkill(SearchIndexerSkill): "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua". :type default_from_language_code: str or - ~azure.search.documents.models.TextTranslationSkillLanguage + ~azure.search.documents.indexes.models.TextTranslationSkillLanguage :param suggested_from: The language code to translate documents from when neither the fromLanguageCode input nor the defaultFromLanguageCode parameter are provided, and the automatic language detection is unsuccessful. Default is en. Possible values include: "af", @@ -5014,7 +5022,8 @@ class TextTranslationSkill(SearchIndexerSkill): "sw", "tlh", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua". - :type suggested_from: str or ~azure.search.documents.models.TextTranslationSkillLanguage + :type suggested_from: str or + ~azure.search.documents.indexes.models.TextTranslationSkillLanguage """ _validation = { @@ -5205,10 +5214,10 @@ class WebApiSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :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. diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/models/_models_py3.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/models/_models_py3.py index 0dd3e1c170f3..6eba3a04cee0 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/models/_models_py3.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/models/_models_py3.py @@ -86,16 +86,16 @@ class AnalyzeRequest(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.models.LexicalAnalyzerName + :type analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName :param tokenizer: The name of the tokenizer to use to break the given text. If this parameter is not specified, you must specify an analyzer instead. The tokenizer and analyzer parameters are mutually exclusive. Possible values include: "classic", "edgeNGram", "keyword_v2", "letter", "lowercase", "microsoft_language_tokenizer", "microsoft_language_stemming_tokenizer", "nGram", "path_hierarchy_v2", "pattern", "standard_v2", "uax_url_email", "whitespace". - :type tokenizer: str or ~azure.search.documents.models.LexicalTokenizerName + :type tokenizer: str or ~azure.search.documents.indexes.models.LexicalTokenizerName :param token_filters: An optional list of token filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter. - :type token_filters: list[str or ~azure.search.documents.models.TokenFilterName] + :type token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] :param char_filters: An optional list of character filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter. :type char_filters: list[str] @@ -137,7 +137,7 @@ 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.models.AnalyzedTokenInfo] + :type tokens: list[~azure.search.documents.indexes.models.AnalyzedTokenInfo] """ _validation = { @@ -401,7 +401,8 @@ class CjkBigramTokenFilter(TokenFilter): limited to 128 characters. :type name: str :param ignore_scripts: The scripts to ignore. - :type ignore_scripts: list[str or ~azure.search.documents.models.CjkBigramTokenFilterScripts] + :type 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 true), or just bigrams (if false). Default is false. :type output_unigrams: bool @@ -694,10 +695,10 @@ class SearchIndexerSkill(msrest.serialization.Model): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] """ _validation = { @@ -758,10 +759,10 @@ class ConditionalSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] """ _validation = { @@ -887,11 +888,11 @@ class CustomAnalyzer(LexicalAnalyzer): "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.models.LexicalTokenizerName + :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.models.TokenFilterName] + :type token_filters: list[str or ~azure.search.documents.indexes.models.TokenFilterName] :param char_filters: A list of character filters used to prepare input text before it is processed by the tokenizer. For instance, they can replace certain characters or symbols. The filters are run in the order in which they are listed. @@ -1132,7 +1133,7 @@ class ScoringFunction(msrest.serialization.Model): :param 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.models.ScoringFunctionInterpolation + :type interpolation: str or ~azure.search.documents.indexes.models.ScoringFunctionInterpolation """ _validation = { @@ -1183,9 +1184,9 @@ class DistanceScoringFunction(ScoringFunction): :param 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.models.ScoringFunctionInterpolation + :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.models.DistanceScoringParameters + :type parameters: ~azure.search.documents.indexes.models.DistanceScoringParameters """ _validation = { @@ -1271,7 +1272,7 @@ class EdgeNGramTokenFilter(TokenFilter): :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.models.EdgeNGramTokenFilterSide + :type side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide """ _validation = { @@ -1322,7 +1323,7 @@ class EdgeNGramTokenFilterV2(TokenFilter): :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.models.EdgeNGramTokenFilterSide + :type side: str or ~azure.search.documents.indexes.models.EdgeNGramTokenFilterSide """ _validation = { @@ -1374,7 +1375,7 @@ class EdgeNGramTokenizer(LexicalTokenizer): :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.models.TokenCharacterKind] + :type token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] """ _validation = { @@ -1467,17 +1468,17 @@ class EntityRecognitionSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :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.models.EntityCategory] + :type categories: list[str or ~azure.search.documents.indexes.models.EntityCategory] :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "ar", "cs", "zh-Hans", "zh-Hant", "da", "nl", "en", "fi", "fr", "de", "el", "hu", "it", "ja", "ko", "no", "pl", "pt-PT", "pt-BR", "ru", "es", "sv", "tr". :type default_language_code: str or - ~azure.search.documents.models.EntityRecognitionSkillLanguage + ~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 @@ -1541,7 +1542,7 @@ class FieldMapping(msrest.serialization.Model): 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.models.FieldMappingFunction + :type mapping_function: ~azure.search.documents.indexes.models.FieldMappingFunction """ _validation = { @@ -1617,9 +1618,9 @@ class FreshnessScoringFunction(ScoringFunction): :param 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.models.ScoringFunctionInterpolation + :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.models.FreshnessScoringParameters + :type parameters: ~azure.search.documents.indexes.models.FreshnessScoringParameters """ _validation = { @@ -1764,17 +1765,18 @@ class ImageAnalysisSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "en", "es", "ja", "pt", "zh". - :type default_language_code: str or ~azure.search.documents.models.ImageAnalysisSkillLanguage + :type 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.models.VisualFeature] + :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.models.ImageDetail] + :type details: list[str or ~azure.search.documents.indexes.models.ImageDetail] """ _validation = { @@ -1824,7 +1826,7 @@ 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.models.IndexerExecutionStatus + :vartype status: str or ~azure.search.documents.indexes.models.IndexerExecutionStatus :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. @@ -1832,9 +1834,9 @@ class IndexerExecutionResult(msrest.serialization.Model): :ivar end_time: The end time of this indexer execution, if the execution has already completed. :vartype end_time: ~datetime.datetime :ivar errors: Required. The item-level indexing errors. - :vartype errors: list[~azure.search.documents.models.SearchIndexerError] + :vartype errors: list[~azure.search.documents.indexes.models.SearchIndexerError] :ivar warnings: Required. The item-level indexing warnings. - :vartype warnings: list[~azure.search.documents.models.SearchIndexerWarning] + :vartype warnings: list[~azure.search.documents.indexes.models.SearchIndexerWarning] :ivar item_count: Required. The number of items that were processed during this indexer execution. This includes both successfully processed items and items where indexing was attempted but failed. @@ -1975,7 +1977,7 @@ class InputFieldMappingEntry(msrest.serialization.Model): :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.models.InputFieldMappingEntry] + :type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry] """ _validation = { @@ -2071,15 +2073,15 @@ class KeyPhraseExtractionSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "nl", "en", "fi", "fr", "de", "it", "ja", "ko", "no", "pl", "pt- PT", "pt-BR", "ru", "es", "sv". :type default_language_code: str or - ~azure.search.documents.models.KeyPhraseExtractionSkillLanguage + ~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 @@ -2266,10 +2268,10 @@ class LanguageDetectionSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] """ _validation = { @@ -2401,7 +2403,7 @@ class ListDataSourcesResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar data_sources: Required. The datasources in the Search service. - :vartype data_sources: list[~azure.search.documents.models.SearchIndexerDataSource] + :vartype data_sources: list[~azure.search.documents.indexes.models.SearchIndexerDataSource] """ _validation = { @@ -2428,7 +2430,7 @@ class ListIndexersResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar indexers: Required. The indexers in the Search service. - :vartype indexers: list[~azure.search.documents.models.SearchIndexer] + :vartype indexers: list[~azure.search.documents.indexes.models.SearchIndexer] """ _validation = { @@ -2455,7 +2457,7 @@ class ListIndexesResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar indexes: Required. The indexes in the Search service. - :vartype indexes: list[~azure.search.documents.models.SearchIndex] + :vartype indexes: list[~azure.search.documents.indexes.models.SearchIndex] """ _validation = { @@ -2482,7 +2484,7 @@ class ListSkillsetsResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar skillsets: Required. The skillsets defined in the Search service. - :vartype skillsets: list[~azure.search.documents.models.SearchIndexerSkillset] + :vartype skillsets: list[~azure.search.documents.indexes.models.SearchIndexerSkillset] """ _validation = { @@ -2509,7 +2511,7 @@ class ListSynonymMapsResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :ivar synonym_maps: Required. The synonym maps in the Search service. - :vartype synonym_maps: list[~azure.search.documents.models.SynonymMap] + :vartype synonym_maps: list[~azure.search.documents.indexes.models.SynonymMap] """ _validation = { @@ -2671,9 +2673,9 @@ class MagnitudeScoringFunction(ScoringFunction): :param 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.models.ScoringFunctionInterpolation + :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.models.MagnitudeScoringParameters + :type parameters: ~azure.search.documents.indexes.models.MagnitudeScoringParameters """ _validation = { @@ -2805,10 +2807,10 @@ class MergeSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param insert_pre_tag: The tag indicates the start of the merged text. By default, the tag is an empty space. :type insert_pre_tag: str @@ -2879,7 +2881,8 @@ class MicrosoftLanguageStemmingTokenizer(LexicalTokenizer): "marathi", "norwegianBokmaal", "polish", "portuguese", "portugueseBrazilian", "punjabi", "romanian", "russian", "serbianCyrillic", "serbianLatin", "slovak", "slovenian", "spanish", "swedish", "tamil", "telugu", "turkish", "ukrainian", "urdu". - :type language: str or ~azure.search.documents.models.MicrosoftStemmingTokenizerLanguage + :type language: str or + ~azure.search.documents.indexes.models.MicrosoftStemmingTokenizerLanguage """ _validation = { @@ -2939,7 +2942,7 @@ class MicrosoftLanguageTokenizer(LexicalTokenizer): "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.models.MicrosoftTokenizerLanguage + :type language: str or ~azure.search.documents.indexes.models.MicrosoftTokenizerLanguage """ _validation = { @@ -3082,7 +3085,7 @@ class NGramTokenizer(LexicalTokenizer): :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.models.TokenCharacterKind] + :type token_chars: list[str or ~azure.search.documents.indexes.models.TokenCharacterKind] """ _validation = { @@ -3136,18 +3139,19 @@ class OcrSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param text_extraction_algorithm: A value indicating which algorithm to use for extracting text. Default is printed. Possible values include: "printed", "handwritten". - :type text_extraction_algorithm: str or ~azure.search.documents.models.TextExtractionAlgorithm + :type text_extraction_algorithm: str or + ~azure.search.documents.indexes.models.TextExtractionAlgorithm :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "zh-Hans", "zh-Hant", "cs", "da", "nl", "en", "fi", "fr", "de", "el", "hu", "it", "ja", "ko", "nb", "pl", "pt", "ru", "es", "sv", "tr", "ar", "ro", "sr-Cyrl", "sr- Latn", "sk". - :type default_language_code: str or ~azure.search.documents.models.OcrSkillLanguage + :type default_language_code: str or ~azure.search.documents.indexes.models.OcrSkillLanguage :param should_detect_orientation: A value indicating to turn orientation detection on or not. Default is false. :type should_detect_orientation: bool @@ -3304,7 +3308,7 @@ class PatternAnalyzer(LexicalAnalyzer): :type pattern: str :param flags: Regular expression flags. Possible values include: "CANON_EQ", "CASE_INSENSITIVE", "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". - :type flags: str or ~azure.search.documents.models.RegexFlags + :type flags: str or ~azure.search.documents.indexes.models.RegexFlags :param stopwords: A list of stopwords. :type stopwords: list[str] """ @@ -3496,7 +3500,7 @@ class PatternTokenizer(LexicalTokenizer): :type pattern: str :param flags: Regular expression flags. Possible values include: "CANON_EQ", "CASE_INSENSITIVE", "COMMENTS", "DOTALL", "LITERAL", "MULTILINE", "UNICODE_CASE", "UNIX_LINES". - :type flags: str or ~azure.search.documents.models.RegexFlags + :type flags: str or ~azure.search.documents.indexes.models.RegexFlags :param group: The zero-based ordinal of the matching group in the regular expression pattern to extract into tokens. Use -1 if you want to use the entire pattern to split the input into tokens, irrespective of matching groups. Default is -1. @@ -3547,7 +3551,7 @@ class PhoneticTokenFilter(TokenFilter): :param 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.models.PhoneticEncoder + :type encoder: str or ~azure.search.documents.indexes.models.PhoneticEncoder :param replace_original_tokens: A value indicating whether encoded tokens should replace original tokens. If false, encoded tokens are added as synonyms. Default is true. :type replace_original_tokens: bool @@ -3641,13 +3645,14 @@ class ScoringProfile(msrest.serialization.Model): :type name: str :param text_weights: Parameters that boost scoring based on text matches in certain index fields. - :type text_weights: ~azure.search.documents.models.TextWeights + :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.models.ScoringFunction] + :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 ~azure.search.documents.models.ScoringFunctionAggregation + :type function_aggregation: str or + ~azure.search.documents.indexes.models.ScoringFunctionAggregation """ _validation = { @@ -3689,7 +3694,7 @@ class SearchError(msrest.serialization.Model): :ivar message: Required. A human-readable representation of the error. :vartype message: str :ivar details: An array of details about specific errors that led to this reported error. - :vartype details: list[~azure.search.documents.models.SearchError] + :vartype details: list[~azure.search.documents.indexes.models.SearchError] """ _validation = { @@ -3725,7 +3730,7 @@ class SearchField(msrest.serialization.Model): :param type: Required. The data type of the field. Possible values include: "Edm.String", "Edm.Int32", "Edm.Int64", "Edm.Double", "Edm.Boolean", "Edm.DateTimeOffset", "Edm.GeographyPoint", "Edm.ComplexType". - :type type: str or ~azure.search.documents.models.SearchFieldDataType + :type type: str or ~azure.search.documents.indexes.models.SearchFieldDataType :param key: A value indicating whether the field uniquely identifies documents in the index. Exactly one top-level field in each index must be chosen as the key field and it must be of type Edm.String. Key fields can be used to look up documents directly and update or delete @@ -3793,7 +3798,7 @@ 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.models.LexicalAnalyzerName + :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 @@ -3816,7 +3821,7 @@ 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.models.LexicalAnalyzerName + :type search_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName :param index_analyzer: The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of @@ -3839,7 +3844,7 @@ 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.models.LexicalAnalyzerName + :type index_analyzer: str or ~azure.search.documents.indexes.models.LexicalAnalyzerName :param synonym_maps: A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are @@ -3848,7 +3853,7 @@ class SearchField(msrest.serialization.Model): :type synonym_maps: list[str] :param fields: A list of sub-fields if this is a field of type Edm.ComplexType or Collection(Edm.ComplexType). Must be null or empty for simple fields. - :type fields: list[~azure.search.documents.models.SearchField] + :type fields: list[~azure.search.documents.indexes.models.SearchField] """ _validation = { @@ -3914,25 +3919,25 @@ class SearchIndex(msrest.serialization.Model): :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.models.SearchField] + :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.models.ScoringProfile] + :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.models.CorsOptions + :type cors_options: ~azure.search.documents.indexes.models.CorsOptions :param suggesters: The suggesters for the index. - :type suggesters: list[~azure.search.documents.models.Suggester] + :type suggesters: list[~azure.search.documents.indexes.models.Suggester] :param analyzers: The analyzers for the index. - :type analyzers: list[~azure.search.documents.models.LexicalAnalyzer] + :type analyzers: list[~azure.search.documents.indexes.models.LexicalAnalyzer] :param tokenizers: The tokenizers for the index. - :type tokenizers: list[~azure.search.documents.models.LexicalTokenizer] + :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.models.TokenFilter] + :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.models.CharFilter] + :type char_filters: list[~azure.search.documents.indexes.models.CharFilter] :param encryption_key: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive @@ -3941,12 +3946,12 @@ 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.models.SearchResourceEncryptionKey + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey :param similarity: The type of similarity algorithm to be used when scoring and ranking the documents matching a search query. The similarity algorithm can only be defined at index creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity algorithm is used. - :type similarity: ~azure.search.documents.models.Similarity + :type similarity: ~azure.search.documents.indexes.models.Similarity :param e_tag: The ETag of the index. :type e_tag: str """ @@ -4023,15 +4028,15 @@ class SearchIndexer(msrest.serialization.Model): :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.models.IndexingSchedule + :type schedule: ~azure.search.documents.indexes.models.IndexingSchedule :param parameters: Parameters for indexer execution. - :type parameters: ~azure.search.documents.models.IndexingParameters + :type parameters: ~azure.search.documents.indexes.models.IndexingParameters :param field_mappings: Defines mappings between fields in the data source and corresponding target fields in the index. - :type field_mappings: list[~azure.search.documents.models.FieldMapping] + :type field_mappings: list[~azure.search.documents.indexes.models.FieldMapping] :param output_field_mappings: Output field mappings are applied after enrichment and immediately before indexing. - :type output_field_mappings: list[~azure.search.documents.models.FieldMapping] + :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. @@ -4133,16 +4138,17 @@ class SearchIndexerDataSource(msrest.serialization.Model): :type description: str :param type: Required. The type of the datasource. Possible values include: "azuresql", "cosmosdb", "azureblob", "azuretable", "mysql". - :type type: str or ~azure.search.documents.models.SearchIndexerDataSourceType + :type type: str or ~azure.search.documents.indexes.models.SearchIndexerDataSourceType :param credentials: Required. Credentials for the datasource. - :type credentials: ~azure.search.documents.models.DataSourceCredentials + :type credentials: ~azure.search.documents.indexes.models.DataSourceCredentials :param container: Required. The data container for the datasource. - :type container: ~azure.search.documents.models.SearchIndexerDataContainer + :type container: ~azure.search.documents.indexes.models.SearchIndexerDataContainer :param data_change_detection_policy: The data change detection policy for the datasource. - :type data_change_detection_policy: ~azure.search.documents.models.DataChangeDetectionPolicy + :type 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: - ~azure.search.documents.models.DataDeletionDetectionPolicy + ~azure.search.documents.indexes.models.DataDeletionDetectionPolicy :param e_tag: The ETag of the data source. :type e_tag: str """ @@ -4296,10 +4302,11 @@ class SearchIndexerSkillset(msrest.serialization.Model): :param description: Required. The description of the skillset. :type description: str :param skills: Required. A list of skills in the skillset. - :type skills: list[~azure.search.documents.models.SearchIndexerSkill] + :type skills: list[~azure.search.documents.indexes.models.SearchIndexerSkill] :param cognitive_services_account: Details about cognitive services to be used when running skills. - :type cognitive_services_account: ~azure.search.documents.models.CognitiveServicesAccount + :type cognitive_services_account: + ~azure.search.documents.indexes.models.CognitiveServicesAccount :param e_tag: The ETag of the skillset. :type e_tag: str """ @@ -4345,14 +4352,14 @@ class SearchIndexerStatus(msrest.serialization.Model): :ivar status: Required. Overall indexer status. Possible values include: "unknown", "error", "running". - :vartype status: str or ~azure.search.documents.models.IndexerStatus + :vartype status: str or ~azure.search.documents.indexes.models.IndexerStatus :ivar last_result: The result of the most recent or an in-progress indexer execution. - :vartype last_result: ~azure.search.documents.models.IndexerExecutionResult + :vartype last_result: ~azure.search.documents.indexes.models.IndexerExecutionResult :ivar execution_history: Required. History of the recent indexer executions, sorted in reverse chronological order. - :vartype execution_history: list[~azure.search.documents.models.IndexerExecutionResult] + :vartype execution_history: list[~azure.search.documents.indexes.models.IndexerExecutionResult] :ivar limits: Required. The execution limits for the indexer. - :vartype limits: ~azure.search.documents.models.SearchIndexerLimits + :vartype limits: ~azure.search.documents.indexes.models.SearchIndexerLimits """ _validation = { @@ -4449,7 +4456,7 @@ class SearchResourceEncryptionKey(msrest.serialization.Model): :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: - ~azure.search.documents.models.AzureActiveDirectoryApplicationCredentials + ~azure.search.documents.indexes.models.AzureActiveDirectoryApplicationCredentials """ _validation = { @@ -4501,14 +4508,15 @@ class SentimentSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "nl", "en", "fi", "fr", "de", "el", "it", "no", "pl", "pt-PT", "ru", "es", "sv", "tr". - :type default_language_code: str or ~azure.search.documents.models.SentimentSkillLanguage + :type default_language_code: str or + ~azure.search.documents.indexes.models.SentimentSkillLanguage """ _validation = { @@ -4549,19 +4557,19 @@ 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.models.ResourceCounter + :type document_counter: ~azure.search.documents.indexes.models.ResourceCounter :param index_counter: Required. Total number of indexes. - :type index_counter: ~azure.search.documents.models.ResourceCounter + :type index_counter: ~azure.search.documents.indexes.models.ResourceCounter :param indexer_counter: Required. Total number of indexers. - :type indexer_counter: ~azure.search.documents.models.ResourceCounter + :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.models.ResourceCounter + :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.models.ResourceCounter + :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.models.ResourceCounter + :type synonym_map_counter: ~azure.search.documents.indexes.models.ResourceCounter :param skillset_counter: Required. Total number of skillsets. - :type skillset_counter: ~azure.search.documents.models.ResourceCounter + :type skillset_counter: ~azure.search.documents.indexes.models.ResourceCounter """ _validation = { @@ -4651,9 +4659,9 @@ 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.models.ServiceCounters + :type counters: ~azure.search.documents.indexes.models.ServiceCounters :param limits: Required. Service level general limits. - :type limits: ~azure.search.documents.models.ServiceLimits + :type limits: ~azure.search.documents.indexes.models.ServiceLimits """ _validation = { @@ -4698,10 +4706,10 @@ class ShaperSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] """ _validation = { @@ -4821,7 +4829,7 @@ class SnowballTokenFilter(TokenFilter): "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.models.SnowballTokenFilterLanguage + :type language: str or ~azure.search.documents.indexes.models.SnowballTokenFilterLanguage """ _validation = { @@ -4905,16 +4913,16 @@ class SplitSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param default_language_code: A value indicating which language code to use. Default is en. Possible values include: "da", "de", "en", "es", "fi", "fr", "it", "ko", "pt". - :type default_language_code: str or ~azure.search.documents.models.SplitSkillLanguage + :type default_language_code: str or ~azure.search.documents.indexes.models.SplitSkillLanguage :param text_split_mode: A value indicating which split mode to perform. Possible values include: "pages", "sentences". - :type text_split_mode: str or ~azure.search.documents.models.TextSplitMode + :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 """ @@ -5045,7 +5053,7 @@ class StemmerTokenFilter(TokenFilter): "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.models.StemmerTokenFilterLanguage + :type language: str or ~azure.search.documents.indexes.models.StemmerTokenFilterLanguage """ _validation = { @@ -5132,7 +5140,7 @@ class StopwordsTokenFilter(TokenFilter): "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.models.StopwordsList + :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 @@ -5239,7 +5247,7 @@ 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.models.SearchResourceEncryptionKey + :type encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey :param e_tag: The ETag of the synonym map. :type e_tag: str """ @@ -5353,9 +5361,9 @@ class TagScoringFunction(ScoringFunction): :param 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.models.ScoringFunctionInterpolation + :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.models.TagScoringParameters + :type parameters: ~azure.search.documents.indexes.models.TagScoringParameters """ _validation = { @@ -5435,10 +5443,10 @@ class TextTranslationSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :type outputs: list[~azure.search.documents.indexes.models.OutputFieldMappingEntry] :param default_to_language_code: Required. The language code to translate documents into for documents that don't specify the to language explicitly. Possible values include: "af", "ar", "bn", "bs", "bg", "yue", "ca", "zh-Hans", "zh-Hant", "hr", "cs", "da", "nl", "en", "et", "fj", @@ -5447,7 +5455,7 @@ class TextTranslationSkill(SearchIndexerSkill): "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua". :type default_to_language_code: str or - ~azure.search.documents.models.TextTranslationSkillLanguage + ~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", @@ -5456,7 +5464,7 @@ class TextTranslationSkill(SearchIndexerSkill): "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua". :type default_from_language_code: str or - ~azure.search.documents.models.TextTranslationSkillLanguage + ~azure.search.documents.indexes.models.TextTranslationSkillLanguage :param suggested_from: The language code to translate documents from when neither the fromLanguageCode input nor the defaultFromLanguageCode parameter are provided, and the automatic language detection is unsuccessful. Default is en. Possible values include: "af", @@ -5465,7 +5473,8 @@ class TextTranslationSkill(SearchIndexerSkill): "sw", "tlh", "ko", "lv", "lt", "mg", "ms", "mt", "nb", "fa", "pl", "pt", "otq", "ro", "ru", "sm", "sr-Cyrl", "sr-Latn", "sk", "sl", "es", "sv", "ty", "ta", "te", "th", "to", "tr", "uk", "ur", "vi", "cy", "yua". - :type suggested_from: str or ~azure.search.documents.models.TextTranslationSkillLanguage + :type suggested_from: str or + ~azure.search.documents.indexes.models.TextTranslationSkillLanguage """ _validation = { @@ -5676,10 +5685,10 @@ class WebApiSkill(SearchIndexerSkill): :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.models.InputFieldMappingEntry] + :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.models.OutputFieldMappingEntry] + :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. diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_data_sources_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_data_sources_operations.py index f4c91d48c7af..d3bf1a91e633 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_data_sources_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_data_sources_operations.py @@ -28,7 +28,7 @@ class DataSourcesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.models + :type models: ~azure.search.documents.indexes.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,7 +58,7 @@ def create_or_update( :param data_source_name: The name of the datasource to create or update. :type data_source_name: str :param data_source: The definition of the datasource to create or update. - :type data_source: ~azure.search.documents.models.SearchIndexerDataSource + :type data_source: ~azure.search.documents.indexes.models.SearchIndexerDataSource :param if_match: Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. :type if_match: str @@ -66,10 +66,10 @@ def create_or_update( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerDataSource or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerDataSource + :rtype: ~azure.search.documents.indexes.models.SearchIndexerDataSource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerDataSource"] @@ -154,7 +154,7 @@ def delete( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -217,10 +217,10 @@ def get( :param data_source_name: The name of the datasource to retrieve. :type data_source_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerDataSource or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerDataSource + :rtype: ~azure.search.documents.indexes.models.SearchIndexerDataSource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerDataSource"] @@ -282,10 +282,10 @@ def list( properties. :type select: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: ListDataSourcesResult or the result of cls(response) - :rtype: ~azure.search.documents.models.ListDataSourcesResult + :rtype: ~azure.search.documents.indexes.models.ListDataSourcesResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ListDataSourcesResult"] @@ -344,12 +344,12 @@ def create( """Creates a new datasource. :param data_source: The definition of the datasource to create. - :type data_source: ~azure.search.documents.models.SearchIndexerDataSource + :type data_source: ~azure.search.documents.indexes.models.SearchIndexerDataSource :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerDataSource or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerDataSource + :rtype: ~azure.search.documents.indexes.models.SearchIndexerDataSource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerDataSource"] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_indexers_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_indexers_operations.py index 5e2392a2806f..b55eb7d7b8d8 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_indexers_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_indexers_operations.py @@ -28,7 +28,7 @@ class IndexersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.models + :type models: ~azure.search.documents.indexes.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ def reset( :param indexer_name: The name of the indexer to reset. :type indexer_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -114,7 +114,7 @@ def run( :param indexer_name: The name of the indexer to run. :type indexer_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -176,7 +176,7 @@ def create_or_update( :param indexer_name: The name of the indexer to create or update. :type indexer_name: str :param indexer: The definition of the indexer to create or update. - :type indexer: ~azure.search.documents.models.SearchIndexer + :type indexer: ~azure.search.documents.indexes.models.SearchIndexer :param if_match: Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. :type if_match: str @@ -184,10 +184,10 @@ def create_or_update( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexer or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexer + :rtype: ~azure.search.documents.indexes.models.SearchIndexer :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexer"] @@ -272,7 +272,7 @@ def delete( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -335,10 +335,10 @@ def get( :param indexer_name: The name of the indexer to retrieve. :type indexer_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexer or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexer + :rtype: ~azure.search.documents.indexes.models.SearchIndexer :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexer"] @@ -400,10 +400,10 @@ def list( properties. :type select: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: ListIndexersResult or the result of cls(response) - :rtype: ~azure.search.documents.models.ListIndexersResult + :rtype: ~azure.search.documents.indexes.models.ListIndexersResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ListIndexersResult"] @@ -462,12 +462,12 @@ def create( """Creates a new indexer. :param indexer: The definition of the indexer to create. - :type indexer: ~azure.search.documents.models.SearchIndexer + :type indexer: ~azure.search.documents.indexes.models.SearchIndexer :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexer or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexer + :rtype: ~azure.search.documents.indexes.models.SearchIndexer :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexer"] @@ -532,10 +532,10 @@ def get_status( :param indexer_name: The name of the indexer for which to retrieve status. :type indexer_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerStatus or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerStatus + :rtype: ~azure.search.documents.indexes.models.SearchIndexerStatus :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerStatus"] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_indexes_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_indexes_operations.py index 159a57239391..65b556d45d82 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_indexes_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_indexes_operations.py @@ -9,6 +9,7 @@ import warnings from azure.core.exceptions import 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 @@ -16,7 +17,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -28,7 +29,7 @@ class IndexesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.models + :type models: ~azure.search.documents.indexes.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,18 +54,18 @@ def create( """Creates a new search index. :param index: The definition of the index to create. - :type index: ~azure.search.documents.models.SearchIndex + :type index: ~azure.search.documents.indexes.models.SearchIndex :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndex or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndex + :rtype: ~azure.search.documents.indexes.models.SearchIndex :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndex"] error_map = {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 @@ -117,64 +118,83 @@ def list( request_options=None, # type: Optional["models.RequestOptions"] **kwargs # type: Any ): - # type: (...) -> "models.ListIndexesResult" + # type: (...) -> Iterable["models.ListIndexesResult"] """Lists all indexes available for a search service. :param select: Selects which top-level properties of the index definitions to retrieve. - Specified as a comma-separated list of JSON property names, or '*' for all properties. The - default is all properties. + Specified as a comma-separated list of JSON property names, or '*' for all properties. The + default is all properties. :type select: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: ListIndexesResult or the result of cls(response) - :rtype: ~azure.search.documents.models.ListIndexesResult + :return: An iterator like instance of ListIndexesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.search.documents.indexes.models.ListIndexesResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ListIndexesResult"] error_map = {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 = "2019-05-06-Preview" - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - 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'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.SearchError, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('ListIndexesResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + 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') + + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + url = self._client.format_url(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'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListIndexesResult', pipeline_response) + list_of_elem = deserialized.indexes + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.SearchError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) list.metadata = {'url': '/indexes'} # type: ignore def create_or_update( @@ -193,7 +213,7 @@ def create_or_update( :param index_name: The definition of the index to create or update. :type index_name: str :param index: The definition of the index to create or update. - :type index: ~azure.search.documents.models.SearchIndex + :type index: ~azure.search.documents.indexes.models.SearchIndex :param allow_index_downtime: Allows new analyzers, tokenizers, token filters, or char filters to be added to an index by taking the index offline for at least a few seconds. This temporarily causes indexing and query requests to fail. Performance and write availability of @@ -207,16 +227,16 @@ def create_or_update( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndex or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndex + :rtype: ~azure.search.documents.indexes.models.SearchIndex :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndex"] error_map = {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 @@ -297,7 +317,7 @@ def delete( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -306,7 +326,7 @@ def delete( cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = {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 @@ -360,16 +380,16 @@ def get( :param index_name: The name of the index to retrieve. :type index_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndex or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndex + :rtype: ~azure.search.documents.indexes.models.SearchIndex :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndex"] error_map = {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 @@ -423,16 +443,16 @@ def get_statistics( :param index_name: The name of the index for which to retrieve statistics. :type index_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: GetIndexStatisticsResult or the result of cls(response) - :rtype: ~azure.search.documents.models.GetIndexStatisticsResult + :rtype: ~azure.search.documents.indexes.models.GetIndexStatisticsResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.GetIndexStatisticsResult"] error_map = {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 @@ -487,18 +507,18 @@ def analyze( :param index_name: The name of the index for which to test an analyzer. :type index_name: str :param request: The text and analyzer or analysis components to test. - :type request: ~azure.search.documents.models.AnalyzeRequest + :type request: ~azure.search.documents.indexes.models.AnalyzeRequest :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: AnalyzeResult or the result of cls(response) - :rtype: ~azure.search.documents.models.AnalyzeResult + :rtype: ~azure.search.documents.indexes.models.AnalyzeResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.AnalyzeResult"] error_map = {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 diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_search_service_client_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_search_service_client_operations.py index f9dd44bd7b50..902e11c2d00f 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_search_service_client_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_search_service_client_operations.py @@ -32,10 +32,10 @@ def get_service_statistics( """Gets service level statistics for a search service. :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: ServiceStatistics or the result of cls(response) - :rtype: ~azure.search.documents.models.ServiceStatistics + :rtype: ~azure.search.documents.indexes.models.ServiceStatistics :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ServiceStatistics"] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_skillsets_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_skillsets_operations.py index 73c19892c504..05a54ccda442 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_skillsets_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_skillsets_operations.py @@ -28,7 +28,7 @@ class SkillsetsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.models + :type models: ~azure.search.documents.indexes.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +59,7 @@ def create_or_update( :type skillset_name: str :param skillset: The skillset containing one or more skills to create or update in a search service. - :type skillset: ~azure.search.documents.models.SearchIndexerSkillset + :type skillset: ~azure.search.documents.indexes.models.SearchIndexerSkillset :param if_match: Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. :type if_match: str @@ -67,10 +67,10 @@ def create_or_update( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerSkillset or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerSkillset + :rtype: ~azure.search.documents.indexes.models.SearchIndexerSkillset :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerSkillset"] @@ -155,7 +155,7 @@ def delete( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -218,10 +218,10 @@ def get( :param skillset_name: The name of the skillset to retrieve. :type skillset_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerSkillset or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerSkillset + :rtype: ~azure.search.documents.indexes.models.SearchIndexerSkillset :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerSkillset"] @@ -283,10 +283,10 @@ def list( properties. :type select: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: ListSkillsetsResult or the result of cls(response) - :rtype: ~azure.search.documents.models.ListSkillsetsResult + :rtype: ~azure.search.documents.indexes.models.ListSkillsetsResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ListSkillsetsResult"] @@ -345,12 +345,12 @@ def create( """Creates a new skillset in a search service. :param skillset: The skillset containing one or more skills to create in a search service. - :type skillset: ~azure.search.documents.models.SearchIndexerSkillset + :type skillset: ~azure.search.documents.indexes.models.SearchIndexerSkillset :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SearchIndexerSkillset or the result of cls(response) - :rtype: ~azure.search.documents.models.SearchIndexerSkillset + :rtype: ~azure.search.documents.indexes.models.SearchIndexerSkillset :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SearchIndexerSkillset"] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_synonym_maps_operations.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_synonym_maps_operations.py index c8e7b99b4e88..723ac8566f2b 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_synonym_maps_operations.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_generated/operations/_synonym_maps_operations.py @@ -28,7 +28,7 @@ class SynonymMapsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.search.documents.models + :type models: ~azure.search.documents.indexes.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -58,7 +58,7 @@ def create_or_update( :param synonym_map_name: The name of the synonym map to create or update. :type synonym_map_name: str :param synonym_map: The definition of the synonym map to create or update. - :type synonym_map: ~azure.search.documents.models.SynonymMap + :type synonym_map: ~azure.search.documents.indexes.models.SynonymMap :param if_match: Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. :type if_match: str @@ -66,10 +66,10 @@ def create_or_update( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SynonymMap or the result of cls(response) - :rtype: ~azure.search.documents.models.SynonymMap + :rtype: ~azure.search.documents.indexes.models.SynonymMap :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SynonymMap"] @@ -154,7 +154,7 @@ def delete( if the ETag on the server does not match this value. :type if_none_match: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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 @@ -217,10 +217,10 @@ def get( :param synonym_map_name: The name of the synonym map to retrieve. :type synonym_map_name: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SynonymMap or the result of cls(response) - :rtype: ~azure.search.documents.models.SynonymMap + :rtype: ~azure.search.documents.indexes.models.SynonymMap :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SynonymMap"] @@ -282,10 +282,10 @@ def list( properties. :type select: str :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: ListSynonymMapsResult or the result of cls(response) - :rtype: ~azure.search.documents.models.ListSynonymMapsResult + :rtype: ~azure.search.documents.indexes.models.ListSynonymMapsResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ListSynonymMapsResult"] @@ -344,12 +344,12 @@ def create( """Creates a new synonym map. :param synonym_map: The definition of the synonym map to create. - :type synonym_map: ~azure.search.documents.models.SynonymMap + :type synonym_map: ~azure.search.documents.indexes.models.SynonymMap :param request_options: Parameter group. - :type request_options: ~azure.search.documents.models.RequestOptions + :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: SynonymMap or the result of cls(response) - :rtype: ~azure.search.documents.models.SynonymMap + :rtype: ~azure.search.documents.indexes.models.SynonymMap :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.SynonymMap"] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_search_index_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_search_index_client.py index 5eb7a6850fe2..f572c79f14a7 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_search_index_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/_search_index_client.py @@ -83,13 +83,7 @@ def list_indexes(self, **kwargs): """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - def get_next(_token): - return self._client.indexes.list(**kwargs) - - def extract_data(response): - return None, [listize_flags_for_index(x) for x in response.indexes] - - return ItemPaged(get_next=get_next, extract_data=extract_data) + return self._client.indexes.list(cls=lambda objs: [listize_flags_for_index(x) for x in objs], **kwargs) @distributed_trace def get_index(self, index_name, **kwargs): diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/aio/_search_index_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/aio/_search_index_client.py index f15de97071e9..150d7fcfdc28 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/aio/_search_index_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_internal/aio/_search_index_client.py @@ -6,6 +6,7 @@ from typing import TYPE_CHECKING from azure.core import MatchConditions +from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.async_paging import AsyncItemPaged from .._generated.aio import SearchServiceClient as _SearchServiceClient @@ -74,8 +75,8 @@ def get_search_client(self, index_name, **kwargs): """ return SearchClient(self._endpoint, index_name, self._credential, **kwargs) - @distributed_trace_async - async def list_indexes(self, **kwargs): + @distributed_trace + def list_indexes(self, **kwargs): # type: (**Any) -> AsyncItemPaged[SearchIndex] """List the indexes in an Azure Search service. @@ -86,13 +87,7 @@ async def list_indexes(self, **kwargs): """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - async def get_next(_token): - return await self._client.indexes.list(**kwargs) - - async def extract_data(response): - return None, [listize_flags_for_index(x) for x in response.indexes] - - return AsyncItemPaged(get_next=get_next, extract_data=extract_data) + return self._client.indexes.list(cls=lambda objs: [listize_flags_for_index(x) for x in objs], **kwargs) @distributed_trace_async async def get_index(self, index_name, **kwargs): diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_service_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_service_live_async.py index 2329828ac4bf..54c21db28f15 100644 --- a/sdk/search/azure-search-documents/tests/async_tests/test_service_live_async.py +++ b/sdk/search/azure-search-documents/tests/async_tests/test_service_live_async.py @@ -72,7 +72,7 @@ class SearchIndexesClientTest(AzureMgmtTestCase): @SearchServicePreparer() async def test_list_indexes_empty(self, api_key, endpoint, **kwargs): client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = await client.list_indexes() + result = client.list_indexes() with pytest.raises(StopAsyncIteration): await result.__anext__() @@ -81,7 +81,7 @@ async def test_list_indexes_empty(self, api_key, endpoint, **kwargs): @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) async def test_list_indexes(self, api_key, endpoint, index_name, **kwargs): client = SearchIndexClient(endpoint, AzureKeyCredential(api_key)) - result = await client.list_indexes() + result = client.list_indexes() first = await result.__anext__() assert first.name == index_name @@ -111,7 +111,7 @@ async def test_delete_indexes(self, api_key, endpoint, index_name, **kwargs): import time if self.is_live: time.sleep(TIME_TO_SLEEP) - result = await client.list_indexes() + result = client.list_indexes() with pytest.raises(StopAsyncIteration): await result.__anext__()