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

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


class PipelineDeployment(UniversalBaseModel):
    id: str = pydantic.Field()
    """
    Unique identifier
    """

    created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Creation datetime
    """

    updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Update datetime
    """

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

    started_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Time the pipeline deployment started.
    """

    ended_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Time the pipeline deployment finished.
    """

    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
