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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from .additional_source_info import AdditionalSourceInfo
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class SourceInfo(UniversalBaseModel):
    """
    The data model for information about a news source.
    """

    name_source: typing.Optional[str] = pydantic.Field(default=None)
    """
    The name of the news source.
    """

    domain_url: str = pydantic.Field()
    """
    The domain URL of the news source.
    """

    logo: typing.Optional[str] = pydantic.Field(default=None)
    """
    The logo of the news source.
    """

    additional_info: typing.Optional[AdditionalSourceInfo] = 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
