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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .report import Report
from .report_plan import ReportPlan
import datetime as dt
from .report_state import ReportState
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class ReportResponse(UniversalBaseModel):
    name: str
    report_id: str
    report: typing.Optional[Report] = None
    plan: typing.Optional[ReportPlan] = None
    version: int
    last_updated: dt.datetime
    status: ReportState
    total_versions: int

    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
