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

import datetime as dt
import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .report_run_object_response_body_status import ReportRunObjectResponseBodyStatus


class ReportRunObjectResponseBody(UniversalBaseModel):
    """
    Base custom report run response object.
    """

    created_at_time: typing_extensions.Annotated[
        dt.datetime,
        FieldMetadata(alias="createdAtTime"),
        pydantic.Field(alias="createdAtTime", description="Time when the report run was created in RFC3339 format."),
    ]
    id: str = pydantic.Field()
    """
    ID of report run.
    """

    status: ReportRunObjectResponseBodyStatus = pydantic.Field()
    """
    Status of the report run.  Valid values: `complete`, `pending`, `failed`, `canceled`, `unknown`
    """

    updated_at_time: typing_extensions.Annotated[
        dt.datetime,
        FieldMetadata(alias="updatedAtTime"),
        pydantic.Field(
            alias="updatedAtTime", description="Time when the report run was last updated in RFC3339 format."
        ),
    ]

    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
