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

from __future__ import annotations
import io
import pydantic
from supertone.types import BaseModel
from supertone.utils import FieldMetadata, MultipartFormMetadata
from typing import IO, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict


class FilesTypedDict(TypedDict):
    file_name: str
    content: Union[bytes, IO[bytes], io.BufferedReader]
    content_type: NotRequired[str]


class Files(BaseModel):
    file_name: Annotated[
        str, pydantic.Field(alias="fileName"), FieldMetadata(multipart=True)
    ]

    content: Annotated[
        Union[bytes, IO[bytes], io.BufferedReader],
        pydantic.Field(alias=""),
        FieldMetadata(multipart=MultipartFormMetadata(content=True)),
    ]

    content_type: Annotated[
        Optional[str],
        pydantic.Field(alias="Content-Type"),
        FieldMetadata(multipart=True),
    ] = None


class CreateClonedVoiceRequestTypedDict(TypedDict):
    r"""Audio file and voice metadata"""

    files: FilesTypedDict
    r"""Audio file to clone voice from (WAV/MP3 format, max 3MB)"""
    name: str
    r"""Name of the cloned voice"""
    description: NotRequired[str]
    r"""Description of the cloned voice"""


class CreateClonedVoiceRequest(BaseModel):
    r"""Audio file and voice metadata"""

    files: Annotated[Files, FieldMetadata(multipart=MultipartFormMetadata(file=True))]
    r"""Audio file to clone voice from (WAV/MP3 format, max 3MB)"""

    name: Annotated[str, FieldMetadata(multipart=True)]
    r"""Name of the cloned voice"""

    description: Annotated[Optional[str], FieldMetadata(multipart=True)] = None
    r"""Description of the cloned voice"""
