# This file was auto-generated by Fern from our API Definition.

from ...core.unchecked_base_model import UncheckedBaseModel
import typing
from .templates_create_agents_response_agents_item_tools_item_tool_type import (
    TemplatesCreateAgentsResponseAgentsItemToolsItemToolType,
)
from .templates_create_agents_response_agents_item_tools_item_description import (
    TemplatesCreateAgentsResponseAgentsItemToolsItemDescription,
)
from .templates_create_agents_response_agents_item_tools_item_source_type import (
    TemplatesCreateAgentsResponseAgentsItemToolsItemSourceType,
)
from .templates_create_agents_response_agents_item_tools_item_organization_id import (
    TemplatesCreateAgentsResponseAgentsItemToolsItemOrganizationId,
)
from .templates_create_agents_response_agents_item_tools_item_name import (
    TemplatesCreateAgentsResponseAgentsItemToolsItemName,
)
from .templates_create_agents_response_agents_item_tools_item_source_code import (
    TemplatesCreateAgentsResponseAgentsItemToolsItemSourceCode,
)
from .templates_create_agents_response_agents_item_tools_item_json_schema import (
    TemplatesCreateAgentsResponseAgentsItemToolsItemJsonSchema,
)
from .templates_create_agents_response_agents_item_tools_item_args_json_schema import (
    TemplatesCreateAgentsResponseAgentsItemToolsItemArgsJsonSchema,
)
from .templates_create_agents_response_agents_item_tools_item_created_by_id import (
    TemplatesCreateAgentsResponseAgentsItemToolsItemCreatedById,
)
from .templates_create_agents_response_agents_item_tools_item_last_updated_by_id import (
    TemplatesCreateAgentsResponseAgentsItemToolsItemLastUpdatedById,
)
import typing_extensions
from .templates_create_agents_response_agents_item_tools_item_metadata import (
    TemplatesCreateAgentsResponseAgentsItemToolsItemMetadata,
)
from ...core.serialization import FieldMetadata
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class TemplatesCreateAgentsResponseAgentsItemToolsItem(UncheckedBaseModel):
    id: typing.Optional[str] = None
    tool_type: typing.Optional[TemplatesCreateAgentsResponseAgentsItemToolsItemToolType] = None
    description: typing.Optional[TemplatesCreateAgentsResponseAgentsItemToolsItemDescription] = None
    source_type: typing.Optional[TemplatesCreateAgentsResponseAgentsItemToolsItemSourceType] = None
    organization_id: typing.Optional[TemplatesCreateAgentsResponseAgentsItemToolsItemOrganizationId] = None
    name: typing.Optional[TemplatesCreateAgentsResponseAgentsItemToolsItemName] = None
    tags: typing.Optional[typing.List[str]] = None
    source_code: typing.Optional[TemplatesCreateAgentsResponseAgentsItemToolsItemSourceCode] = None
    json_schema: typing.Optional[TemplatesCreateAgentsResponseAgentsItemToolsItemJsonSchema] = None
    args_json_schema: typing.Optional[TemplatesCreateAgentsResponseAgentsItemToolsItemArgsJsonSchema] = None
    return_char_limit: typing.Optional[float] = None
    created_by_id: typing.Optional[TemplatesCreateAgentsResponseAgentsItemToolsItemCreatedById] = None
    last_updated_by_id: typing.Optional[TemplatesCreateAgentsResponseAgentsItemToolsItemLastUpdatedById] = None
    metadata: typing_extensions.Annotated[
        typing.Optional[TemplatesCreateAgentsResponseAgentsItemToolsItemMetadata], FieldMetadata(alias="metadata_")
    ] = 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
