"""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


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


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


class InputAudioInputAudio(BaseModel):
    data: str

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


InputAudioType = Literal["input_audio",]


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

    input_audio: InputAudioInputAudioTypedDict
    type: InputAudioType


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

    input_audio: InputAudioInputAudio

    type: InputAudioType
