# 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 .created_at import CreatedAt


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

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

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    A description of this version of the extractor.
    
    Example: `"Updated extraction fields for new invoice format"`
    """

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

    extractor_id: typing_extensions.Annotated[str, FieldMetadata(alias="extractorId")] = pydantic.Field(
        alias="extractorId"
    )
    """
    The ID of the extractor that this version belongs to.
    
    Example: `"ex_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
