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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .historical_pull_status import HistoricalPullStatus
from .historical_pull_timeline import HistoricalPullTimeline
from .single_historical_pull_statistics_error_details import SingleHistoricalPullStatisticsErrorDetails


class SingleHistoricalPullStatistics(UniversalBaseModel):
    status: HistoricalPullStatus
    range_start: typing.Optional[dt.datetime] = None
    range_end: typing.Optional[dt.datetime] = None
    timeline: HistoricalPullTimeline
    days_with_data: typing.Optional[int] = None
    release: str
    trace_id: typing.Optional[str] = None
    error_details: typing.Optional[SingleHistoricalPullStatisticsErrorDetails] = 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
