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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class DubbingSourceMediaInfo(UncheckedBaseModel):
    """
    Metadata about the project's source media.
    """

    filename: typing.Optional[str] = pydantic.Field(default=None)
    """
    Original filename of the uploaded source media (null for URL sources).
    """

    duration_s: typing.Optional[float] = pydantic.Field(default=None)
    """
    Duration of the source media in seconds.
    """

    has_video: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether the source media contains a video stream.
    """

    mime_type: typing.Optional[str] = pydantic.Field(default=None)
    """
    MIME type of the uploaded source media.
    """

    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
