# 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 .classifier_version import ClassifierVersion
from .created_at import CreatedAt
from .updated_at import UpdatedAt


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

    id: str = pydantic.Field()
    """
    The ID of the classifier.
    
    Example: `"cl_Xj8mK2pL9nR4vT7qY5wZ"`
    """

    name: str = pydantic.Field()
    """
    The name of the classifier.
    
    Example: `"Document Type Classifier"`
    """

    created_at: typing_extensions.Annotated[CreatedAt, FieldMetadata(alias="createdAt")] = pydantic.Field(
        alias="createdAt"
    )
    updated_at: typing_extensions.Annotated[UpdatedAt, FieldMetadata(alias="updatedAt")] = pydantic.Field(
        alias="updatedAt"
    )
    draft_version: typing_extensions.Annotated[ClassifierVersion, FieldMetadata(alias="draftVersion")] = pydantic.Field(
        alias="draftVersion"
    )
    """
    The draft version of the classifier. This is the editable version in the Extend dashboard.
    """

    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
