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

from ..core.pydantic_utilities import UniversalBaseModel
from .task_base import TaskBase
from .task_status import TaskStatus
import datetime as dt
import typing
from .task_response_extracted_information import TaskResponseExtractedInformation
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class TaskResponse(UniversalBaseModel):
    request: TaskBase
    task_id: str
    status: TaskStatus
    created_at: dt.datetime
    modified_at: dt.datetime
    extracted_information: typing.Optional[TaskResponseExtractedInformation] = None
    action_screenshot_urls: typing.Optional[typing.List[str]] = None
    screenshot_url: typing.Optional[str] = None
    recording_url: typing.Optional[str] = None
    browser_console_log_url: typing.Optional[str] = None
    downloaded_file_urls: typing.Optional[typing.List[str]] = None
    failure_reason: typing.Optional[str] = None
    errors: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = None
    max_steps_per_run: typing.Optional[int] = None
    workflow_run_id: 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
