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

from ..core.pydantic_utilities import UniversalBaseModel
from .workflow_run_status import WorkflowRunStatus
import typing
from .proxy_location import ProxyLocation
import datetime as dt
from .observer_task import ObserverTask
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class WorkflowRunStatusResponse(UniversalBaseModel):
    workflow_id: str
    workflow_run_id: str
    status: WorkflowRunStatus
    failure_reason: typing.Optional[str] = None
    proxy_location: typing.Optional[ProxyLocation] = None
    webhook_callback_url: typing.Optional[str] = None
    totp_verification_url: typing.Optional[str] = None
    totp_identifier: typing.Optional[str] = None
    created_at: dt.datetime
    modified_at: dt.datetime
    parameters: typing.Dict[str, typing.Optional[typing.Any]]
    screenshot_urls: typing.Optional[typing.List[str]] = None
    recording_url: typing.Optional[str] = None
    downloaded_file_urls: typing.Optional[typing.List[str]] = None
    outputs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    total_steps: typing.Optional[int] = None
    total_cost: typing.Optional[float] = None
    observer_task: typing.Optional[ObserverTask] = 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
