# 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 .canvas_placement import CanvasPlacement
from .clip_animation import ClipAnimation
from .image_analysis import ImageAnalysis
from .pending_clip_task import PendingClipTask


class ProjectImageResponseModel(UncheckedBaseModel):
    image_id: str
    filename: str
    signed_url: typing.Optional[str] = None
    thumbnail_signed_url: typing.Optional[str] = None
    source: typing.Optional[typing.Literal["upload"]] = None
    file_size_bytes: int
    width: int
    height: int
    track_id: typing.Optional[str] = None
    offset_ms: int
    duration_ms: int
    order: str
    canvas_placement: CanvasPlacement
    animation: typing.Optional[ClipAnimation] = None
    opacity: typing.Optional[float] = None
    created_at_ms: int
    updated_at_ms: int
    current_snapshot_id: typing.Optional[str] = None
    source_asset_id: typing.Optional[str] = None
    source_platform_asset_id: typing.Optional[str] = None
    error: typing.Optional[str] = None
    pending_task: typing.Optional[PendingClipTask] = None
    analysis: typing.Optional[ImageAnalysis] = 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
