# 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 .templates_create_agents_from_template_response_agents_item_tool_rules_item_item_four_prompt_template import (
    TemplatesCreateAgentsFromTemplateResponseAgentsItemToolRulesItemItemFourPromptTemplate,
)
from .templates_create_agents_from_template_response_agents_item_tool_rules_item_item_four_type import (
    TemplatesCreateAgentsFromTemplateResponseAgentsItemToolRulesItemItemFourType,
)


class TemplatesCreateAgentsFromTemplateResponseAgentsItemToolRulesItemItemFour(UncheckedBaseModel):
    tool_name: str
    type: typing.Optional[TemplatesCreateAgentsFromTemplateResponseAgentsItemToolRulesItemItemFourType] = None
    prompt_template: typing.Optional[
        TemplatesCreateAgentsFromTemplateResponseAgentsItemToolRulesItemItemFourPromptTemplate
    ] = None

    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
