# 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
from ..core.unchecked_base_model import UncheckedBaseModel
from .dubbing_project_response_status import DubbingProjectResponseStatus
from .dubbing_source_media_info import DubbingSourceMediaInfo


class DubbingProjectResponse(UncheckedBaseModel):
    project_id: str = pydantic.Field()
    """
    Unique identifier of the dubbing project.
    """

    status: DubbingProjectResponseStatus = pydantic.Field()
    """
    Lifecycle status of the project: 'preparing'/'processing' while it transcribes, 'ready' once transcription is done, or 'failed'.
    """

    reference: typing.Optional[str] = pydantic.Field(default=None)
    """
    Optional free-form string the customer can provide to identify the project on their end.
    """

    source_language: typing.Optional[str] = pydantic.Field(default=None)
    """
    BCP-47 language tag of the source media (null if auto-detected).
    """

    model_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Default dubbing model id applied to this project's language targets.
    """

    media: typing.Optional[DubbingSourceMediaInfo] = pydantic.Field(default=None)
    """
    Source media metadata; null until the project is ready.
    """

    language_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Identifiers of the language targets created under this project.
    """

    revision: int = pydantic.Field()
    """
    Monotonic counter incremented whenever the source transcript is edited (segment add/edit/delete).
    """

    created_at: dt.datetime = pydantic.Field()
    """
    When the project was created.
    """

    updated_at: dt.datetime = pydantic.Field()
    """
    When the project was last updated.
    """

    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
