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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
from .tool_json_schema import ToolJsonSchema
import typing_extensions
from ..core.serialization import FieldMetadata
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class ToolSchema(UncheckedBaseModel):
    args_json_schema: typing.Optional[typing.Any] = None
    created_at: str
    description: str
    json_schema: ToolJsonSchema
    name: str
    return_char_limit: int
    source_code: typing.Optional[str] = None
    source_type: str
    tags: typing.List[str]
    tool_type: str
    updated_at: str
    metadata: typing_extensions.Annotated[
        typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], 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
