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


ResponseInputAudioType = Literal["input_audio",]


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


class ResponseInputAudioInputAudioTypedDict(TypedDict):
    data: str
    format_: ResponseInputAudioFormat


class ResponseInputAudioInputAudio(BaseModel):
    data: str

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


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

    type: ResponseInputAudioType
    input_audio: ResponseInputAudioInputAudioTypedDict


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

    type: ResponseInputAudioType

    input_audio: ResponseInputAudioInputAudio
