# 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 ProcedureListItemResponseModel(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.
    """

    has_draft: bool = pydantic.Field()
    """
    True when the procedure has unpublished draft changes on this branch (a newly created or edited procedure not yet published). When true, the name, type, and trigger reflect that draft.
    """

    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
