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

from ..core.pydantic_utilities import UniversalBaseModel
import typing_extensions
import typing
from ..core.serialization import FieldMetadata
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


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

    nb_articles_for_7_d: typing_extensions.Annotated[
        typing.Optional[int], FieldMetadata(alias="nb_articles_for_7d")
    ] = pydantic.Field(default=None)
    """
    The number of articles published by the source in the last seven days.
    """

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

    rank: typing.Optional[int] = pydantic.Field(default=None)
    """
    The SEO rank of the news source.
    """

    is_news_domain: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Indicates whether the source is a news domain.
    """

    news_domain_type: typing.Optional[str] = pydantic.Field(default=None)
    """
    The type of news domain.
    """

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

    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
