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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .created_at import CreatedAt
from .job_id import JobId
from .job_status import JobStatus
from .last_modified import LastModified


class CascadeJobDetails(UniversalBaseModel):
    """
    Details about the cascade process.
    """

    created_at: typing_extensions.Annotated[
        typing.Optional[CreatedAt], FieldMetadata(alias="createdAt"), pydantic.Field(alias="createdAt")
    ] = None
    job_error_message: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="jobErrorMessage"),
        pydantic.Field(alias="jobErrorMessage", description="Error message for a failed cascade process."),
    ] = None
    job_id: typing_extensions.Annotated[
        typing.Optional[JobId], FieldMetadata(alias="jobId"), pydantic.Field(alias="jobId")
    ] = None
    job_status: typing_extensions.Annotated[
        typing.Optional[JobStatus], FieldMetadata(alias="jobStatus"), pydantic.Field(alias="jobStatus")
    ] = None
    updated_at: typing_extensions.Annotated[
        typing.Optional[LastModified], FieldMetadata(alias="updatedAt"), pydantic.Field(alias="updatedAt")
    ] = 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
