"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations

from typing import Union

from pydantic import Discriminator, Tag
from typing_extensions import Annotated, TypeAliasType

from friendli.utils import get_discriminator

from .audiocontent import AudioContent, AudioContentTypedDict
from .imagecontent import ImageContent, ImageContentTypedDict
from .textcontent import TextContent, TextContentTypedDict
from .videocontent import VideoContent, VideoContentTypedDict

UserMessageContentMultiModalTypedDict = TypeAliasType(
    "UserMessageContentMultiModalTypedDict",
    Union[
        TextContentTypedDict,
        AudioContentTypedDict,
        ImageContentTypedDict,
        VideoContentTypedDict,
    ],
)


UserMessageContentMultiModal = Annotated[
    Union[
        Annotated[AudioContent, Tag("audio_url")],
        Annotated[ImageContent, Tag("image_url")],
        Annotated[TextContent, Tag("text")],
        Annotated[VideoContent, Tag("video_url")],
    ],
    Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
