"""Auto-generated by adk-fluent generator. Manual edits will be overwritten."""

from __future__ import annotations
from collections import defaultdict
from typing import Any, Callable, Self
from adk_fluent._base import BuilderBase
from google.adk.agents.active_streaming_tool import ActiveStreamingTool as _ADK_ActiveStreamingTool
from google.adk.tools.agent_tool import AgentTool as _ADK_AgentTool
from google.adk.tools.apihub_tool.apihub_toolset import APIHubToolset as _ADK_APIHubToolset
from google.adk.tools.application_integration_tool.application_integration_toolset import ApplicationIntegrationToolset as _ADK_ApplicationIntegrationToolset
from google.adk.tools.application_integration_tool.integration_connector_tool import IntegrationConnectorTool as _ADK_IntegrationConnectorTool
from google.adk.tools.base_authenticated_tool import BaseAuthenticatedTool as _ADK_BaseAuthenticatedTool
from google.adk.tools.base_tool import BaseTool as _ADK_BaseTool
from google.adk.tools.base_toolset import BaseToolset as _ADK_BaseToolset
from google.adk.tools.bigquery.bigquery_toolset import BigQueryToolset as _ADK_BigQueryToolset
from google.adk.tools.bigtable.bigtable_toolset import BigtableToolset as _ADK_BigtableToolset
from google.adk.tools.computer_use.computer_use_tool import ComputerUseTool as _ADK_ComputerUseTool
from google.adk.tools.computer_use.computer_use_toolset import ComputerUseToolset as _ADK_ComputerUseToolset
from google.adk.tools.data_agent.data_agent_toolset import DataAgentToolset as _ADK_DataAgentToolset
from google.adk.tools.discovery_engine_search_tool import DiscoveryEngineSearchTool as _ADK_DiscoveryEngineSearchTool
from google.adk.tools.enterprise_search_tool import EnterpriseWebSearchTool as _ADK_EnterpriseWebSearchTool
from google.adk.tools.example_tool import ExampleTool as _ADK_ExampleTool
from google.adk.tools.function_tool import FunctionTool as _ADK_FunctionTool
from google.adk.tools.google_api_tool.google_api_tool import GoogleApiTool as _ADK_GoogleApiTool
from google.adk.tools.google_api_tool.google_api_toolset import GoogleApiToolset as _ADK_GoogleApiToolset
from google.adk.tools.google_api_tool.google_api_toolsets import CalendarToolset as _ADK_CalendarToolset
from google.adk.tools.google_api_tool.google_api_toolsets import DocsToolset as _ADK_DocsToolset
from google.adk.tools.google_api_tool.google_api_toolsets import GmailToolset as _ADK_GmailToolset
from google.adk.tools.google_api_tool.google_api_toolsets import SheetsToolset as _ADK_SheetsToolset
from google.adk.tools.google_api_tool.google_api_toolsets import SlidesToolset as _ADK_SlidesToolset
from google.adk.tools.google_api_tool.google_api_toolsets import YoutubeToolset as _ADK_YoutubeToolset
from google.adk.tools.google_maps_grounding_tool import GoogleMapsGroundingTool as _ADK_GoogleMapsGroundingTool
from google.adk.tools.google_search_agent_tool import GoogleSearchAgentTool as _ADK_GoogleSearchAgentTool
from google.adk.tools.google_search_tool import GoogleSearchTool as _ADK_GoogleSearchTool
from google.adk.tools.google_tool import GoogleTool as _ADK_GoogleTool
from google.adk.tools.load_artifacts_tool import LoadArtifactsTool as _ADK_LoadArtifactsTool
from google.adk.tools.load_mcp_resource_tool import LoadMcpResourceTool as _ADK_LoadMcpResourceTool
from google.adk.tools.load_memory_tool import LoadMemoryTool as _ADK_LoadMemoryTool
from google.adk.tools.long_running_tool import LongRunningFunctionTool as _ADK_LongRunningFunctionTool
from google.adk.tools.mcp_tool.mcp_tool import MCPTool as _ADK_MCPTool
from google.adk.tools.mcp_tool.mcp_tool import McpTool as _ADK_McpTool
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset as _ADK_MCPToolset
from google.adk.tools.mcp_tool.mcp_toolset import McpToolset as _ADK_McpToolset
from google.adk.tools.openapi_tool.openapi_spec_parser.openapi_toolset import OpenAPIToolset as _ADK_OpenAPIToolset
from google.adk.tools.openapi_tool.openapi_spec_parser.rest_api_tool import RestApiTool as _ADK_RestApiTool
from google.adk.tools.preload_memory_tool import PreloadMemoryTool as _ADK_PreloadMemoryTool
from google.adk.tools.pubsub.pubsub_toolset import PubSubToolset as _ADK_PubSubToolset
from google.adk.tools.retrieval.base_retrieval_tool import BaseRetrievalTool as _ADK_BaseRetrievalTool
from google.adk.tools.set_model_response_tool import SetModelResponseTool as _ADK_SetModelResponseTool
from google.adk.tools.skill_toolset import LoadSkillResourceTool as _ADK_LoadSkillResourceTool
from google.adk.tools.skill_toolset import LoadSkillTool as _ADK_LoadSkillTool
from google.adk.tools.skill_toolset import SkillToolset as _ADK_SkillToolset
from google.adk.tools.spanner.spanner_toolset import SpannerToolset as _ADK_SpannerToolset
from google.adk.tools.toolbox_toolset import ToolboxToolset as _ADK_ToolboxToolset
from google.adk.tools.transfer_to_agent_tool import TransferToAgentTool as _ADK_TransferToAgentTool
from google.adk.tools.url_context_tool import UrlContextTool as _ADK_UrlContextTool
from google.adk.tools.vertex_ai_search_tool import VertexAiSearchTool as _ADK_VertexAiSearchTool

# ======================================================================
# Builder: ActiveStreamingTool
# ======================================================================

