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

from ..core.pydantic_utilities import UniversalBaseModel
from .observer_task_status import ObserverTaskStatus
import typing
from .observer_task_output import ObserverTaskOutput
from .proxy_location import ProxyLocation
import datetime as dt
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class ObserverTask(UniversalBaseModel):
    task_id: str
    status: ObserverTaskStatus
    organization_id: typing.Optional[str] = None
    workflow_run_id: typing.Optional[str] = None
    workflow_id: typing.Optional[str] = None
    workflow_permanent_id: typing.Optional[str] = None
    prompt: typing.Optional[str] = None
    url: typing.Optional[str] = None
    summary: typing.Optional[str] = None
    output: typing.Optional[ObserverTaskOutput] = None
    totp_verification_url: typing.Optional[str] = None
    totp_identifier: typing.Optional[str] = None
    proxy_location: typing.Optional[ProxyLocation] = None
    webhook_callback_url: typing.Optional[str] = None
    created_at: dt.datetime
    modified_at: dt.datetime

    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
