Class ConnectionsClient
java.lang.Object
com.google.adk.tools.applicationintegrationtoolset.ConnectionsClient
Utility class for interacting with the Google Cloud Connectors API.
This class provides methods to fetch connection details, schemas for entities and actions, and to generate OpenAPI specifications for creating tools based on these connections.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents the schema for an action.static class
Represents details of a connection.static class
Represents the schema and available operations for an entity. -
Constructor Summary
ConstructorsConstructorDescriptionConnectionsClient
(String project, String location, String connection, com.google.adk.tools.applicationintegrationtoolset.IntegrationConnectorTool.HttpExecutor httpExecutor, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Initializes the ConnectionsClient. -
Method Summary
Modifier and TypeMethodDescriptionactionRequest
(String action) actionResponse
(String action) connectorPayload
(Map<String, Object> jsonSchema) convertJsonSchemaToOpenApiSchema
(Map<String, Object> jsonSchema) Converts a JSON Schema dictionary to an OpenAPI schema dictionary.createOperation
(String entity, String toolName, String toolInstructions) createOperationRequest
(String entity) deleteOperation
(String entity, String toolName, String toolInstructions) getActionOperation
(String action, String operation, String actionDisplayName, String toolName, String toolInstructions) getActionSchema
(String action) Retrieves the input and output JSON schema for a given action.Retrieves service details for a given connection.getEntitySchemaAndOperations
(String entity) Retrieves the JSON schema and available operations for a given entity.getOperation
(String entity, String schemaAsString, String toolName, String toolInstructions) listOperation
(String entity, String schemaAsString, String toolName, String toolInstructions) updateOperation
(String entity, String toolName, String toolInstructions) updateOperationRequest
(String entity)
-
Constructor Details
-
ConnectionsClient
public ConnectionsClient(String project, String location, String connection, com.google.adk.tools.applicationintegrationtoolset.IntegrationConnectorTool.HttpExecutor httpExecutor, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Initializes the ConnectionsClient.- Parameters:
project
- The Google Cloud project ID.location
- The Google Cloud location (e.g., us-central1).connection
- The connection name.
-
-
Method Details
-
getConnectionDetails
public ConnectionsClient.ConnectionDetails getConnectionDetails() throws IOException, InterruptedExceptionRetrieves service details for a given connection.- Returns:
- A
ConnectionsClient.ConnectionDetails
object with the connection's info. - Throws:
IOException
- If there is an issue with network communication or credentials.InterruptedException
- If the thread is interrupted during the API call.
-
getEntitySchemaAndOperations
public ConnectionsClient.EntitySchemaAndOperations getEntitySchemaAndOperations(String entity) throws IOException, InterruptedException Retrieves the JSON schema and available operations for a given entity.- Parameters:
entity
- The entity name.- Returns:
- A
ConnectionsClient.EntitySchemaAndOperations
object. - Throws:
IOException
- If there is an issue with network communication or credentials.InterruptedException
- If the thread is interrupted during polling.
-
getActionSchema
public ConnectionsClient.ActionSchema getActionSchema(String action) throws IOException, InterruptedException Retrieves the input and output JSON schema for a given action.- Parameters:
action
- The action name.- Returns:
- An
ConnectionsClient.ActionSchema
object. - Throws:
IOException
- If there is an issue with network communication or credentials.InterruptedException
- If the thread is interrupted during polling.
-
convertJsonSchemaToOpenApiSchema
-
connectorPayload
-
getConnectorBaseSpec
-
getActionOperation
-
listOperation
-
getOperation
-
createOperation
-
updateOperation
-
deleteOperation
-
createOperationRequest
-
updateOperationRequest
-
getOperationRequest
-
deleteOperationRequest
-
listOperationRequest
-
actionRequest
-
actionResponse
-
executeCustomQueryRequest
-