"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
import pydantic
from pydantic.functional_validators import AfterValidator
from r9s.types import BaseModel
from r9s.utils import validate_const
from typing import Any, Dict, Literal
from typing_extensions import Annotated, TypedDict


class AnthropicToolUseContentTypedDict(TypedDict):
    id: str
    r"""Unique identifier for this tool use"""
    name: str
    r"""Name of the tool being called"""
    input: Dict[str, Any]
    r"""Input parameters for the tool"""
    type: Literal["tool_use"]


class AnthropicToolUseContent(BaseModel):
    id: str
    r"""Unique identifier for this tool use"""

    name: str
    r"""Name of the tool being called"""

    input: Dict[str, Any]
    r"""Input parameters for the tool"""

    TYPE: Annotated[
        Annotated[Literal["tool_use"], AfterValidator(validate_const("tool_use"))],
        pydantic.Field(alias="type"),
    ] = "tool_use"
