import typing
import typing_extensions
import pydantic


class PostV1VideoToVideoBodyAssets(typing_extensions.TypedDict):
    """
    Provide the assets for video-to-video. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
    """

    video_file_path: typing_extensions.NotRequired[str]
    """
    The path of the input video. This field is required if `video_source` is `file`. This value is the `file_path` field from the response of the [upload urls API](/docs/api/tag/files/post/v1/files/upload-urls).
    """

    video_source: typing_extensions.Required[
        typing_extensions.Literal["file", "youtube"]
    ]

    youtube_url: typing_extensions.NotRequired[str]
    """
    Using a youtube video as the input source. This field is required if `video_source` is `youtube`
    """


class _SerializerPostV1VideoToVideoBodyAssets(pydantic.BaseModel):
    """
    Serializer for PostV1VideoToVideoBodyAssets handling case conversions
    and file omissions as dictated by the API
    """

    model_config = pydantic.ConfigDict(
        populate_by_name=True,
    )

    video_file_path: typing.Optional[str] = pydantic.Field(
        alias="video_file_path", default=None
    )
    video_source: typing_extensions.Literal["file", "youtube"] = pydantic.Field(
        alias="video_source",
    )
    youtube_url: typing.Optional[str] = pydantic.Field(
        alias="youtube_url", default=None
    )
