# Class ApplicationIntegrationToolset

java.lang.Object
com.google.adk.tools.applicationintegrationtoolset.ApplicationIntegrationToolset

All Implemented Interfaces:
  `BaseToolset, AutoCloseable`

public class ApplicationIntegrationToolset extends Object implements BaseToolset
Application Integration Toolset

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final com.fasterxml.jackson.databind.ObjectMapper`
  `objectMapper`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ApplicationIntegrationToolset(String project, String location, String integration, List<String> triggers, String connection, Map<String, List<String>> entityOperations, List<String> actions, String serviceAccountJson, String toolNamePrefix, String toolInstructions)`
  ApplicationIntegrationToolset generates tools from a given Application Integration resource.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Performs cleanup and releases resources held by the toolset.
  `io.reactivex.rxjava3.core.Flowable<BaseTool>`
  `getTools(@Nullable ReadonlyContext readonlyContext)`
  Return all tools in the toolset based on the provided context.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface BaseToolset

  `isToolSelected`
  Modifier and Type
  Method
  Description
  `default boolean`
  `isToolSelected(BaseTool tool, @Nullable Object toolFilter, @Nullable ReadonlyContext readonlyContext)`
  Checks if a tool should be selected based on a filter.

- ## Field Details

  - ### objectMapper

    public static final com.fasterxml.jackson.databind.ObjectMapper objectMapper

- ## Constructor Details

  - ### ApplicationIntegrationToolset

    public ApplicationIntegrationToolset(String project, String location, String integration, List<String> triggers, String connection, Map<String, List<String>> entityOperations, List<String> actions, String serviceAccountJson, String toolNamePrefix, String toolInstructions)
    ApplicationIntegrationToolset generates tools from a given Application Integration resource.

    Example Usage:

    integrationTool = new ApplicationIntegrationToolset( project="test-project", location="us-central1", integration="test-integration", triggers=ImmutableList.of("api_trigger/test_trigger", "api_trigger/test_trigger_2", serviceAccountJson="{....}"),connection=null,enitityOperations=null,actions=null,toolNamePrefix="test-integration-tool",toolInstructions="This tool is used to get response from test-integration.");

    connectionTool = new ApplicationIntegrationToolset( project="test-project", location="us-central1", integration=null, triggers=null, connection="test-connection", entityOperations=ImmutableMap.of("Entity1", ImmutableList.of("LIST", "GET", "UPDATE")), "Entity2", ImmutableList.of()), actions=ImmutableList.of("ExecuteCustomQuery"), serviceAccountJson="{....}", toolNamePrefix="test-tool", toolInstructions="This tool is used to list, get and update issues in Jira.");

    Parameters:
      `project` - The GCP project ID.
      `location` - The GCP location of integration.
      `integration` - The integration name.
      `triggers` - (Optional) The list of trigger ids in the integration.
      `connection` - (Optional) The connection name.
      `entityOperations` - (Optional) The entity operations.
      `actions` - (Optional) The actions.
      `serviceAccountJson` - (Optional) The service account configuration as a dictionary. Required if not using default service credential. Used for fetching the Application Integration or Integration Connector resource.
      `toolNamePrefix` - (Optional) The tool name prefix.
      `toolInstructions` - (Optional) The tool instructions.

- ## Method Details

  - ### getTools

    public io.reactivex.rxjava3.core.Flowable<BaseTool> getTools(@Nullable ReadonlyContext readonlyContext)
    Description copied from interface: `BaseToolset`
    Return all tools in the toolset based on the provided context.
    Specified by:
      `getTools` in interface `BaseToolset`
    Parameters:
      `readonlyContext` - Context used to filter tools available to the agent.
    Returns:
      A Single emitting a list of tools available under the specified context.

  - ### close

    public void close() throws Exception
    Description copied from interface: `BaseToolset`
    Performs cleanup and releases resources held by the toolset.

    NOTE: This method is invoked, for example, at the end of an agent server's lifecycle or when the toolset is no longer needed. Implementations should ensure that any open connections, files, or other managed resources are properly released to prevent leaks.

    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `BaseToolset`
    Throws:
      `Exception`