"""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 Literal
from typing_extensions import Annotated, TypedDict


class AnthropicToolResultContentTypedDict(TypedDict):
    tool_use_id: str
    r"""ID of the tool use this result corresponds to"""
    content: str
    r"""Result of the tool execution"""
    type: Literal["tool_result"]


class AnthropicToolResultContent(BaseModel):
    tool_use_id: str
    r"""ID of the tool use this result corresponds to"""

    content: str
    r"""Result of the tool execution"""

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