# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable

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

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


class MCPServerToolCallStepParam(TypedDict):
    r"""MCPServer tool call step."""

    arguments: Dict[str, Any]
    r"""Required. The JSON object of arguments for the function."""
    id: str
    r"""Required. A unique ID for this specific tool call."""
    name: str
    r"""Required. The name of the tool which was called."""
    server_name: str
    r"""Required. The name of the used MCP server."""
    type: Literal["mcp_server_tool_call"]


class MCPServerToolCallStep(BaseModel):
    r"""MCPServer tool call step."""

    arguments: Dict[str, Any]
    r"""Required. The JSON object of arguments for the function."""

    id: str
    r"""Required. A unique ID for this specific tool call."""

    name: str
    r"""Required. The name of the tool which was called."""

    server_name: str
    r"""Required. The name of the used MCP server."""

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


try:
    MCPServerToolCallStep.model_rebuild()
except NameError:
    pass
