# 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
from .asset_transcription import AssetTranscription
from .canvas_placement import CanvasPlacement
from .clip_animation import ClipAnimation
from .generation_source_context import GenerationSourceContext
from .pending_blocks_metadata_model import PendingBlocksMetadataModel
from .pending_clip_task import PendingClipTask
from .pending_external_audios_metadata_model import PendingExternalAudiosMetadataModel
from .project_video_thumbnail_sheet_response_model import ProjectVideoThumbnailSheetResponseModel
from .video_analysis import VideoAnalysis


class ProjectVideoResponseModel(UncheckedBaseModel):
    video_id: str
    filename: str
    signed_url: typing.Optional[str] = None
    signed_preview_url: typing.Optional[str] = None
    offset_ms: int
    duration_ms: int
    volume_gain_db: float
    muted: bool
    fade_in_ms: typing.Optional[int] = None
    fade_out_ms: typing.Optional[int] = None
    width: int
    height: int
    codec: str
    order: str
    created_at_ms: int
    updated_at_ms: int
    error: typing.Optional[str] = None
    thumbnail_interval_seconds: float
    thumbnail_size: typing.List[int]
    thumbnail_sheets: typing.List[ProjectVideoThumbnailSheetResponseModel]
    start_time_ms: int
    end_time_ms: typing.Optional[int] = None
    asset_preview_signed_url: typing.Optional[str] = None
    source_video_id: typing.Optional[str] = None
    source_asset_id: typing.Optional[str] = None
    source_platform_asset_id: typing.Optional[str] = None
    pending_blocks_metadata: typing.Optional[PendingBlocksMetadataModel] = None
    pending_external_audios_metadata: typing.Optional[PendingExternalAudiosMetadataModel] = None
    speech_imported: typing.Optional[bool] = None
    pending_task: typing.Optional[PendingClipTask] = None
    audio_track_ready: typing.Optional[bool] = None
    export_format_ready: typing.Optional[bool] = None
    current_snapshot_id: typing.Optional[str] = None
    source_context: typing.Optional[GenerationSourceContext] = None
    analysis: typing.Optional[VideoAnalysis] = None
    transcription: typing.Optional[AssetTranscription] = None
    canvas_placement: typing.Optional[CanvasPlacement] = None
    animation: typing.Optional[ClipAnimation] = None
    playback_speed: typing.Optional[float] = None
    opacity: typing.Optional[float] = None
    track_id: typing.Optional[str] = None
    preview_job_progress: typing.Optional[float] = None
    import_speech_progress: typing.Optional[float] = 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
