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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class AutoGenerationMetadata(UncheckedBaseModel):
    """
    Metadata for an automatically generated simulation test.

    Tracks the origin and context of tests that were auto-generated from
    conversations, including the source conversation, topic, and evaluation
    criteria the test covers.
    """

    agent_id: str = pydantic.Field()
    """
    Agent whose simulation library this test belongs to.
    """

    stable_topic_id: str = pydantic.Field()
    """
    Stable topic id (from topic discovery) this test covers.
    """

    criteria_id: str = pydantic.Field()
    """
    Evaluation criterion id this test targets.
    """

    topic_label: str = pydantic.Field()
    """
    Human-readable topic label at generation time.
    """

    source_conversation_id: str = pydantic.Field()
    """
    Conversation the test was generated from.
    """

    generated_at_unix: int = pydantic.Field()
    """
    Unix timestamp (seconds) when the test was generated.
    """

    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
