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

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


class Article(UniversalBaseModel):
    """
    Array of analyzed news articles and risk assessments. Each article includes source metadata and identified risk categories based on content analysis.
    """

    published: str = pydantic.Field()
    """
    Article publication date
    """

    risk_flags: typing.List[str] = pydantic.Field()
    """
    Array of risk flags
    """

    search_term: typing.Optional[typing.Any] = pydantic.Field(default=None)
    """
    Contains the search query and associated terms used to find the article
    """

    snippet: str = pydantic.Field()
    """
    Brief excerpt or summary of the article content
    """

    source: str = pydantic.Field()
    """
    Name of the publishing organization or media outlet
    """

    title: str = pydantic.Field()
    """
    Article headline or title from the source publication
    """

    url: str = pydantic.Field()
    """
    Direct URL link to the original article
    """

    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
