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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
import datetime as dt
from .managed_ingestion_status import ManagedIngestionStatus
from .ingestion_error_response import IngestionErrorResponse
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ManagedIngestionStatusResponse(UniversalBaseModel):
    job_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ID of the latest job.
    """

    deployment_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Date of the deployment.
    """

    status: ManagedIngestionStatus = pydantic.Field()
    """
    Status of the ingestion.
    """

    error: typing.Optional[typing.List[IngestionErrorResponse]] = pydantic.Field(default=None)
    """
    List of errors that occurred during ingestion.
    """

    effective_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    When the status is effective
    """

    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
