# 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
from ..core.unchecked_base_model import UncheckedBaseModel
from .block_run import BlockRun


class RunLog(UncheckedBaseModel):
    workflow_display_name: str
    workflow_run_id: str
    workflow_id: str
    status: str
    session_id: str
    cost: float
    blocks: typing.Dict[str, BlockRun]
    output: typing.Optional[typing.Any] = None
    elapsed_time_ms: int
    timestamp_start: dt.datetime
    timestamp_end: dt.datetime
    message: typing.Optional[str] = None
    gcs_log_path: typing.Optional[str] = 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
