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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.serialization import FieldMetadata
from ..core.unchecked_base_model import UncheckedBaseModel
from .classify_config import ClassifyConfig
from .created_at import CreatedAt


class ClassifierVersion(UncheckedBaseModel):
    object: typing.Literal["classifier_version"] = pydantic.Field(default="classifier_version")
    """
    The type of object. Will always be `"classifier_version"`.
    """

    id: str = pydantic.Field()
    """
    The unique identifier for this version of the classifier.
    
    Example: `"clv_xK9mLPqRtN3vS8wF5hB2cQ"`
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    A description of this version of the classifier.
    
    Example: `"Added new document types for Q4 processing"`
    """

    version: str = pydantic.Field()
    """
    The version number or identifier for this specific version of the classifier. The draft version will have version="draft".
    
    Examples: `"1.0"`, `"2.1"`, `"draft"`
    """

    config: ClassifyConfig = pydantic.Field()
    """
    The configuration settings for this version of the classifier.
    """

    classifier_id: typing_extensions.Annotated[str, FieldMetadata(alias="classifierId")] = pydantic.Field(
        alias="classifierId"
    )
    """
    The ID of the classifier that this version belongs to.
    
    Example: `"cl_Xj8mK2pL9nR4vT7qY5wZ"`
    """

    created_at: typing_extensions.Annotated[CreatedAt, FieldMetadata(alias="createdAt")] = pydantic.Field(
        alias="createdAt"
    )

    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
