# coding: utf-8

"""
    Vantage Management API

    This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world.  We enable developers to build magical discovery experiences into their products and websites.  Some useful links: - [TODO: Semantic Search Guide: What Is It And Why Does It Matter?](https://www.bloomreach.com/en/blog/2019/semantic-search-explained-in-5-minutes)

    The version of the OpenAPI document: v1.1.2
    Contact: devrel@vantagediscovery.com
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import io
import warnings
from typing import Any, Dict, List, Optional, Tuple, Union

from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call


try:
    from typing import Annotated
except ImportError:
    from typing_extensions import Annotated

from typing import Optional

from pydantic import Field, StrictStr
from typing_extensions import Annotated

from vantage_sdk.core.http.api_client import ApiClient
from vantage_sdk.core.http.api_response import ApiResponse
from vantage_sdk.core.http.models.embedding_search_query import (
    EmbeddingSearchQuery,
)
from vantage_sdk.core.http.models.more_like_these_query import (
    MoreLikeTheseQuery,
)
from vantage_sdk.core.http.models.more_like_this_query import MoreLikeThisQuery
from vantage_sdk.core.http.models.search_result import SearchResult
from vantage_sdk.core.http.models.semantic_search_query import (
    SemanticSearchQuery,
)
from vantage_sdk.core.http.models.shopping_assistant_query import (
    ShoppingAssistantQuery,
)
from vantage_sdk.core.http.models.shopping_assistant_result import (
    ShoppingAssistantResult,
)
from vantage_sdk.core.http.models.total_count_result import TotalCountResult
from vantage_sdk.core.http.models.vantage_vibe_search_query import (
    VantageVibeSearchQuery,
)
from vantage_sdk.core.http.rest import RESTResponseType


class SearchApi:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client

    @validate_call
    def approximate_results_count_search(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        semantic_search_query: Annotated[
            Optional[SemanticSearchQuery],
            Field(
                description="The JSON that describes how Vantage should search a collection"
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> TotalCountResult:
        """Approximate Results Count

        Approximate Results Count Search

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param semantic_search_query: The JSON that describes how Vantage should search a collection
        :type semantic_search_query: SemanticSearchQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._approximate_results_count_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            semantic_search_query=semantic_search_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TotalCountResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def approximate_results_count_search_with_http_info(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        semantic_search_query: Annotated[
            Optional[SemanticSearchQuery],
            Field(
                description="The JSON that describes how Vantage should search a collection"
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[TotalCountResult]:
        """Approximate Results Count

        Approximate Results Count Search

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param semantic_search_query: The JSON that describes how Vantage should search a collection
        :type semantic_search_query: SemanticSearchQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._approximate_results_count_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            semantic_search_query=semantic_search_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TotalCountResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def approximate_results_count_search_without_preload_content(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        semantic_search_query: Annotated[
            Optional[SemanticSearchQuery],
            Field(
                description="The JSON that describes how Vantage should search a collection"
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Approximate Results Count

        Approximate Results Count Search

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param semantic_search_query: The JSON that describes how Vantage should search a collection
        :type semantic_search_query: SemanticSearchQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._approximate_results_count_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            semantic_search_query=semantic_search_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TotalCountResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _approximate_results_count_search_serialize(
        self,
        account_id,
        collection_id,
        semantic_search_query,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> Tuple:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[str, str] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if account_id is not None:
            _path_params['account_id'] = account_id
        if collection_id is not None:
            _path_params['collection_id'] = collection_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if semantic_search_query is not None:
            _body_params = semantic_search_query

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json']
        )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = self.api_client.select_header_content_type(
                ['application/json']
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = ['BearerAuth']

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/search/{account_id}/{collection_id}/counts',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def embedding_search(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        embedding_search_query: Annotated[
            EmbeddingSearchQuery,
            Field(
                description="The JSON that describes how Vantage should search embeddings"
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> SearchResult:
        """Search by embedding

        Search by embedding

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param embedding_search_query: The JSON that describes how Vantage should search embeddings (required)
        :type embedding_search_query: EmbeddingSearchQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._embedding_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            embedding_search_query=embedding_search_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def embedding_search_with_http_info(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        embedding_search_query: Annotated[
            EmbeddingSearchQuery,
            Field(
                description="The JSON that describes how Vantage should search embeddings"
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[SearchResult]:
        """Search by embedding

        Search by embedding

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param embedding_search_query: The JSON that describes how Vantage should search embeddings (required)
        :type embedding_search_query: EmbeddingSearchQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._embedding_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            embedding_search_query=embedding_search_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def embedding_search_without_preload_content(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        embedding_search_query: Annotated[
            EmbeddingSearchQuery,
            Field(
                description="The JSON that describes how Vantage should search embeddings"
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Search by embedding

        Search by embedding

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param embedding_search_query: The JSON that describes how Vantage should search embeddings (required)
        :type embedding_search_query: EmbeddingSearchQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._embedding_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            embedding_search_query=embedding_search_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _embedding_search_serialize(
        self,
        account_id,
        collection_id,
        embedding_search_query,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> Tuple:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[str, str] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if account_id is not None:
            _path_params['account_id'] = account_id
        if collection_id is not None:
            _path_params['collection_id'] = collection_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if embedding_search_query is not None:
            _body_params = embedding_search_query

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json']
        )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = self.api_client.select_header_content_type(
                ['application/json']
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = ['BearerAuth']

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/search/{account_id}/{collection_id}/embedding',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def more_like_these_search(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        more_like_these_query: Annotated[
            MoreLikeTheseQuery,
            Field(
                description="An array, including nested these.  Each element may have only one of query_text, embedding, query_document_id or these."
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> SearchResult:
        """More-Like-These(tm)

        Search for similar items, blending docs, text, and embeddings

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param more_like_these_query: An array, including nested these.  Each element may have only one of query_text, embedding, query_document_id or these. (required)
        :type more_like_these_query: MoreLikeTheseQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._more_like_these_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            more_like_these_query=more_like_these_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def more_like_these_search_with_http_info(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        more_like_these_query: Annotated[
            MoreLikeTheseQuery,
            Field(
                description="An array, including nested these.  Each element may have only one of query_text, embedding, query_document_id or these."
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[SearchResult]:
        """More-Like-These(tm)

        Search for similar items, blending docs, text, and embeddings

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param more_like_these_query: An array, including nested these.  Each element may have only one of query_text, embedding, query_document_id or these. (required)
        :type more_like_these_query: MoreLikeTheseQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._more_like_these_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            more_like_these_query=more_like_these_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def more_like_these_search_without_preload_content(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        more_like_these_query: Annotated[
            MoreLikeTheseQuery,
            Field(
                description="An array, including nested these.  Each element may have only one of query_text, embedding, query_document_id or these."
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """More-Like-These(tm)

        Search for similar items, blending docs, text, and embeddings

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param more_like_these_query: An array, including nested these.  Each element may have only one of query_text, embedding, query_document_id or these. (required)
        :type more_like_these_query: MoreLikeTheseQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._more_like_these_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            more_like_these_query=more_like_these_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _more_like_these_search_serialize(
        self,
        account_id,
        collection_id,
        more_like_these_query,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> Tuple:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[str, str] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if account_id is not None:
            _path_params['account_id'] = account_id
        if collection_id is not None:
            _path_params['collection_id'] = collection_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if more_like_these_query is not None:
            _body_params = more_like_these_query

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json']
        )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = self.api_client.select_header_content_type(
                ['application/json']
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = ['BearerAuth']

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/search/{account_id}/{collection_id}/morelikethese',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def more_like_this_search(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        more_like_this_query: Annotated[
            MoreLikeThisQuery,
            Field(
                description="The JSON that describes how Vantage should search a collection"
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> SearchResult:
        """More-Like-This

        Search for similar items, based on existing item id

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param more_like_this_query: The JSON that describes how Vantage should search a collection (required)
        :type more_like_this_query: MoreLikeThisQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._more_like_this_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            more_like_this_query=more_like_this_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def more_like_this_search_with_http_info(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        more_like_this_query: Annotated[
            MoreLikeThisQuery,
            Field(
                description="The JSON that describes how Vantage should search a collection"
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[SearchResult]:
        """More-Like-This

        Search for similar items, based on existing item id

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param more_like_this_query: The JSON that describes how Vantage should search a collection (required)
        :type more_like_this_query: MoreLikeThisQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._more_like_this_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            more_like_this_query=more_like_this_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def more_like_this_search_without_preload_content(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        more_like_this_query: Annotated[
            MoreLikeThisQuery,
            Field(
                description="The JSON that describes how Vantage should search a collection"
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """More-Like-This

        Search for similar items, based on existing item id

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param more_like_this_query: The JSON that describes how Vantage should search a collection (required)
        :type more_like_this_query: MoreLikeThisQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._more_like_this_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            more_like_this_query=more_like_this_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _more_like_this_search_serialize(
        self,
        account_id,
        collection_id,
        more_like_this_query,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> Tuple:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[str, str] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if account_id is not None:
            _path_params['account_id'] = account_id
        if collection_id is not None:
            _path_params['collection_id'] = collection_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if more_like_this_query is not None:
            _body_params = more_like_this_query

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json']
        )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = self.api_client.select_header_content_type(
                ['application/json']
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = ['BearerAuth']

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/search/{account_id}/{collection_id}/morelikethis',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def semantic_search(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        semantic_search_query: Annotated[
            SemanticSearchQuery,
            Field(
                description="The JSON that describes how Vantage should search a collection"
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> SearchResult:
        """Search by text

        Search by text

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param semantic_search_query: The JSON that describes how Vantage should search a collection (required)
        :type semantic_search_query: SemanticSearchQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._semantic_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            semantic_search_query=semantic_search_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def semantic_search_with_http_info(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        semantic_search_query: Annotated[
            SemanticSearchQuery,
            Field(
                description="The JSON that describes how Vantage should search a collection"
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[SearchResult]:
        """Search by text

        Search by text

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param semantic_search_query: The JSON that describes how Vantage should search a collection (required)
        :type semantic_search_query: SemanticSearchQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._semantic_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            semantic_search_query=semantic_search_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def semantic_search_without_preload_content(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        semantic_search_query: Annotated[
            SemanticSearchQuery,
            Field(
                description="The JSON that describes how Vantage should search a collection"
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Search by text

        Search by text

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param semantic_search_query: The JSON that describes how Vantage should search a collection (required)
        :type semantic_search_query: SemanticSearchQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._semantic_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            semantic_search_query=semantic_search_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _semantic_search_serialize(
        self,
        account_id,
        collection_id,
        semantic_search_query,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> Tuple:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[str, str] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if account_id is not None:
            _path_params['account_id'] = account_id
        if collection_id is not None:
            _path_params['collection_id'] = collection_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if semantic_search_query is not None:
            _body_params = semantic_search_query

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json']
        )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = self.api_client.select_header_content_type(
                ['application/json']
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = ['BearerAuth']

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/search/{account_id}/{collection_id}/semantic',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def shopping_assistant(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        shopping_assistant_query: Annotated[
            ShoppingAssistantQuery,
            Field(
                description="JSON describing details of search using shopping assistant"
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ShoppingAssistantResult:
        """Shopping Assistant

        Shopping Assistant

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param shopping_assistant_query: JSON describing details of search using shopping assistant (required)
        :type shopping_assistant_query: ShoppingAssistantQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._shopping_assistant_serialize(
            account_id=account_id,
            collection_id=collection_id,
            shopping_assistant_query=shopping_assistant_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ShoppingAssistantResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def shopping_assistant_with_http_info(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        shopping_assistant_query: Annotated[
            ShoppingAssistantQuery,
            Field(
                description="JSON describing details of search using shopping assistant"
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ShoppingAssistantResult]:
        """Shopping Assistant

        Shopping Assistant

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param shopping_assistant_query: JSON describing details of search using shopping assistant (required)
        :type shopping_assistant_query: ShoppingAssistantQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._shopping_assistant_serialize(
            account_id=account_id,
            collection_id=collection_id,
            shopping_assistant_query=shopping_assistant_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ShoppingAssistantResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def shopping_assistant_without_preload_content(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        shopping_assistant_query: Annotated[
            ShoppingAssistantQuery,
            Field(
                description="JSON describing details of search using shopping assistant"
            ),
        ],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Shopping Assistant

        Shopping Assistant

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param shopping_assistant_query: JSON describing details of search using shopping assistant (required)
        :type shopping_assistant_query: ShoppingAssistantQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._shopping_assistant_serialize(
            account_id=account_id,
            collection_id=collection_id,
            shopping_assistant_query=shopping_assistant_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ShoppingAssistantResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _shopping_assistant_serialize(
        self,
        account_id,
        collection_id,
        shopping_assistant_query,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> Tuple:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[str, str] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if account_id is not None:
            _path_params['account_id'] = account_id
        if collection_id is not None:
            _path_params['collection_id'] = collection_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if shopping_assistant_query is not None:
            _body_params = shopping_assistant_query

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json']
        )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = self.api_client.select_header_content_type(
                ['application/json']
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = ['BearerAuth']

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/search/{account_id}/{collection_id}/shopping_assistant',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def vantage_vibe_search(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        vantage_vibe_search_query: Annotated[
            Optional[VantageVibeSearchQuery],
            Field(
                description="The JSON that describes how Vantage should search a collection"
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> SearchResult:
        """Vantage Vibe

        TODO

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param vantage_vibe_search_query: The JSON that describes how Vantage should search a collection
        :type vantage_vibe_search_query: VantageVibeSearchQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._vantage_vibe_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            vantage_vibe_search_query=vantage_vibe_search_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def vantage_vibe_search_with_http_info(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        vantage_vibe_search_query: Annotated[
            Optional[VantageVibeSearchQuery],
            Field(
                description="The JSON that describes how Vantage should search a collection"
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[SearchResult]:
        """Vantage Vibe

        TODO

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param vantage_vibe_search_query: The JSON that describes how Vantage should search a collection
        :type vantage_vibe_search_query: VantageVibeSearchQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._vantage_vibe_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            vantage_vibe_search_query=vantage_vibe_search_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def vantage_vibe_search_without_preload_content(
        self,
        account_id: Annotated[
            StrictStr, Field(description="The account to get information on")
        ],
        collection_id: Annotated[
            StrictStr,
            Field(
                description="The collection id to get details for {collection_id}"
            ),
        ],
        vantage_vibe_search_query: Annotated[
            Optional[VantageVibeSearchQuery],
            Field(
                description="The JSON that describes how Vantage should search a collection"
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)],
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Vantage Vibe

        TODO

        :param account_id: The account to get information on (required)
        :type account_id: str
        :param collection_id: The collection id to get details for {collection_id} (required)
        :type collection_id: str
        :param vantage_vibe_search_query: The JSON that describes how Vantage should search a collection
        :type vantage_vibe_search_query: VantageVibeSearchQuery
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._vantage_vibe_search_serialize(
            account_id=account_id,
            collection_id=collection_id,
            vantage_vibe_search_query=vantage_vibe_search_query,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchResult",
            '405': None,
        }
        response_data = self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data.response

    def _vantage_vibe_search_serialize(
        self,
        account_id,
        collection_id,
        vantage_vibe_search_query,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> Tuple:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[str, str] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if account_id is not None:
            _path_params['account_id'] = account_id
        if collection_id is not None:
            _path_params['collection_id'] = collection_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if vantage_vibe_search_query is not None:
            _body_params = vantage_vibe_search_query

        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json']
        )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = self.api_client.select_header_content_type(
                ['application/json']
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = ['BearerAuth']

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/search/{account_id}/{collection_id}/vibe',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )
