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

from __future__ import annotations
from .chatmessagecontentitemaudio import (
    ChatMessageContentItemAudio,
    ChatMessageContentItemAudioTypedDict,
)
from .chatmessagecontentitemimage import (
    ChatMessageContentItemImage,
    ChatMessageContentItemImageTypedDict,
)
from .chatmessagecontentitemtext import (
    ChatMessageContentItemText,
    ChatMessageContentItemTextTypedDict,
)
from .chatmessagecontentitemvideo import (
    ChatMessageContentItemVideo,
    ChatMessageContentItemVideoTypedDict,
)
from openrouter.utils import get_discriminator
from pydantic import Discriminator, Tag
from typing import Union
from typing_extensions import Annotated, TypeAliasType


ChatMessageContentItemTypedDict = TypeAliasType(
    "ChatMessageContentItemTypedDict",
    Union[
        ChatMessageContentItemImageTypedDict,
        ChatMessageContentItemAudioTypedDict,
        ChatMessageContentItemTextTypedDict,
        ChatMessageContentItemVideoTypedDict,
    ],
)


ChatMessageContentItem = Annotated[
    Union[
        Annotated[ChatMessageContentItemText, Tag("text")],
        Annotated[ChatMessageContentItemImage, Tag("image_url")],
        Annotated[ChatMessageContentItemAudio, Tag("input_audio")],
        Annotated[ChatMessageContentItemVideo, Tag("input_video")],
        Annotated[ChatMessageContentItemVideo, Tag("video_url")],
    ],
    Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