class ActiveStreamingTool(BuilderBase):
    """Manages streaming tool related resources during invocation."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def task(self, value: Union[Task, NoneType]) -> Self:
        """Set the ``task`` field."""
        self._config["task"] = value
        return self


    def stream(self, value: Union[LiveRequestQueue, NoneType]) -> Self:
        """Set the ``stream`` field."""
        self._config["stream"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_ActiveStreamingTool.model_fields for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against actual Pydantic schema
        if field_name not in _ADK_ActiveStreamingTool.model_fields:
            available = sorted(
                set(_ADK_ActiveStreamingTool.model_fields.keys())
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized field on _ADK_ActiveStreamingTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_ActiveStreamingTool:
        """Manages streaming tool related resources during invocation. Resolve into a native ADK _ADK_ActiveStreamingTool."""
        config = self._prepare_build_config()
        return _ADK_ActiveStreamingTool(**config)


# ======================================================================
# Builder: AgentTool
# ======================================================================

class AgentTool(BuilderBase):
    """A tool that wraps an agent."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'skip_summarization', 'include_plugins', 'agent'}


    def __init__(self, agent: str) -> None:
        self._config: dict[str, Any] = {"agent": agent}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def skip_summarization(self, value: bool) -> Self:
        """Set the ``skip_summarization`` field."""
        self._config["skip_summarization"] = value
        return self


    def include_plugins(self, value: bool) -> Self:
        """Set the ``include_plugins`` field."""
        self._config["include_plugins"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_AgentTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_AgentTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_AgentTool:
        """A tool that wraps an agent. Resolve into a native ADK _ADK_AgentTool."""
        config = self._prepare_build_config()
        return _ADK_AgentTool(**config)


# ======================================================================
# Builder: APIHubToolset
# ======================================================================

class APIHubToolset(BuilderBase):
    """APIHubTool generates tools from a given API Hub resource."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'auth_scheme', 'apihub_resource_name', 'auth_credential', 'lazy_load_spec', 'service_account_json', 'name', 'tool_filter', 'description', 'apihub_client', 'access_token'}


    def __init__(self, apihub_resource_name: str) -> None:
        self._config: dict[str, Any] = {"apihub_resource_name": apihub_resource_name}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def access_token(self, value: Optional[str]) -> Self:
        """Set the ``access_token`` field."""
        self._config["access_token"] = value
        return self


    def service_account_json(self, value: Optional[str]) -> Self:
        """Set the ``service_account_json`` field."""
        self._config["service_account_json"] = value
        return self


    def name(self, value: str) -> Self:
        """Set the ``name`` field."""
        self._config["name"] = value
        return self


    def description(self, value: str) -> Self:
        """Set the ``description`` field."""
        self._config["description"] = value
        return self


    def lazy_load_spec(self, value: Any) -> Self:
        """Set the ``lazy_load_spec`` field."""
        self._config["lazy_load_spec"] = value
        return self


    def auth_scheme(self, value: Optional[AuthScheme]) -> Self:
        """Set the ``auth_scheme`` field."""
        self._config["auth_scheme"] = value
        return self


    def auth_credential(self, value: Optional[AuthCredential]) -> Self:
        """Set the ``auth_credential`` field."""
        self._config["auth_credential"] = value
        return self


    def apihub_client(self, value: Optional[APIHubClient]) -> Self:
        """Set the ``apihub_client`` field."""
        self._config["apihub_client"] = value
        return self


    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_APIHubToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_APIHubToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_APIHubToolset:
        """APIHubTool generates tools from a given API Hub resource. Resolve into a native ADK _ADK_APIHubToolset."""
        config = self._prepare_build_config()
        return _ADK_APIHubToolset(**config)


# ======================================================================
# Builder: ApplicationIntegrationToolset
# ======================================================================

class ApplicationIntegrationToolset(BuilderBase):
    """ApplicationIntegrationToolset generates tools from a given Application."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'auth_scheme', 'entity_operations', 'auth_credential', 'service_account_json', 'integration', 'actions', 'connection', 'tool_instructions', 'triggers', 'connection_template_override', 'tool_filter', 'project', 'tool_name_prefix', 'location'}


    def __init__(self, project: str, location: str) -> None:
        self._config: dict[str, Any] = {"project": project, "location": location}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def connection_template_override(self, value: Optional[str]) -> Self:
        """Set the ``connection_template_override`` field."""
        self._config["connection_template_override"] = value
        return self


    def integration(self, value: Optional[str]) -> Self:
        """Set the ``integration`` field."""
        self._config["integration"] = value
        return self


    def triggers(self, value: Optional[List[str]]) -> Self:
        """Set the ``triggers`` field."""
        self._config["triggers"] = value
        return self


    def connection(self, value: Optional[str]) -> Self:
        """Set the ``connection`` field."""
        self._config["connection"] = value
        return self


    def entity_operations(self, value: Optional[str]) -> Self:
        """Set the ``entity_operations`` field."""
        self._config["entity_operations"] = value
        return self


    def actions(self, value: Optional[list[str]]) -> Self:
        """Set the ``actions`` field."""
        self._config["actions"] = value
        return self


    def tool_name_prefix(self, value: Optional[str]) -> Self:
        """Set the ``tool_name_prefix`` field."""
        self._config["tool_name_prefix"] = value
        return self


    def tool_instructions(self, value: Optional[str]) -> Self:
        """Set the ``tool_instructions`` field."""
        self._config["tool_instructions"] = value
        return self


    def service_account_json(self, value: Optional[str]) -> Self:
        """Set the ``service_account_json`` field."""
        self._config["service_account_json"] = value
        return self


    def auth_scheme(self, value: Optional[AuthScheme]) -> Self:
        """Set the ``auth_scheme`` field."""
        self._config["auth_scheme"] = value
        return self


    def auth_credential(self, value: Optional[AuthCredential]) -> Self:
        """Set the ``auth_credential`` field."""
        self._config["auth_credential"] = value
        return self


    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_ApplicationIntegrationToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_ApplicationIntegrationToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_ApplicationIntegrationToolset:
        """ApplicationIntegrationToolset generates tools from a given Application. Resolve into a native ADK _ADK_ApplicationIntegrationToolset."""
        config = self._prepare_build_config()
        return _ADK_ApplicationIntegrationToolset(**config)


# ======================================================================
# Builder: IntegrationConnectorTool
# ======================================================================

class IntegrationConnectorTool(BuilderBase):
    """A tool that wraps a RestApiTool to interact with a specific Application Integration endpoint."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'auth_scheme', 'auth_credential', 'connection_service_name', 'entity', 'action', 'operation', 'connection_name', 'name', 'rest_api_tool', 'description', 'connection_host'}


    def __init__(self, name: str, description: str, connection_name: str) -> None:
        self._config: dict[str, Any] = {"name": name, "description": description, "connection_name": connection_name}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def connection_host(self, value: str) -> Self:
        """Set the ``connection_host`` field."""
        self._config["connection_host"] = value
        return self


    def connection_service_name(self, value: str) -> Self:
        """Set the ``connection_service_name`` field."""
        self._config["connection_service_name"] = value
        return self


    def entity(self, value: str) -> Self:
        """Set the ``entity`` field."""
        self._config["entity"] = value
        return self


    def operation(self, value: str) -> Self:
        """Set the ``operation`` field."""
        self._config["operation"] = value
        return self


    def action(self, value: str) -> Self:
        """Set the ``action`` field."""
        self._config["action"] = value
        return self


    def rest_api_tool(self, value: RestApiTool) -> Self:
        """Set the ``rest_api_tool`` field."""
        self._config["rest_api_tool"] = value
        return self


    def auth_scheme(self, value: Optional[Union[AuthScheme, str]]) -> Self:
        """Set the ``auth_scheme`` field."""
        self._config["auth_scheme"] = value
        return self


    def auth_credential(self, value: Optional[Union[AuthCredential, str]]) -> Self:
        """Set the ``auth_credential`` field."""
        self._config["auth_credential"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_IntegrationConnectorTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_IntegrationConnectorTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_IntegrationConnectorTool:
        """A tool that wraps a RestApiTool to interact with a specific Application Integration endpoint. Resolve into a native ADK _ADK_IntegrationConnectorTool."""
        config = self._prepare_build_config()
        return _ADK_IntegrationConnectorTool(**config)


# ======================================================================
# Builder: BaseAuthenticatedTool
# ======================================================================

class BaseAuthenticatedTool(BuilderBase):
    """A base tool class that handles authentication before the actual tool logic."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'description', 'name', 'auth_config', 'response_for_auth_required'}


    def __init__(self, name: str, description: str) -> None:
        self._config: dict[str, Any] = {"name": name, "description": description}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def auth_config(self, value: AuthConfig) -> Self:
        """Set the ``auth_config`` field."""
        self._config["auth_config"] = value
        return self


    def response_for_auth_required(self, value: Optional[Union[dict[str, Any], str]]) -> Self:
        """Set the ``response_for_auth_required`` field."""
        self._config["response_for_auth_required"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_BaseAuthenticatedTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_BaseAuthenticatedTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_BaseAuthenticatedTool:
        """A base tool class that handles authentication before the actual tool logic. Resolve into a native ADK _ADK_BaseAuthenticatedTool."""
        config = self._prepare_build_config()
        return _ADK_BaseAuthenticatedTool(**config)


# ======================================================================
# Builder: BaseTool
# ======================================================================

class BaseTool(BuilderBase):
    """The base class for all tools."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'description', 'custom_metadata', 'is_long_running', 'name'}


    def __init__(self, name: str, description: str) -> None:
        self._config: dict[str, Any] = {"name": name, "description": description}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def is_long_running(self, value: bool) -> Self:
        """Set the ``is_long_running`` field."""
        self._config["is_long_running"] = value
        return self


    def custom_metadata(self, value: Optional[dict[str, Any]]) -> Self:
        """Set the ``custom_metadata`` field."""
        self._config["custom_metadata"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_BaseTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_BaseTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_BaseTool:
        """The base class for all tools. Resolve into a native ADK _ADK_BaseTool."""
        config = self._prepare_build_config()
        return _ADK_BaseTool(**config)


# ======================================================================
# Builder: BaseToolset
# ======================================================================

class BaseToolset(BuilderBase):
    """Base class for toolset."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'tool_name_prefix', 'tool_filter'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def tool_name_prefix(self, value: Optional[str]) -> Self:
        """Set the ``tool_name_prefix`` field."""
        self._config["tool_name_prefix"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_BaseToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_BaseToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_BaseToolset:
        """Base class for toolset. Resolve into a native ADK _ADK_BaseToolset."""
        config = self._prepare_build_config()
        return _ADK_BaseToolset(**config)


# ======================================================================
# Builder: BigQueryToolset
# ======================================================================

class BigQueryToolset(BuilderBase):
    """BigQuery Toolset contains tools for interacting with BigQuery data and metadata."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'tool_filter', 'bigquery_tool_config', 'credentials_config'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def credentials_config(self, value: Optional[BigQueryCredentialsConfig]) -> Self:
        """Set the ``credentials_config`` field."""
        self._config["credentials_config"] = value
        return self


    def bigquery_tool_config(self, value: Optional[BigQueryToolConfig]) -> Self:
        """Set the ``bigquery_tool_config`` field."""
        self._config["bigquery_tool_config"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_BigQueryToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_BigQueryToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_BigQueryToolset:
        """BigQuery Toolset contains tools for interacting with BigQuery data and metadata. Resolve into a native ADK _ADK_BigQueryToolset."""
        config = self._prepare_build_config()
        return _ADK_BigQueryToolset(**config)


# ======================================================================
# Builder: BigtableToolset
# ======================================================================

class BigtableToolset(BuilderBase):
    """Bigtable Toolset contains tools for interacting with Bigtable data and metadata."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'tool_filter', 'credentials_config', 'bigtable_tool_settings'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def credentials_config(self, value: Optional[BigtableCredentialsConfig]) -> Self:
        """Set the ``credentials_config`` field."""
        self._config["credentials_config"] = value
        return self


    def bigtable_tool_settings(self, value: Optional[BigtableToolSettings]) -> Self:
        """Set the ``bigtable_tool_settings`` field."""
        self._config["bigtable_tool_settings"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_BigtableToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_BigtableToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_BigtableToolset:
        """Bigtable Toolset contains tools for interacting with Bigtable data and metadata. Resolve into a native ADK _ADK_BigtableToolset."""
        config = self._prepare_build_config()
        return _ADK_BigtableToolset(**config)


# ======================================================================
# Builder: ComputerUseTool
# ======================================================================

class ComputerUseTool(BuilderBase):
    """A tool that wraps computer control functions for use with LLMs."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'virtual_screen_size', 'screen_size', 'func'}


    def __init__(self, func: str, screen_size: str) -> None:
        self._config: dict[str, Any] = {"func": func, "screen_size": screen_size}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def virtual_screen_size(self, value: tuple[int, int]) -> Self:
        """Set the ``virtual_screen_size`` field."""
        self._config["virtual_screen_size"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_ComputerUseTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_ComputerUseTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_ComputerUseTool:
        """A tool that wraps computer control functions for use with LLMs. Resolve into a native ADK _ADK_ComputerUseTool."""
        config = self._prepare_build_config()
        return _ADK_ComputerUseTool(**config)


# ======================================================================
# Builder: ComputerUseToolset
# ======================================================================

class ComputerUseToolset(BuilderBase):
    """Fluent builder for ComputerUseToolset."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'computer'}


    def __init__(self, computer: str) -> None:
        self._config: dict[str, Any] = {"computer": computer}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_ComputerUseToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_ComputerUseToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_ComputerUseToolset:
        """Fluent builder for ComputerUseToolset. Resolve into a native ADK _ADK_ComputerUseToolset."""
        config = self._prepare_build_config()
        return _ADK_ComputerUseToolset(**config)


# ======================================================================
# Builder: DataAgentToolset
# ======================================================================

class DataAgentToolset(BuilderBase):
    """Data Agent Toolset contains tools for interacting with data agents."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'tool_filter', 'credentials_config', 'data_agent_tool_config'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def credentials_config(self, value: Optional[DataAgentCredentialsConfig]) -> Self:
        """Set the ``credentials_config`` field."""
        self._config["credentials_config"] = value
        return self


    def data_agent_tool_config(self, value: Optional[DataAgentToolConfig]) -> Self:
        """Set the ``data_agent_tool_config`` field."""
        self._config["data_agent_tool_config"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_DataAgentToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_DataAgentToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_DataAgentToolset:
        """Data Agent Toolset contains tools for interacting with data agents. Resolve into a native ADK _ADK_DataAgentToolset."""
        config = self._prepare_build_config()
        return _ADK_DataAgentToolset(**config)


# ======================================================================
# Builder: DiscoveryEngineSearchTool
# ======================================================================

class DiscoveryEngineSearchTool(BuilderBase):
    """Tool for searching the discovery engine."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'max_results', 'data_store_id', 'data_store_specs', 'filter', 'search_engine_id'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def data_store_id(self, value: Optional[str]) -> Self:
        """Set the ``data_store_id`` field."""
        self._config["data_store_id"] = value
        return self


    def data_store_specs(self, value: Optional[list[types.VertexAISearchDataStoreSpec]]) -> Self:
        """Set the ``data_store_specs`` field."""
        self._config["data_store_specs"] = value
        return self


    def search_engine_id(self, value: Optional[str]) -> Self:
        """Set the ``search_engine_id`` field."""
        self._config["search_engine_id"] = value
        return self


    def filter(self, value: Optional[str]) -> Self:
        """Set the ``filter`` field."""
        self._config["filter"] = value
        return self


    def max_results(self, value: Optional[int]) -> Self:
        """Set the ``max_results`` field."""
        self._config["max_results"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_DiscoveryEngineSearchTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_DiscoveryEngineSearchTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_DiscoveryEngineSearchTool:
        """Tool for searching the discovery engine. Resolve into a native ADK _ADK_DiscoveryEngineSearchTool."""
        config = self._prepare_build_config()
        return _ADK_DiscoveryEngineSearchTool(**config)


# ======================================================================
# Builder: EnterpriseWebSearchTool
# ======================================================================

class EnterpriseWebSearchTool(BuilderBase):
    """A Gemini 2+ built-in tool using web grounding for Enterprise compliance."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = set()


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_EnterpriseWebSearchTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_EnterpriseWebSearchTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_EnterpriseWebSearchTool:
        """A Gemini 2+ built-in tool using web grounding for Enterprise compliance. Resolve into a native ADK _ADK_EnterpriseWebSearchTool."""
        config = self._prepare_build_config()
        return _ADK_EnterpriseWebSearchTool(**config)


# ======================================================================
# Builder: ExampleTool
# ======================================================================

class ExampleTool(BuilderBase):
    """A tool that adds (few-shot) examples to the LLM request."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'examples'}


    def __init__(self, examples: str) -> None:
        self._config: dict[str, Any] = {"examples": examples}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_ExampleTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_ExampleTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_ExampleTool:
        """A tool that adds (few-shot) examples to the LLM request. Resolve into a native ADK _ADK_ExampleTool."""
        config = self._prepare_build_config()
        return _ADK_ExampleTool(**config)


# ======================================================================
# Builder: FunctionTool
# ======================================================================

class FunctionTool(BuilderBase):
    """A tool that wraps a user-defined Python function."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'require_confirmation', 'func'}


    def __init__(self, func: str) -> None:
        self._config: dict[str, Any] = {"func": func}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def require_confirmation(self, value: Union[bool, Callable[..., bool]]) -> Self:
        """Set the ``require_confirmation`` field."""
        self._config["require_confirmation"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_FunctionTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_FunctionTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_FunctionTool:
        """A tool that wraps a user-defined Python function. Resolve into a native ADK _ADK_FunctionTool."""
        config = self._prepare_build_config()
        return _ADK_FunctionTool(**config)


# ======================================================================
# Builder: GoogleApiTool
# ======================================================================

class GoogleApiTool(BuilderBase):
    """Fluent builder for GoogleApiTool."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'client_id', 'service_account', 'additional_headers', 'rest_api_tool', 'client_secret'}


    def __init__(self, rest_api_tool: str) -> None:
        self._config: dict[str, Any] = {"rest_api_tool": rest_api_tool}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def client_id(self, value: Optional[str]) -> Self:
        """Set the ``client_id`` field."""
        self._config["client_id"] = value
        return self


    def client_secret(self, value: Optional[str]) -> Self:
        """Set the ``client_secret`` field."""
        self._config["client_secret"] = value
        return self


    def service_account(self, value: Optional[ServiceAccount]) -> Self:
        """Set the ``service_account`` field."""
        self._config["service_account"] = value
        return self


    def additional_headers(self, value: Optional[Dict[str, str]]) -> Self:
        """Set the ``additional_headers`` field."""
        self._config["additional_headers"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_GoogleApiTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_GoogleApiTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_GoogleApiTool:
        """Fluent builder for GoogleApiTool. Resolve into a native ADK _ADK_GoogleApiTool."""
        config = self._prepare_build_config()
        return _ADK_GoogleApiTool(**config)


# ======================================================================
# Builder: GoogleApiToolset
# ======================================================================

class GoogleApiToolset(BuilderBase):
    """Google API Toolset contains tools for interacting with Google APIs."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'client_id', 'service_account', 'api_name', 'api_version', 'additional_headers', 'tool_filter', 'client_secret', 'tool_name_prefix'}


    def __init__(self, api_name: str, api_version: str) -> None:
        self._config: dict[str, Any] = {"api_name": api_name, "api_version": api_version}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def client_id(self, value: Optional[str]) -> Self:
        """Set the ``client_id`` field."""
        self._config["client_id"] = value
        return self


    def client_secret(self, value: Optional[str]) -> Self:
        """Set the ``client_secret`` field."""
        self._config["client_secret"] = value
        return self


    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def service_account(self, value: Optional[ServiceAccount]) -> Self:
        """Set the ``service_account`` field."""
        self._config["service_account"] = value
        return self


    def tool_name_prefix(self, value: Optional[str]) -> Self:
        """Set the ``tool_name_prefix`` field."""
        self._config["tool_name_prefix"] = value
        return self


    def additional_headers(self, value: Optional[Dict[str, str]]) -> Self:
        """Set the ``additional_headers`` field."""
        self._config["additional_headers"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_GoogleApiToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_GoogleApiToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_GoogleApiToolset:
        """Google API Toolset contains tools for interacting with Google APIs. Resolve into a native ADK _ADK_GoogleApiToolset."""
        config = self._prepare_build_config()
        return _ADK_GoogleApiToolset(**config)


# ======================================================================
# Builder: CalendarToolset
# ======================================================================

class CalendarToolset(BuilderBase):
    """Auto-generated Calendar toolset based on Google Calendar API v3 spec exposed by Google API discovery API."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'client_id', 'service_account', 'tool_filter', 'client_secret', 'tool_name_prefix'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def client_id(self, value: Optional[str]) -> Self:
        """Set the ``client_id`` field."""
        self._config["client_id"] = value
        return self


    def client_secret(self, value: Optional[str]) -> Self:
        """Set the ``client_secret`` field."""
        self._config["client_secret"] = value
        return self


    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def service_account(self, value: Optional[ServiceAccount]) -> Self:
        """Set the ``service_account`` field."""
        self._config["service_account"] = value
        return self


    def tool_name_prefix(self, value: Optional[str]) -> Self:
        """Set the ``tool_name_prefix`` field."""
        self._config["tool_name_prefix"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_CalendarToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_CalendarToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_CalendarToolset:
        """Auto-generated Calendar toolset based on Google Calendar API v3 spec exposed by Google API discovery API. Resolve into a native ADK _ADK_CalendarToolset."""
        config = self._prepare_build_config()
        return _ADK_CalendarToolset(**config)


# ======================================================================
# Builder: DocsToolset
# ======================================================================

class DocsToolset(BuilderBase):
    """Auto-generated Docs toolset based on Google Docs API v1 spec exposed by Google API discovery API."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'client_id', 'service_account', 'tool_filter', 'client_secret', 'tool_name_prefix'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def client_id(self, value: Optional[str]) -> Self:
        """Set the ``client_id`` field."""
        self._config["client_id"] = value
        return self


    def client_secret(self, value: Optional[str]) -> Self:
        """Set the ``client_secret`` field."""
        self._config["client_secret"] = value
        return self


    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def service_account(self, value: Optional[ServiceAccount]) -> Self:
        """Set the ``service_account`` field."""
        self._config["service_account"] = value
        return self


    def tool_name_prefix(self, value: Optional[str]) -> Self:
        """Set the ``tool_name_prefix`` field."""
        self._config["tool_name_prefix"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_DocsToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_DocsToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_DocsToolset:
        """Auto-generated Docs toolset based on Google Docs API v1 spec exposed by Google API discovery API. Resolve into a native ADK _ADK_DocsToolset."""
        config = self._prepare_build_config()
        return _ADK_DocsToolset(**config)


# ======================================================================
# Builder: GmailToolset
# ======================================================================

class GmailToolset(BuilderBase):
    """Auto-generated Gmail toolset based on Google Gmail API v1 spec exposed by Google API discovery API."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'client_id', 'service_account', 'tool_filter', 'client_secret', 'tool_name_prefix'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def client_id(self, value: Optional[str]) -> Self:
        """Set the ``client_id`` field."""
        self._config["client_id"] = value
        return self


    def client_secret(self, value: Optional[str]) -> Self:
        """Set the ``client_secret`` field."""
        self._config["client_secret"] = value
        return self


    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def service_account(self, value: Optional[ServiceAccount]) -> Self:
        """Set the ``service_account`` field."""
        self._config["service_account"] = value
        return self


    def tool_name_prefix(self, value: Optional[str]) -> Self:
        """Set the ``tool_name_prefix`` field."""
        self._config["tool_name_prefix"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_GmailToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_GmailToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_GmailToolset:
        """Auto-generated Gmail toolset based on Google Gmail API v1 spec exposed by Google API discovery API. Resolve into a native ADK _ADK_GmailToolset."""
        config = self._prepare_build_config()
        return _ADK_GmailToolset(**config)


# ======================================================================
# Builder: SheetsToolset
# ======================================================================

class SheetsToolset(BuilderBase):
    """Auto-generated Sheets toolset based on Google Sheets API v4 spec exposed by Google API discovery API."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'client_id', 'service_account', 'tool_filter', 'client_secret', 'tool_name_prefix'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def client_id(self, value: Optional[str]) -> Self:
        """Set the ``client_id`` field."""
        self._config["client_id"] = value
        return self


    def client_secret(self, value: Optional[str]) -> Self:
        """Set the ``client_secret`` field."""
        self._config["client_secret"] = value
        return self


    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def service_account(self, value: Optional[ServiceAccount]) -> Self:
        """Set the ``service_account`` field."""
        self._config["service_account"] = value
        return self


    def tool_name_prefix(self, value: Optional[str]) -> Self:
        """Set the ``tool_name_prefix`` field."""
        self._config["tool_name_prefix"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_SheetsToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_SheetsToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_SheetsToolset:
        """Auto-generated Sheets toolset based on Google Sheets API v4 spec exposed by Google API discovery API. Resolve into a native ADK _ADK_SheetsToolset."""
        config = self._prepare_build_config()
        return _ADK_SheetsToolset(**config)


# ======================================================================
# Builder: SlidesToolset
# ======================================================================

class SlidesToolset(BuilderBase):
    """Auto-generated Slides toolset based on Google Slides API v1 spec exposed by Google API discovery API."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'client_id', 'service_account', 'tool_filter', 'client_secret', 'tool_name_prefix'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def client_id(self, value: Optional[str]) -> Self:
        """Set the ``client_id`` field."""
        self._config["client_id"] = value
        return self


    def client_secret(self, value: Optional[str]) -> Self:
        """Set the ``client_secret`` field."""
        self._config["client_secret"] = value
        return self


    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def service_account(self, value: Optional[ServiceAccount]) -> Self:
        """Set the ``service_account`` field."""
        self._config["service_account"] = value
        return self


    def tool_name_prefix(self, value: Optional[str]) -> Self:
        """Set the ``tool_name_prefix`` field."""
        self._config["tool_name_prefix"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_SlidesToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_SlidesToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_SlidesToolset:
        """Auto-generated Slides toolset based on Google Slides API v1 spec exposed by Google API discovery API. Resolve into a native ADK _ADK_SlidesToolset."""
        config = self._prepare_build_config()
        return _ADK_SlidesToolset(**config)


# ======================================================================
# Builder: YoutubeToolset
# ======================================================================

class YoutubeToolset(BuilderBase):
    """Auto-generated YouTube toolset based on YouTube API v3 spec exposed by Google API discovery API."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'client_id', 'service_account', 'tool_filter', 'client_secret', 'tool_name_prefix'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def client_id(self, value: Optional[str]) -> Self:
        """Set the ``client_id`` field."""
        self._config["client_id"] = value
        return self


    def client_secret(self, value: Optional[str]) -> Self:
        """Set the ``client_secret`` field."""
        self._config["client_secret"] = value
        return self


    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def service_account(self, value: Optional[ServiceAccount]) -> Self:
        """Set the ``service_account`` field."""
        self._config["service_account"] = value
        return self


    def tool_name_prefix(self, value: Optional[str]) -> Self:
        """Set the ``tool_name_prefix`` field."""
        self._config["tool_name_prefix"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_YoutubeToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_YoutubeToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_YoutubeToolset:
        """Auto-generated YouTube toolset based on YouTube API v3 spec exposed by Google API discovery API. Resolve into a native ADK _ADK_YoutubeToolset."""
        config = self._prepare_build_config()
        return _ADK_YoutubeToolset(**config)


# ======================================================================
# Builder: GoogleMapsGroundingTool
# ======================================================================

class GoogleMapsGroundingTool(BuilderBase):
    """A built-in tool that is automatically invoked by Gemini 2 models to ground query results with Google Maps."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = set()


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_GoogleMapsGroundingTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_GoogleMapsGroundingTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_GoogleMapsGroundingTool:
        """A built-in tool that is automatically invoked by Gemini 2 models to ground query results with Google Maps. Resolve into a native ADK _ADK_GoogleMapsGroundingTool."""
        config = self._prepare_build_config()
        return _ADK_GoogleMapsGroundingTool(**config)


# ======================================================================
# Builder: GoogleSearchAgentTool
# ======================================================================

class GoogleSearchAgentTool(BuilderBase):
    """A tool that wraps a sub-agent that only uses google_search tool."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'agent'}


    def __init__(self, agent: str) -> None:
        self._config: dict[str, Any] = {"agent": agent}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_GoogleSearchAgentTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_GoogleSearchAgentTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_GoogleSearchAgentTool:
        """A tool that wraps a sub-agent that only uses google_search tool. Resolve into a native ADK _ADK_GoogleSearchAgentTool."""
        config = self._prepare_build_config()
        return _ADK_GoogleSearchAgentTool(**config)


# ======================================================================
# Builder: GoogleSearchTool
# ======================================================================

class GoogleSearchTool(BuilderBase):
    """A built-in tool that is automatically invoked by Gemini 2 models to retrieve search results from Google Search."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'bypass_multi_tools_limit', 'model'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def bypass_multi_tools_limit(self, value: bool) -> Self:
        """Set the ``bypass_multi_tools_limit`` field."""
        self._config["bypass_multi_tools_limit"] = value
        return self


    def model(self, value: str | None) -> Self:
        """Set the ``model`` field."""
        self._config["model"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_GoogleSearchTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_GoogleSearchTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_GoogleSearchTool:
        """A built-in tool that is automatically invoked by Gemini 2 models to retrieve search results from Google Search. Resolve into a native ADK _ADK_GoogleSearchTool."""
        config = self._prepare_build_config()
        return _ADK_GoogleSearchTool(**config)


# ======================================================================
# Builder: GoogleTool
# ======================================================================

class GoogleTool(BuilderBase):
    """GoogleTool class for tools that call Google APIs."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'tool_settings', 'func', 'credentials_config'}


    def __init__(self, func: str) -> None:
        self._config: dict[str, Any] = {"func": func}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def credentials_config(self, value: Optional[BaseGoogleCredentialsConfig]) -> Self:
        """Set the ``credentials_config`` field."""
        self._config["credentials_config"] = value
        return self


    def tool_settings(self, value: Optional[BaseModel]) -> Self:
        """Set the ``tool_settings`` field."""
        self._config["tool_settings"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_GoogleTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_GoogleTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_GoogleTool:
        """GoogleTool class for tools that call Google APIs. Resolve into a native ADK _ADK_GoogleTool."""
        config = self._prepare_build_config()
        return _ADK_GoogleTool(**config)


# ======================================================================
# Builder: LoadArtifactsTool
# ======================================================================

class LoadArtifactsTool(BuilderBase):
    """A tool that loads the artifacts and adds them to the session."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = set()


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_LoadArtifactsTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_LoadArtifactsTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_LoadArtifactsTool:
        """A tool that loads the artifacts and adds them to the session. Resolve into a native ADK _ADK_LoadArtifactsTool."""
        config = self._prepare_build_config()
        return _ADK_LoadArtifactsTool(**config)


# ======================================================================
# Builder: LoadMcpResourceTool
# ======================================================================

class LoadMcpResourceTool(BuilderBase):
    """A tool that loads the MCP resources and adds them to the session."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'mcp_toolset'}


    def __init__(self, mcp_toolset: str) -> None:
        self._config: dict[str, Any] = {"mcp_toolset": mcp_toolset}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_LoadMcpResourceTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_LoadMcpResourceTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_LoadMcpResourceTool:
        """A tool that loads the MCP resources and adds them to the session. Resolve into a native ADK _ADK_LoadMcpResourceTool."""
        config = self._prepare_build_config()
        return _ADK_LoadMcpResourceTool(**config)


# ======================================================================
# Builder: LoadMemoryTool
# ======================================================================

class LoadMemoryTool(BuilderBase):
    """A tool that loads the memory for the current user."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = set()


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_LoadMemoryTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_LoadMemoryTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_LoadMemoryTool:
        """A tool that loads the memory for the current user. Resolve into a native ADK _ADK_LoadMemoryTool."""
        config = self._prepare_build_config()
        return _ADK_LoadMemoryTool(**config)


# ======================================================================
# Builder: LongRunningFunctionTool
# ======================================================================

class LongRunningFunctionTool(BuilderBase):
    """A function tool that returns the result asynchronously."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'func'}


    def __init__(self, func: str) -> None:
        self._config: dict[str, Any] = {"func": func}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_LongRunningFunctionTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_LongRunningFunctionTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_LongRunningFunctionTool:
        """A function tool that returns the result asynchronously. Resolve into a native ADK _ADK_LongRunningFunctionTool."""
        config = self._prepare_build_config()
        return _ADK_LongRunningFunctionTool(**config)


# ======================================================================
# Builder: MCPTool
# ======================================================================

class MCPTool(BuilderBase):
    """Deprecated name, use `McpTool` instead."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = set()


    def __init__(self, args: str, kwargs: str) -> None:
        self._config: dict[str, Any] = {"args": args, "kwargs": kwargs}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_MCPTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_MCPTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_MCPTool:
        """Deprecated name, use `McpTool` instead. Resolve into a native ADK _ADK_MCPTool."""
        config = self._prepare_build_config()
        return _ADK_MCPTool(**config)


# ======================================================================
# Builder: McpTool
# ======================================================================

class McpTool(BuilderBase):
    """Turns an MCP Tool into an ADK Tool."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'auth_scheme', 'auth_credential', 'mcp_tool', 'progress_callback', 'mcp_session_manager', 'require_confirmation', 'header_provider'}


    def __init__(self, mcp_tool: str, mcp_session_manager: str) -> None:
        self._config: dict[str, Any] = {"mcp_tool": mcp_tool, "mcp_session_manager": mcp_session_manager}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def auth_scheme(self, value: Optional[AuthScheme]) -> Self:
        """Set the ``auth_scheme`` field."""
        self._config["auth_scheme"] = value
        return self


    def auth_credential(self, value: Optional[AuthCredential]) -> Self:
        """Set the ``auth_credential`` field."""
        self._config["auth_credential"] = value
        return self


    def require_confirmation(self, value: Union[bool, Callable[..., bool]]) -> Self:
        """Set the ``require_confirmation`` field."""
        self._config["require_confirmation"] = value
        return self


    def header_provider(self, value: Optional[Callable[[ReadonlyContext], Dict[str, str]]]) -> Self:
        """Set the ``header_provider`` field."""
        self._config["header_provider"] = value
        return self


    def progress_callback(self, value: Optional[Union[ProgressFnT, ProgressCallbackFactory]]) -> Self:
        """Set the ``progress_callback`` field."""
        self._config["progress_callback"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_McpTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_McpTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_McpTool:
        """Turns an MCP Tool into an ADK Tool. Resolve into a native ADK _ADK_McpTool."""
        config = self._prepare_build_config()
        return _ADK_McpTool(**config)


# ======================================================================
# Builder: MCPToolset
# ======================================================================

class MCPToolset(BuilderBase):
    """Deprecated name, use `McpToolset` instead."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = set()


    def __init__(self, args: str, kwargs: str) -> None:
        self._config: dict[str, Any] = {"args": args, "kwargs": kwargs}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_MCPToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_MCPToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_MCPToolset:
        """Deprecated name, use `McpToolset` instead. Resolve into a native ADK _ADK_MCPToolset."""
        config = self._prepare_build_config()
        return _ADK_MCPToolset(**config)


# ======================================================================
# Builder: McpToolset
# ======================================================================

class McpToolset(BuilderBase):
    """Connects to a MCP Server, and retrieves MCP Tools into ADK Tools."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'auth_scheme', 'auth_credential', 'progress_callback', 'use_mcp_resources', 'require_confirmation', 'tool_filter', 'header_provider', 'connection_params', 'tool_name_prefix', 'errlog'}


    def __init__(self, connection_params: str) -> None:
        self._config: dict[str, Any] = {"connection_params": connection_params}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def tool_name_prefix(self, value: Optional[str]) -> Self:
        """Set the ``tool_name_prefix`` field."""
        self._config["tool_name_prefix"] = value
        return self


    def errlog(self, value: TextIO) -> Self:
        """Set the ``errlog`` field."""
        self._config["errlog"] = value
        return self


    def auth_scheme(self, value: Optional[AuthScheme]) -> Self:
        """Set the ``auth_scheme`` field."""
        self._config["auth_scheme"] = value
        return self


    def auth_credential(self, value: Optional[AuthCredential]) -> Self:
        """Set the ``auth_credential`` field."""
        self._config["auth_credential"] = value
        return self


    def require_confirmation(self, value: Union[bool, Callable[..., bool]]) -> Self:
        """Set the ``require_confirmation`` field."""
        self._config["require_confirmation"] = value
        return self


    def header_provider(self, value: Optional[Callable[[ReadonlyContext], Dict[str, str]]]) -> Self:
        """Set the ``header_provider`` field."""
        self._config["header_provider"] = value
        return self


    def progress_callback(self, value: Optional[Union[ProgressFnT, ProgressCallbackFactory]]) -> Self:
        """Set the ``progress_callback`` field."""
        self._config["progress_callback"] = value
        return self


    def use_mcp_resources(self, value: Optional[bool]) -> Self:
        """Set the ``use_mcp_resources`` field."""
        self._config["use_mcp_resources"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_McpToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_McpToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_McpToolset:
        """Connects to a MCP Server, and retrieves MCP Tools into ADK Tools. Resolve into a native ADK _ADK_McpToolset."""
        config = self._prepare_build_config()
        return _ADK_McpToolset(**config)


# ======================================================================
# Builder: OpenAPIToolset
# ======================================================================

class OpenAPIToolset(BuilderBase):
    """Class for parsing OpenAPI spec into a list of RestApiTool."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'auth_scheme', 'auth_credential', 'ssl_verify', 'credential_key', 'spec_str', 'tool_filter', 'header_provider', 'spec_dict', 'spec_str_type', 'tool_name_prefix'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def spec_dict(self, value: Optional[Dict[str, Any]]) -> Self:
        """Set the ``spec_dict`` field."""
        self._config["spec_dict"] = value
        return self


    def spec_str(self, value: Optional[str]) -> Self:
        """Set the ``spec_str`` field."""
        self._config["spec_str"] = value
        return self


    def spec_str_type(self, value: Literal['json', 'yaml']) -> Self:
        """Set the ``spec_str_type`` field."""
        self._config["spec_str_type"] = value
        return self


    def auth_scheme(self, value: Optional[AuthScheme]) -> Self:
        """Set the ``auth_scheme`` field."""
        self._config["auth_scheme"] = value
        return self


    def auth_credential(self, value: Optional[AuthCredential]) -> Self:
        """Set the ``auth_credential`` field."""
        self._config["auth_credential"] = value
        return self


    def credential_key(self, value: Optional[str]) -> Self:
        """Set the ``credential_key`` field."""
        self._config["credential_key"] = value
        return self


    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def tool_name_prefix(self, value: Optional[str]) -> Self:
        """Set the ``tool_name_prefix`` field."""
        self._config["tool_name_prefix"] = value
        return self


    def ssl_verify(self, value: Optional[Union[bool, str, ssl.SSLContext]]) -> Self:
        """Set the ``ssl_verify`` field."""
        self._config["ssl_verify"] = value
        return self


    def header_provider(self, value: Optional[Callable[[ReadonlyContext], Dict[str, str]]]) -> Self:
        """Set the ``header_provider`` field."""
        self._config["header_provider"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_OpenAPIToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_OpenAPIToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_OpenAPIToolset:
        """Class for parsing OpenAPI spec into a list of RestApiTool. Resolve into a native ADK _ADK_OpenAPIToolset."""
        config = self._prepare_build_config()
        return _ADK_OpenAPIToolset(**config)


# ======================================================================
# Builder: RestApiTool
# ======================================================================

class RestApiTool(BuilderBase):
    """A generic tool that interacts with a REST API."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'auth_scheme', 'auth_credential', 'ssl_verify', 'credential_key', 'name', 'operation', 'should_parse_operation', 'description', 'endpoint', 'header_provider'}


    def __init__(self, name: str, description: str, endpoint: str) -> None:
        self._config: dict[str, Any] = {"name": name, "description": description, "endpoint": endpoint}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def operation(self, value: Union[Operation, str]) -> Self:
        """Set the ``operation`` field."""
        self._config["operation"] = value
        return self


    def auth_scheme(self, value: Optional[Union[AuthScheme, str]]) -> Self:
        """Set the ``auth_scheme`` field."""
        self._config["auth_scheme"] = value
        return self


    def auth_credential(self, value: Optional[Union[AuthCredential, str]]) -> Self:
        """Set the ``auth_credential`` field."""
        self._config["auth_credential"] = value
        return self


    def should_parse_operation(self, value: Any) -> Self:
        """Set the ``should_parse_operation`` field."""
        self._config["should_parse_operation"] = value
        return self


    def ssl_verify(self, value: Optional[Union[bool, str, ssl.SSLContext]]) -> Self:
        """Set the ``ssl_verify`` field."""
        self._config["ssl_verify"] = value
        return self


    def header_provider(self, value: Optional[Callable[[ReadonlyContext], Dict[str, str]]]) -> Self:
        """Set the ``header_provider`` field."""
        self._config["header_provider"] = value
        return self


    def credential_key(self, value: Optional[str]) -> Self:
        """Set the ``credential_key`` field."""
        self._config["credential_key"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_RestApiTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_RestApiTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_RestApiTool:
        """A generic tool that interacts with a REST API. Resolve into a native ADK _ADK_RestApiTool."""
        config = self._prepare_build_config()
        return _ADK_RestApiTool(**config)


# ======================================================================
# Builder: PreloadMemoryTool
# ======================================================================

class PreloadMemoryTool(BuilderBase):
    """A tool that preloads the memory for the current user."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = set()


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_PreloadMemoryTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_PreloadMemoryTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_PreloadMemoryTool:
        """A tool that preloads the memory for the current user. Resolve into a native ADK _ADK_PreloadMemoryTool."""
        config = self._prepare_build_config()
        return _ADK_PreloadMemoryTool(**config)


# ======================================================================
# Builder: PubSubToolset
# ======================================================================

class PubSubToolset(BuilderBase):
    """Pub/Sub Toolset contains tools for interacting with Pub/Sub topics and subscriptions."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'pubsub_tool_config', 'tool_filter', 'credentials_config'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def tool_filter(self, value: ToolPredicate | list[str] | None) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def credentials_config(self, value: PubSubCredentialsConfig | None) -> Self:
        """Set the ``credentials_config`` field."""
        self._config["credentials_config"] = value
        return self


    def pubsub_tool_config(self, value: PubSubToolConfig | None) -> Self:
        """Set the ``pubsub_tool_config`` field."""
        self._config["pubsub_tool_config"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_PubSubToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_PubSubToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_PubSubToolset:
        """Pub/Sub Toolset contains tools for interacting with Pub/Sub topics and subscriptions. Resolve into a native ADK _ADK_PubSubToolset."""
        config = self._prepare_build_config()
        return _ADK_PubSubToolset(**config)


# ======================================================================
# Builder: BaseRetrievalTool
# ======================================================================

class BaseRetrievalTool(BuilderBase):
    """Fluent builder for BaseRetrievalTool."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'description', 'custom_metadata', 'is_long_running', 'name'}


    def __init__(self, name: str, description: str) -> None:
        self._config: dict[str, Any] = {"name": name, "description": description}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def is_long_running(self, value: bool) -> Self:
        """Set the ``is_long_running`` field."""
        self._config["is_long_running"] = value
        return self


    def custom_metadata(self, value: Optional[dict[str, Any]]) -> Self:
        """Set the ``custom_metadata`` field."""
        self._config["custom_metadata"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_BaseRetrievalTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_BaseRetrievalTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_BaseRetrievalTool:
        """Fluent builder for BaseRetrievalTool. Resolve into a native ADK _ADK_BaseRetrievalTool."""
        config = self._prepare_build_config()
        return _ADK_BaseRetrievalTool(**config)


# ======================================================================
# Builder: SetModelResponseTool
# ======================================================================

class SetModelResponseTool(BuilderBase):
    """Internal tool used for output schema workaround."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'output_schema'}


    def __init__(self, output_schema: str) -> None:
        self._config: dict[str, Any] = {"output_schema": output_schema}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_SetModelResponseTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_SetModelResponseTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_SetModelResponseTool:
        """Internal tool used for output schema workaround. Resolve into a native ADK _ADK_SetModelResponseTool."""
        config = self._prepare_build_config()
        return _ADK_SetModelResponseTool(**config)


# ======================================================================
# Builder: LoadSkillResourceTool
# ======================================================================

class LoadSkillResourceTool(BuilderBase):
    """Tool to load resources (references or assets) from a skill."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'toolset'}


    def __init__(self, toolset: str) -> None:
        self._config: dict[str, Any] = {"toolset": toolset}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_LoadSkillResourceTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_LoadSkillResourceTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_LoadSkillResourceTool:
        """Tool to load resources (references or assets) from a skill. Resolve into a native ADK _ADK_LoadSkillResourceTool."""
        config = self._prepare_build_config()
        return _ADK_LoadSkillResourceTool(**config)


# ======================================================================
# Builder: LoadSkillTool
# ======================================================================

class LoadSkillTool(BuilderBase):
    """Tool to load a skill's instructions."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'toolset'}


    def __init__(self, toolset: str) -> None:
        self._config: dict[str, Any] = {"toolset": toolset}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_LoadSkillTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_LoadSkillTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_LoadSkillTool:
        """Tool to load a skill's instructions. Resolve into a native ADK _ADK_LoadSkillTool."""
        config = self._prepare_build_config()
        return _ADK_LoadSkillTool(**config)


# ======================================================================
# Builder: SkillToolset
# ======================================================================

class SkillToolset(BuilderBase):
    """A toolset for managing and interacting with agent skills."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'skills'}


    def __init__(self, skills: str) -> None:
        self._config: dict[str, Any] = {"skills": skills}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_SkillToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_SkillToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_SkillToolset:
        """A toolset for managing and interacting with agent skills. Resolve into a native ADK _ADK_SkillToolset."""
        config = self._prepare_build_config()
        return _ADK_SkillToolset(**config)


# ======================================================================
# Builder: SpannerToolset
# ======================================================================

class SpannerToolset(BuilderBase):
    """Spanner Toolset contains tools for interacting with Spanner data, database and table information."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'tool_filter', 'spanner_tool_settings', 'credentials_config'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def tool_filter(self, value: Optional[Union[ToolPredicate, List[str]]]) -> Self:
        """Set the ``tool_filter`` field."""
        self._config["tool_filter"] = value
        return self


    def credentials_config(self, value: Optional[SpannerCredentialsConfig]) -> Self:
        """Set the ``credentials_config`` field."""
        self._config["credentials_config"] = value
        return self


    def spanner_tool_settings(self, value: Optional[SpannerToolSettings]) -> Self:
        """Set the ``spanner_tool_settings`` field."""
        self._config["spanner_tool_settings"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_SpannerToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_SpannerToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_SpannerToolset:
        """Spanner Toolset contains tools for interacting with Spanner data, database and table information. Resolve into a native ADK _ADK_SpannerToolset."""
        config = self._prepare_build_config()
        return _ADK_SpannerToolset(**config)


# ======================================================================
# Builder: ToolboxToolset
# ======================================================================

class ToolboxToolset(BuilderBase):
    """A class that provides access to toolbox toolsets."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'toolset_name', 'credentials', 'bound_params', 'additional_headers', 'server_url', 'tool_names', 'auth_token_getters'}


    def __init__(self, server_url: str, kwargs: str) -> None:
        self._config: dict[str, Any] = {"server_url": server_url, "kwargs": kwargs}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def toolset_name(self, value: Optional[str]) -> Self:
        """Set the ``toolset_name`` field."""
        self._config["toolset_name"] = value
        return self


    def tool_names(self, value: Optional[List[str]]) -> Self:
        """Set the ``tool_names`` field."""
        self._config["tool_names"] = value
        return self


    def auth_token_getters(self, value: Optional[Mapping[str, Callable[[], str]]]) -> Self:
        """Set the ``auth_token_getters`` field."""
        self._config["auth_token_getters"] = value
        return self


    def bound_params(self, value: Optional[Mapping[str, Union[Callable[[], Any], Any]]]) -> Self:
        """Set the ``bound_params`` field."""
        self._config["bound_params"] = value
        return self


    def credentials(self, value: Optional[CredentialConfig]) -> Self:
        """Set the ``credentials`` field."""
        self._config["credentials"] = value
        return self


    def additional_headers(self, value: Optional[Mapping[str, str]]) -> Self:
        """Set the ``additional_headers`` field."""
        self._config["additional_headers"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_ToolboxToolset init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_ToolboxToolset. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_ToolboxToolset:
        """A class that provides access to toolbox toolsets. Resolve into a native ADK _ADK_ToolboxToolset."""
        config = self._prepare_build_config()
        return _ADK_ToolboxToolset(**config)


# ======================================================================
# Builder: TransferToAgentTool
# ======================================================================

class TransferToAgentTool(BuilderBase):
    """A specialized FunctionTool for agent transfer with enum constraints."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'agent_names'}


    def __init__(self, agent_names: str) -> None:
        self._config: dict[str, Any] = {"agent_names": agent_names}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_TransferToAgentTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_TransferToAgentTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_TransferToAgentTool:
        """A specialized FunctionTool for agent transfer with enum constraints. Resolve into a native ADK _ADK_TransferToAgentTool."""
        config = self._prepare_build_config()
        return _ADK_TransferToAgentTool(**config)


# ======================================================================
# Builder: UrlContextTool
# ======================================================================

class UrlContextTool(BuilderBase):
    """A built-in tool that is automatically invoked by Gemini 2 models to retrieve content from the URLs and use that content to inform and shape its response."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = set()


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_UrlContextTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_UrlContextTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_UrlContextTool:
        """A built-in tool that is automatically invoked by Gemini 2 models to retrieve content from the URLs and use that content to inform and shape its response. Resolve into a native ADK _ADK_UrlContextTool."""
        config = self._prepare_build_config()
        return _ADK_UrlContextTool(**config)


# ======================================================================
# Builder: VertexAiSearchTool
# ======================================================================

class VertexAiSearchTool(BuilderBase):
    """A built-in tool using Vertex AI Search."""

    # --- Class-level alias / field maps ---
    _ALIASES: dict[str, str] = {}
    _CALLBACK_ALIASES: dict[str, str] = {}
    _ADDITIVE_FIELDS: set[str] = set()
    _KNOWN_PARAMS: set[str] = {'max_results', 'bypass_multi_tools_limit', 'data_store_id', 'data_store_specs', 'filter', 'search_engine_id'}


    def __init__(self, ) -> None:
        self._config: dict[str, Any] = {}
        self._callbacks: dict[str, list[Callable]] = defaultdict(list)
        self._lists: dict[str, list] = defaultdict(list)

    # --- Ergonomic aliases ---

    # --- Additive callback methods ---

    # --- Explicit field methods ---

    def data_store_id(self, value: Optional[str]) -> Self:
        """Set the ``data_store_id`` field."""
        self._config["data_store_id"] = value
        return self


    def data_store_specs(self, value: Optional[list[types.VertexAISearchDataStoreSpec]]) -> Self:
        """Set the ``data_store_specs`` field."""
        self._config["data_store_specs"] = value
        return self


    def search_engine_id(self, value: Optional[str]) -> Self:
        """Set the ``search_engine_id`` field."""
        self._config["search_engine_id"] = value
        return self


    def filter(self, value: Optional[str]) -> Self:
        """Set the ``filter`` field."""
        self._config["filter"] = value
        return self


    def max_results(self, value: Optional[int]) -> Self:
        """Set the ``max_results`` field."""
        self._config["max_results"] = value
        return self


    def bypass_multi_tools_limit(self, value: bool) -> Self:
        """Set the ``bypass_multi_tools_limit`` field."""
        self._config["bypass_multi_tools_limit"] = value
        return self

    # --- Extra methods ---

    # --- Dynamic field forwarding (safety net) ---

    def __getattr__(self, name: str):
        """Forward unknown methods to _ADK_VertexAiSearchTool init params for zero-maintenance compatibility."""
        if name.startswith("_"):
            raise AttributeError(name)

        # Resolve through alias map (class-level constants)
        _ALIASES = self.__class__._ALIASES
        _CALLBACK_ALIASES = self.__class__._CALLBACK_ALIASES
        _ADDITIVE_FIELDS = self.__class__._ADDITIVE_FIELDS
        _KNOWN_PARAMS = self.__class__._KNOWN_PARAMS

        field_name = _ALIASES.get(name, name)

        # Check if it's a callback alias
        if name in _CALLBACK_ALIASES:
            cb_field = _CALLBACK_ALIASES[name]
            def _cb_setter(fn: Callable) -> Self:
                self._callbacks[cb_field].append(fn)
                return self
            return _cb_setter

        # Validate against static _KNOWN_PARAMS set (non-Pydantic class)
        if field_name not in _KNOWN_PARAMS:
            available = sorted(
                _KNOWN_PARAMS
                | set(_ALIASES.keys())
                | set(_CALLBACK_ALIASES.keys())
            )
            raise AttributeError(
                f"'{name}' is not a recognized parameter on _ADK_VertexAiSearchTool. "
                f"Available: {', '.join(available)}"
            )

        # Return a setter that stores value and returns self for chaining
        def _setter(value: Any) -> Self:
            if field_name in _ADDITIVE_FIELDS:
                self._callbacks[field_name].append(value)
            else:
                self._config[field_name] = value
            return self

        return _setter

    # --- Terminal methods ---

    def build(self) -> _ADK_VertexAiSearchTool:
        """A built-in tool using Vertex AI Search. Resolve into a native ADK _ADK_VertexAiSearchTool."""
        config = self._prepare_build_config()
        return _ADK_VertexAiSearchTool(**config)
