# 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 .audio_analysis import AudioAnalysis
from .pending_blocks_metadata_model import PendingBlocksMetadataModel
from .pending_clip_task import PendingClipTask
from .pending_external_audios_metadata_model import PendingExternalAudiosMetadataModel
from .project_external_audio_response_model_source_context import ProjectExternalAudioResponseModelSourceContext


class ProjectExternalAudioResponseModel(UncheckedBaseModel):
    external_audio_id: str
    filename: str
    signed_url: typing.Optional[str] = None
    offset_ms: int
    duration_ms: int
    start_time_ms: int
    end_time_ms: typing.Optional[int] = None
    order: str
    track_id: str
    created_at_ms: int
    updated_at_ms: int
    volume_gain_db: typing.Optional[float] = None
    muted: typing.Optional[bool] = None
    fade_in_ms: typing.Optional[int] = None
    fade_out_ms: typing.Optional[int] = None
    source_external_audio_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
    error: typing.Optional[str] = None
    current_snapshot_id: typing.Optional[str] = None
    source_context: typing.Optional[ProjectExternalAudioResponseModelSourceContext] = None
    analysis: typing.Optional[AudioAnalysis] = None
    transcription: typing.Optional[AssetTranscription] = 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
