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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .breaking_news_article_entity import BreakingNewsArticleEntity


class BreakingNewsEventEntity(UniversalBaseModel):
    """
    The data model representing a breaking news event with its associated articles.
    """

    event_id: str = pydantic.Field()
    """
    Unique identifier for the breaking news event/cluster.
    """

    articles_count: int = pydantic.Field()
    """
    Number of articles in this breaking news cluster.
    """

    articles: typing.List[BreakingNewsArticleEntity] = pydantic.Field()
    """
    The articles associated with this breaking news event.
    """

    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
