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

from ...base_types.types.paginated_response import PaginatedResponse
import typing
from ...shared_types.types.record_details import RecordDetails
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class RecordSearchResponse(PaginatedResponse):
    """
    OK

    Examples
    --------
    from sayari.base_types import QualifiedCount
    from sayari.search import RecordSearchResponse
    from sayari.shared_types import RecordDetails

    RecordSearchResponse(
        offset=0,
        limit=1,
        size=QualifiedCount(
            count=182,
            qualifier="eq",
        ),
        next=True,
        data=[
            RecordDetails(
                id="a7e5a83df5551eb557688c84451abd9d/0000950123-09-004358-index.htm/1697610858173",
                label="Company Record from USA SEC 10-K Database",
                source="a7e5a83df5551eb557688c84451abd9d",
                publication_date="2009-03-10",
                acquisition_date="2023-10-18",
                references_count=10,
                record_url="/v1/record/a7e5a83df5551eb557688c84451abd9d%2F0000950123-09-004358-index.htm%2F1697610858173",
                source_url="https://www.sec.gov/Archives/edgar/data/2488/000119312513069422/0000950123-09-004358-index.htm",
                matches={
                    "text": [
                        "In\n    addition, David and <em>Victoria</em> <em>Beckham</em> have agreed to pursue the\n    development and exploitation of projects relating to\n    merchandising, products and skills (that do not, with certain\n    exceptions, include the name \x93<em>Beckham</em>\x94) exclusively\n    through a joint venture vehicle, <em>Beckham</em> Brand <em>Limited</em>",
                        "(\x93BBL\x94), which is owned one-third by each of David\n    <em>Beckham</em>, <em>Victoria</em> <em>Beckham</em>, and a subsidiary of 19 Entertainment.",
                        "For\n    example, 19 Entertainment manages <em>Victoria</em> <em>Beckham</em>, a fashion\n    and lifestyle personality as well as David <em>Beckham</em>, a globally\n    recognized soccer player who commenced playing for the Los\n    Angeles Galaxy of United States-based Major League Soccer in\n    July 2007 and is currently playing",
                        "<em>Beckham</em> (see\n    below under \x93<em>Beckham</em> Relationship\x94), Annie Lennox and\n    Cathy Dennis.",
                        "In 2008, <em>Victoria</em> successfully launched her\n    dress collection, a new denim collection under her DVB Style\n    brand and a DVB line of eyewear.",
                    ]
                },
                country="USA",
                page=8.0,
                page_count=92.0,
            )
        ],
    )
    """

    offset: int
    next: bool
    data: typing.List[RecordDetails]

    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
