# 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 ProcedureRefResponseModel(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: typing.Optional[str] = pydantic.Field(default=None)
    """
    Procedure name
    """

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

    referenced_tool_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Tool IDs referenced in the procedure content
    """

    referenced_kb_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Knowledge base IDs referenced in the procedure content
    """

    referenced_procedure_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Procedure IDs referenced in the procedure content
    """

    referenced_dynamic_variables: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Dynamic variable names used in the procedure content
    """

    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
