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

from __future__ import annotations

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata


class VideoContext_Url(UniversalBaseModel):
    """
    An object specifying the source of the video content. Include exactly one source.
    """

    type: typing.Literal["url"] = "url"
    url: str

    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


class VideoContext_AssetId(UniversalBaseModel):
    """
    An object specifying the source of the video content. Include exactly one source.
    """

    type: typing.Literal["asset_id"] = "asset_id"
    asset_id: str

    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


class VideoContext_Base64String(UniversalBaseModel):
    """
    An object specifying the source of the video content. Include exactly one source.
    """

    type: typing.Literal["base64_string"] = "base64_string"
    base_64_string: typing_extensions.Annotated[str, FieldMetadata(alias="base64_string")]

    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


VideoContext = typing.Union[VideoContext_Url, VideoContext_AssetId, VideoContext_Base64String]
