# 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 .templates_get_template_snapshot_response_agents_item_memory_variables import (
    TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariables,
)
from .templates_get_template_snapshot_response_agents_item_properties import (
    TemplatesGetTemplateSnapshotResponseAgentsItemProperties,
)
from .templates_get_template_snapshot_response_agents_item_tool_rules_item import (
    TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItem,
)
from .templates_get_template_snapshot_response_agents_item_tool_variables import (
    TemplatesGetTemplateSnapshotResponseAgentsItemToolVariables,
)


class TemplatesGetTemplateSnapshotResponseAgentsItem(UncheckedBaseModel):
    model: str
    system_prompt: typing_extensions.Annotated[str, FieldMetadata(alias="systemPrompt")]
    tool_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="toolIds")] = None
    source_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="sourceIds")] = None
    properties: typing.Optional[TemplatesGetTemplateSnapshotResponseAgentsItemProperties] = None
    memory_variables: typing_extensions.Annotated[
        typing.Optional[TemplatesGetTemplateSnapshotResponseAgentsItemMemoryVariables],
        FieldMetadata(alias="memoryVariables"),
    ] = None
    tool_variables: typing_extensions.Annotated[
        typing.Optional[TemplatesGetTemplateSnapshotResponseAgentsItemToolVariables],
        FieldMetadata(alias="toolVariables"),
    ] = None
    tags: typing.Optional[typing.List[str]] = None
    identity_ids: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="identityIds")] = (
        None
    )
    tool_rules: typing_extensions.Annotated[
        typing.Optional[typing.List[TemplatesGetTemplateSnapshotResponseAgentsItemToolRulesItem]],
        FieldMetadata(alias="toolRules"),
    ] = None
    entity_id: typing_extensions.Annotated[str, FieldMetadata(alias="entityId")]
    name: str

    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
