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

from __future__ import annotations
from openrouter.types import BaseModel, UnrecognizedStr
from openrouter.utils import validate_open_enum
import pydantic
from pydantic.functional_validators import PlainValidator
from typing import Literal, Union
from typing_extensions import Annotated, TypedDict


InputAudioType = Literal["input_audio",]


InputAudioFormat = Union[
    Literal[
        "mp3",
        "wav",
    ],
    UnrecognizedStr,
]


class InputAudioInputAudioTypedDict(TypedDict):
    data: str
    format_: InputAudioFormat


class InputAudioInputAudio(BaseModel):
    data: str

    format_: Annotated[
        Annotated[InputAudioFormat, PlainValidator(validate_open_enum(False))],
        pydantic.Field(alias="format"),
    ]


class InputAudioTypedDict(TypedDict):
    r"""Audio input content item"""

    type: InputAudioType
    input_audio: InputAudioInputAudioTypedDict


class InputAudio(BaseModel):
    r"""Audio input content item"""

    type: InputAudioType

    input_audio: InputAudioInputAudio
