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

from ..core.pydantic_utilities import UniversalBaseModel
import datetime as dt
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import typing


class TimeFrameCount(UniversalBaseModel):
    """
    Represents the article count for a specific time frame.
    """

    time_frame: dt.datetime = pydantic.Field()
    """
    The timestamp for the aggregation period in format "YYYY-MM-DD HH:mm:ss"
    """

    article_count: int = pydantic.Field()
    """
    The number of articles published during this time frame
    """

    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
