# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ....core.pydantic_utilities import IS_PYDANTIC_V2
from ....core.unchecked_base_model import UncheckedBaseModel
from .agent_v1update_speak_speak_one_item_provider_cartesia_model_id import (
    AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId,
)
from .agent_v1update_speak_speak_one_item_provider_cartesia_version import (
    AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVersion,
)
from .agent_v1update_speak_speak_one_item_provider_cartesia_voice import (
    AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice,
)


class AgentV1UpdateSpeakSpeakOneItemProviderCartesia(UncheckedBaseModel):
    version: typing.Optional[AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVersion] = pydantic.Field(default=None)
    """
    The API version header for the Cartesia text-to-speech API
    """

    model_id: AgentV1UpdateSpeakSpeakOneItemProviderCartesiaModelId = pydantic.Field()
    """
    Cartesia model ID
    """

    voice: AgentV1UpdateSpeakSpeakOneItemProviderCartesiaVoice
    language: typing.Optional[str] = pydantic.Field(default=None)
    """
    Cartesia language code
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
