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

from ...core.pydantic_utilities import UniversalBaseModel
import pydantic
import typing
from ...generated_types.types.country import Country
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class RecordDetails(UniversalBaseModel):
    id: str = pydantic.Field()
    """
    The unique identifier for a record in the database
    """

    label: str
    source: str = pydantic.Field()
    """
    The unique identifier for a source in the database
    """

    publication_date: typing.Optional[str] = pydantic.Field(default=None)
    """
    The date the record was published
    """

    acquisition_date: str = pydantic.Field()
    """
    The date Sayari acquired this record
    """

    references_count: int = pydantic.Field()
    """
    Number of times this record is referenced
    """

    record_url: str = pydantic.Field()
    """
    The url to download the record from Sayari
    """

    source_url: typing.Optional[str] = pydantic.Field(default=None)
    """
    The url to access to original source
    """

    document_urls: typing.Optional[typing.List[str]] = None
    matches: typing.Optional[typing.Dict[str, typing.List[str]]] = None
    country: typing.Optional[Country] = None
    page: typing.Optional[float] = None
    page_count: typing.Optional[float] = 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
