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

from ...core.pydantic_utilities import UniversalBaseModel
import pydantic
from .return_custom_voice_base_voice import ReturnCustomVoiceBaseVoice
import typing
from .return_custom_voice_parameters import ReturnCustomVoiceParameters
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class ReturnCustomVoice(UniversalBaseModel):
    """
    A Custom Voice specification associated with this Config.
    """

    id: str = pydantic.Field()
    """
    Identifier for a Custom Voice. Formatted as a UUID.
    """

    version: int = pydantic.Field()
    """
    Version number for a Custom Voice.
    
    Custom Voices, Prompts, Configs, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed.
    
    Version numbers are integer values representing different iterations of the Custom Voice. Each update to the Custom Voice increments its version number.
    """

    name: str = pydantic.Field()
    """
    The name of the Custom Voice. Maximum length of 75 characters.
    """

    created_on: int = pydantic.Field()
    """
    Time at which the Custom Voice was created. Measured in seconds since the Unix epoch.
    """

    modified_on: int = pydantic.Field()
    """
    Time at which the Custom Voice was last modified. Measured in seconds since the Unix epoch.
    """

    base_voice: ReturnCustomVoiceBaseVoice = pydantic.Field()
    """
    The base voice used to create the Custom Voice.
    """

    parameter_model: typing.Literal["20241004-11parameter"] = pydantic.Field(default="20241004-11parameter")
    """
    The name of the parameter model used to define which attributes are used by the `parameters` field. Currently, only `20241004-11parameter` is supported as the parameter model.
    """

    parameters: ReturnCustomVoiceParameters = pydantic.Field()
    """
    The specified attributes of a Custom Voice. If a parameter's value is `0` (default), it will not be included in the response.
    """

    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
