# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...types.search_item import SearchItem
from ...types.search_pool import SearchPool
from .search_retrieve_response_page_info import SearchRetrieveResponsePageInfo


class SearchRetrieveResponse(UniversalBaseModel):
    page_info: typing.Optional[SearchRetrieveResponsePageInfo] = pydantic.Field(default=None)
    """
    An object that provides information about pagination.
    """

    data: typing.Optional[typing.List[SearchItem]] = pydantic.Field(default=None)
    """
    An array that contains your search results. For each match found, the model returns the following fields:
    """

    search_pool: typing.Optional[SearchPool] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
