# 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, UniversalBaseModel
from .job_status import JobStatus


class JobStatusResponse(UniversalBaseModel):
    """
    Response model for job status check.
    """

    job_id: str = pydantic.Field()
    """
    Job identifier
    """

    status: JobStatus = pydantic.Field()
    """
    Current job status
    """

    progress: typing.Optional[float] = pydantic.Field(default=None)
    """
    Progress percentage (0.0 to 1.0)
    """

    message: typing.Optional[str] = pydantic.Field(default=None)
    """
    Status message
    """

    created_at: dt.datetime = pydantic.Field()
    """
    Job creation time
    """

    estimated_completion: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Estimated completion time
    """

    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
