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

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


class Source(UniversalBaseModel):
    id: str = pydantic.Field()
    """
    The unique identifier of the source
    """

    label: str
    description: str
    country: Country = pydantic.Field()
    """
    Source [country](/sayari-library/ontology/enumerated-types#country)
    """

    region: str
    date_added: str
    source_type: str
    record_type: str
    structure: str
    source_url: typing.Optional[str] = None
    pep: bool
    watchlist: bool

    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
