# 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
from .procedure_type import ProcedureType


class ProcedureAtVersionResponseModel(UncheckedBaseModel):
    procedure_id: str = pydantic.Field()
    """
    Procedure ID
    """

    version_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Version ID of a version of the procedure. None for a procedure never versioned.
    """

    name: str = pydantic.Field()
    """
    Procedure name
    """

    content: str = pydantic.Field()
    """
    Procedure content
    """

    type: typing.Optional[ProcedureType] = pydantic.Field(default=None)
    """
    Procedure type
    """

    trigger: typing.Optional[str] = pydantic.Field(default=None)
    """
    When the agent should use this procedure. Empty string means this is a sub-procedure that should only start when another procedure references it.
    """

    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
