# 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 .batch_run_status import BatchRunStatus
from .created_at import CreatedAt
from .evaluation_set_run_entity import EvaluationSetRunEntity
from .evaluation_set_run_entity_version import EvaluationSetRunEntityVersion
from .evaluation_set_run_metrics import EvaluationSetRunMetrics
from .evaluation_set_run_options import EvaluationSetRunOptions
from .updated_at import UpdatedAt


class EvaluationSetRun(UncheckedBaseModel):
    object: typing.Literal["evaluation_set_run"] = pydantic.Field(default="evaluation_set_run")
    """
    The type of object. In this case, it will always be `"evaluation_set_run"`.
    """

    id: str = pydantic.Field()
    """
    The unique identifier for this evaluation set run.
    
    Example: `"eval_set_run_Xj8mK2pL9nR4vT7qY5wZ"`
    """

    evaluation_set_id: typing_extensions.Annotated[str, FieldMetadata(alias="evaluationSetId")] = pydantic.Field(
        alias="evaluationSetId"
    )
    """
    The ID of the evaluation set that was run.
    
    Example: `"ev_2LcgeY_mp2T5yPaEuq5Lw"`
    """

    entity: EvaluationSetRunEntity = pydantic.Field()
    """
    The extractor, classifier, or splitter that was run.
    """

    entity_version: typing_extensions.Annotated[EvaluationSetRunEntityVersion, FieldMetadata(alias="entityVersion")] = (
        pydantic.Field(alias="entityVersion")
    )
    """
    The version of the extractor, classifier, or splitter that was run.
    """

    metrics: EvaluationSetRunMetrics
    status: BatchRunStatus
    options: EvaluationSetRunOptions = pydantic.Field()
    """
    The options for the evaluation set run.
    """

    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"
    )

    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
