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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class Encoder(UniversalBaseModel):
    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The Encoder ID.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    The encoder name.
    """

    output_dimensions: typing.Optional[int] = pydantic.Field(default=None)
    """
    When this encoder is used to create an embedding, it shows the count of dimensions for the output embedding.
    A high dimensionality will consume more storage space, but it allows for an increase the quality of
    the embedding.
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    The encoder description.
    """

    default: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Indicates whether the encoder is default used when creating a corpus.
    """

    enabled: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Indicates whether the encoder is enabled.
    """

    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
