| GitHub Repository | Product Reference | RPC Documentation |
Service Description: The service that manages agent-related resources in Gemini Enterprise for Customer Engagement (CES).
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName name = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
App response = agentServiceClient.getApp(name);
}
Note: close() needs to be called on the AgentServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
ListApps |
Lists apps in the given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetApp |
Gets details of the specified app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateApp |
Creates a new app in the given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateApp |
Updates the specified app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteApp |
Deletes the specified app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ExportApp |
Exports the specified app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ImportApp |
Imports the specified app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListAgents |
Lists agents in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetAgent |
Gets details of the specified agent. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateAgent |
Creates a new agent in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateAgent |
Updates the specified agent. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteAgent |
Deletes the specified agent. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListExamples |
Lists examples in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetExample |
Gets details of the specified example. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateExample |
Creates a new example in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateExample |
Updates the specified example. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteExample |
Deletes the specified example. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTools |
Lists tools in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetTool |
Gets details of the specified tool. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListConversations |
Lists conversations in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetConversation |
Gets details of the specified conversation. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteConversation |
Deletes the specified conversation. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
BatchDeleteConversations |
Batch deletes the specified conversations. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateTool |
Creates a new tool in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTool |
Updates the specified tool. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTool |
Deletes the specified tool. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListGuardrails |
Lists guardrails in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetGuardrail |
Gets details of the specified guardrail. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateGuardrail |
Creates a new guardrail in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateGuardrail |
Updates the specified guardrail. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteGuardrail |
Deletes the specified guardrail. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDeployments |
Lists deployments in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDeployment |
Gets details of the specified deployment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDeployment |
Creates a new deployment in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDeployment |
Updates the specified deployment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDeployment |
Deletes the specified deployment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListToolsets |
Lists toolsets in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetToolset |
Gets details of the specified toolset. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateToolset |
Creates a new toolset in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateToolset |
Updates the specified toolset. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteToolset |
Deletes the specified toolset. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListAppVersions |
Lists all app versions in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetAppVersion |
Gets details of the specified app version. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateAppVersion |
Creates a new app version in the given app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteAppVersion |
Deletes the specified app version. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RestoreAppVersion |
Restores the specified app version. This will create a new app version from the current draft app and overwrite the current draft with the specified app version. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListChangelogs |
Lists the changelogs of the specified app. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetChangelog |
Gets the specified changelog. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service.This method can be called in two ways: * **List all public locations:** Use the path |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of AgentServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
AgentServiceSettings agentServiceSettings =
AgentServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
AgentServiceClient agentServiceClient = AgentServiceClient.create(agentServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
AgentServiceSettings agentServiceSettings =
AgentServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
AgentServiceClient agentServiceClient = AgentServiceClient.create(agentServiceSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
AgentServiceSettings agentServiceSettings = AgentServiceSettings.newHttpJsonBuilder().build();
AgentServiceClient agentServiceClient = AgentServiceClient.create(agentServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final AgentServiceClient create()Constructs an instance of AgentServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(AgentServiceSettings settings)
public static final AgentServiceClient create(AgentServiceSettings settings)Constructs an instance of AgentServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Parameter | |
|---|---|
| Name | Description |
settings |
AgentServiceSettings |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(AgentServiceStub stub)
public static final AgentServiceClient create(AgentServiceStub stub)Constructs an instance of AgentServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(AgentServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
AgentServiceStub |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient |
|
Constructors
AgentServiceClient(AgentServiceSettings settings)
protected AgentServiceClient(AgentServiceSettings settings)Constructs an instance of AgentServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
| Parameter | |
|---|---|
| Name | Description |
settings |
AgentServiceSettings |
AgentServiceClient(AgentServiceStub stub)
protected AgentServiceClient(AgentServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
AgentServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
batchDeleteConversationsAsync(AppName parent)
public final OperationFuture<BatchDeleteConversationsResponse,OperationMetadata> batchDeleteConversationsAsync(AppName parent)Batch deletes the specified conversations.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
BatchDeleteConversationsResponse response =
agentServiceClient.batchDeleteConversationsAsync(parent).get();
}
| Parameter | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to delete conversations from. Format:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BatchDeleteConversationsResponse,OperationMetadata> |
|
batchDeleteConversationsAsync(BatchDeleteConversationsRequest request)
public final OperationFuture<BatchDeleteConversationsResponse,OperationMetadata> batchDeleteConversationsAsync(BatchDeleteConversationsRequest request)Batch deletes the specified conversations.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
BatchDeleteConversationsRequest request =
BatchDeleteConversationsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.addAllConversations(new ArrayList<String>())
.build();
BatchDeleteConversationsResponse response =
agentServiceClient.batchDeleteConversationsAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
BatchDeleteConversationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BatchDeleteConversationsResponse,OperationMetadata> |
|
batchDeleteConversationsAsync(String parent)
public final OperationFuture<BatchDeleteConversationsResponse,OperationMetadata> batchDeleteConversationsAsync(String parent)Batch deletes the specified conversations.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
BatchDeleteConversationsResponse response =
agentServiceClient.batchDeleteConversationsAsync(parent).get();
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to delete conversations from. Format:
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<BatchDeleteConversationsResponse,OperationMetadata> |
|
batchDeleteConversationsCallable()
public final UnaryCallable<BatchDeleteConversationsRequest,Operation> batchDeleteConversationsCallable()Batch deletes the specified conversations.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
BatchDeleteConversationsRequest request =
BatchDeleteConversationsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.addAllConversations(new ArrayList<String>())
.build();
ApiFuture<Operation> future =
agentServiceClient.batchDeleteConversationsCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<BatchDeleteConversationsRequest,Operation> |
|
batchDeleteConversationsOperationCallable()
public final OperationCallable<BatchDeleteConversationsRequest,BatchDeleteConversationsResponse,OperationMetadata> batchDeleteConversationsOperationCallable()Batch deletes the specified conversations.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
BatchDeleteConversationsRequest request =
BatchDeleteConversationsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.addAllConversations(new ArrayList<String>())
.build();
OperationFuture<BatchDeleteConversationsResponse, OperationMetadata> future =
agentServiceClient.batchDeleteConversationsOperationCallable().futureCall(request);
// Do something.
BatchDeleteConversationsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<BatchDeleteConversationsRequest,BatchDeleteConversationsResponse,OperationMetadata> |
|
close()
public final void close()createAgent(AppName parent, Agent agent)
public final Agent createAgent(AppName parent, Agent agent)Creates a new agent in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
Agent agent = Agent.newBuilder().build();
Agent response = agentServiceClient.createAgent(parent, agent);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to create an agent in. |
agent |
AgentRequired. The agent to create. |
| Returns | |
|---|---|
| Type | Description |
Agent |
|
createAgent(AppName parent, Agent agent, String agentId)
public final Agent createAgent(AppName parent, Agent agent, String agentId)Creates a new agent in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
Agent agent = Agent.newBuilder().build();
String agentId = "agentId-1060987136";
Agent response = agentServiceClient.createAgent(parent, agent, agentId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to create an agent in. |
agent |
AgentRequired. The agent to create. |
agentId |
StringOptional. The ID to use for the agent, which will become the final component of the agent's resource name. If not provided, a unique ID will be automatically assigned for the agent. |
| Returns | |
|---|---|
| Type | Description |
Agent |
|
createAgent(CreateAgentRequest request)
public final Agent createAgent(CreateAgentRequest request)Creates a new agent in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateAgentRequest request =
CreateAgentRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setAgentId("agentId-1060987136")
.setAgent(Agent.newBuilder().build())
.build();
Agent response = agentServiceClient.createAgent(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateAgentRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Agent |
|
createAgent(String parent, Agent agent)
public final Agent createAgent(String parent, Agent agent)Creates a new agent in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
Agent agent = Agent.newBuilder().build();
Agent response = agentServiceClient.createAgent(parent, agent);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to create an agent in. |
agent |
AgentRequired. The agent to create. |
| Returns | |
|---|---|
| Type | Description |
Agent |
|
createAgent(String parent, Agent agent, String agentId)
public final Agent createAgent(String parent, Agent agent, String agentId)Creates a new agent in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
Agent agent = Agent.newBuilder().build();
String agentId = "agentId-1060987136";
Agent response = agentServiceClient.createAgent(parent, agent, agentId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to create an agent in. |
agent |
AgentRequired. The agent to create. |
agentId |
StringOptional. The ID to use for the agent, which will become the final component of the agent's resource name. If not provided, a unique ID will be automatically assigned for the agent. |
| Returns | |
|---|---|
| Type | Description |
Agent |
|
createAgentCallable()
public final UnaryCallable<CreateAgentRequest,Agent> createAgentCallable()Creates a new agent in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateAgentRequest request =
CreateAgentRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setAgentId("agentId-1060987136")
.setAgent(Agent.newBuilder().build())
.build();
ApiFuture<Agent> future = agentServiceClient.createAgentCallable().futureCall(request);
// Do something.
Agent response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateAgentRequest,Agent> |
|
createAppAsync(CreateAppRequest request)
public final OperationFuture<App,OperationMetadata> createAppAsync(CreateAppRequest request)Creates a new app in the given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateAppRequest request =
CreateAppRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAppId("appId93028124")
.setApp(App.newBuilder().build())
.build();
App response = agentServiceClient.createAppAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateAppRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<App,OperationMetadata> |
|
createAppAsync(LocationName parent, App app)
public final OperationFuture<App,OperationMetadata> createAppAsync(LocationName parent, App app)Creates a new app in the given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
App app = App.newBuilder().build();
App response = agentServiceClient.createAppAsync(parent, app).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The resource name of the location to create an app in. |
app |
AppRequired. The app to create. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<App,OperationMetadata> |
|
createAppAsync(LocationName parent, App app, String appId)
public final OperationFuture<App,OperationMetadata> createAppAsync(LocationName parent, App app, String appId)Creates a new app in the given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
App app = App.newBuilder().build();
String appId = "appId93028124";
App response = agentServiceClient.createAppAsync(parent, app, appId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The resource name of the location to create an app in. |
app |
AppRequired. The app to create. |
appId |
StringOptional. The ID to use for the app, which will become the final component of the app's resource name. If not provided, a unique ID will be automatically assigned for the app. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<App,OperationMetadata> |
|
createAppAsync(String parent, App app)
public final OperationFuture<App,OperationMetadata> createAppAsync(String parent, App app)Creates a new app in the given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
App app = App.newBuilder().build();
App response = agentServiceClient.createAppAsync(parent, app).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the location to create an app in. |
app |
AppRequired. The app to create. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<App,OperationMetadata> |
|
createAppAsync(String parent, App app, String appId)
public final OperationFuture<App,OperationMetadata> createAppAsync(String parent, App app, String appId)Creates a new app in the given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
App app = App.newBuilder().build();
String appId = "appId93028124";
App response = agentServiceClient.createAppAsync(parent, app, appId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the location to create an app in. |
app |
AppRequired. The app to create. |
appId |
StringOptional. The ID to use for the app, which will become the final component of the app's resource name. If not provided, a unique ID will be automatically assigned for the app. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<App,OperationMetadata> |
|
createAppCallable()
public final UnaryCallable<CreateAppRequest,Operation> createAppCallable()Creates a new app in the given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateAppRequest request =
CreateAppRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAppId("appId93028124")
.setApp(App.newBuilder().build())
.build();
ApiFuture<Operation> future = agentServiceClient.createAppCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateAppRequest,Operation> |
|
createAppOperationCallable()
public final OperationCallable<CreateAppRequest,App,OperationMetadata> createAppOperationCallable()Creates a new app in the given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateAppRequest request =
CreateAppRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAppId("appId93028124")
.setApp(App.newBuilder().build())
.build();
OperationFuture<App, OperationMetadata> future =
agentServiceClient.createAppOperationCallable().futureCall(request);
// Do something.
App response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateAppRequest,App,OperationMetadata> |
|
createAppVersion(AppName parent, AppVersion appVersion)
public final AppVersion createAppVersion(AppName parent, AppVersion appVersion)Creates a new app version in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
AppVersion appVersion = AppVersion.newBuilder().build();
AppVersion response = agentServiceClient.createAppVersion(parent, appVersion);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to create an app version in. |
appVersion |
AppVersionRequired. The app version to create. |
| Returns | |
|---|---|
| Type | Description |
AppVersion |
|
createAppVersion(AppName parent, AppVersion appVersion, String appVersionId)
public final AppVersion createAppVersion(AppName parent, AppVersion appVersion, String appVersionId)Creates a new app version in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
AppVersion appVersion = AppVersion.newBuilder().build();
String appVersionId = "appVersionId303221490";
AppVersion response = agentServiceClient.createAppVersion(parent, appVersion, appVersionId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to create an app version in. |
appVersion |
AppVersionRequired. The app version to create. |
appVersionId |
StringOptional. The ID to use for the app version, which will become the final component of the app version's resource name. If not provided, a unique ID will be automatically assigned for the app version. |
| Returns | |
|---|---|
| Type | Description |
AppVersion |
|
createAppVersion(CreateAppVersionRequest request)
public final AppVersion createAppVersion(CreateAppVersionRequest request)Creates a new app version in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateAppVersionRequest request =
CreateAppVersionRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setAppVersionId("appVersionId303221490")
.setAppVersion(AppVersion.newBuilder().build())
.build();
AppVersion response = agentServiceClient.createAppVersion(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateAppVersionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AppVersion |
|
createAppVersion(String parent, AppVersion appVersion)
public final AppVersion createAppVersion(String parent, AppVersion appVersion)Creates a new app version in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
AppVersion appVersion = AppVersion.newBuilder().build();
AppVersion response = agentServiceClient.createAppVersion(parent, appVersion);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to create an app version in. |
appVersion |
AppVersionRequired. The app version to create. |
| Returns | |
|---|---|
| Type | Description |
AppVersion |
|
createAppVersion(String parent, AppVersion appVersion, String appVersionId)
public final AppVersion createAppVersion(String parent, AppVersion appVersion, String appVersionId)Creates a new app version in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
AppVersion appVersion = AppVersion.newBuilder().build();
String appVersionId = "appVersionId303221490";
AppVersion response = agentServiceClient.createAppVersion(parent, appVersion, appVersionId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to create an app version in. |
appVersion |
AppVersionRequired. The app version to create. |
appVersionId |
StringOptional. The ID to use for the app version, which will become the final component of the app version's resource name. If not provided, a unique ID will be automatically assigned for the app version. |
| Returns | |
|---|---|
| Type | Description |
AppVersion |
|
createAppVersionCallable()
public final UnaryCallable<CreateAppVersionRequest,AppVersion> createAppVersionCallable()Creates a new app version in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateAppVersionRequest request =
CreateAppVersionRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setAppVersionId("appVersionId303221490")
.setAppVersion(AppVersion.newBuilder().build())
.build();
ApiFuture<AppVersion> future =
agentServiceClient.createAppVersionCallable().futureCall(request);
// Do something.
AppVersion response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateAppVersionRequest,AppVersion> |
|
createDeployment(AppName parent, Deployment deployment)
public final Deployment createDeployment(AppName parent, Deployment deployment)Creates a new deployment in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
Deployment deployment = Deployment.newBuilder().build();
Deployment response = agentServiceClient.createDeployment(parent, deployment);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The parent app. Format:
|
deployment |
DeploymentRequired. The deployment to create. |
| Returns | |
|---|---|
| Type | Description |
Deployment |
|
createDeployment(AppName parent, Deployment deployment, String deploymentId)
public final Deployment createDeployment(AppName parent, Deployment deployment, String deploymentId)Creates a new deployment in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
Deployment deployment = Deployment.newBuilder().build();
String deploymentId = "deploymentId-136894784";
Deployment response = agentServiceClient.createDeployment(parent, deployment, deploymentId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The parent app. Format:
|
deployment |
DeploymentRequired. The deployment to create. |
deploymentId |
StringOptional. The ID to use for the deployment, which will become the final component of the deployment's resource name. If not provided, a unique ID will be automatically assigned for the deployment. |
| Returns | |
|---|---|
| Type | Description |
Deployment |
|
createDeployment(CreateDeploymentRequest request)
public final Deployment createDeployment(CreateDeploymentRequest request)Creates a new deployment in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateDeploymentRequest request =
CreateDeploymentRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setDeploymentId("deploymentId-136894784")
.setDeployment(Deployment.newBuilder().build())
.build();
Deployment response = agentServiceClient.createDeployment(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateDeploymentRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Deployment |
|
createDeployment(String parent, Deployment deployment)
public final Deployment createDeployment(String parent, Deployment deployment)Creates a new deployment in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
Deployment deployment = Deployment.newBuilder().build();
Deployment response = agentServiceClient.createDeployment(parent, deployment);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent app. Format:
|
deployment |
DeploymentRequired. The deployment to create. |
| Returns | |
|---|---|
| Type | Description |
Deployment |
|
createDeployment(String parent, Deployment deployment, String deploymentId)
public final Deployment createDeployment(String parent, Deployment deployment, String deploymentId)Creates a new deployment in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
Deployment deployment = Deployment.newBuilder().build();
String deploymentId = "deploymentId-136894784";
Deployment response = agentServiceClient.createDeployment(parent, deployment, deploymentId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent app. Format:
|
deployment |
DeploymentRequired. The deployment to create. |
deploymentId |
StringOptional. The ID to use for the deployment, which will become the final component of the deployment's resource name. If not provided, a unique ID will be automatically assigned for the deployment. |
| Returns | |
|---|---|
| Type | Description |
Deployment |
|
createDeploymentCallable()
public final UnaryCallable<CreateDeploymentRequest,Deployment> createDeploymentCallable()Creates a new deployment in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateDeploymentRequest request =
CreateDeploymentRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setDeploymentId("deploymentId-136894784")
.setDeployment(Deployment.newBuilder().build())
.build();
ApiFuture<Deployment> future =
agentServiceClient.createDeploymentCallable().futureCall(request);
// Do something.
Deployment response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateDeploymentRequest,Deployment> |
|
createExample(AppName parent, Example example)
public final Example createExample(AppName parent, Example example)Creates a new example in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
Example example = Example.newBuilder().build();
Example response = agentServiceClient.createExample(parent, example);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to create an example in. |
example |
ExampleRequired. The example to create. |
| Returns | |
|---|---|
| Type | Description |
Example |
|
createExample(AppName parent, Example example, String exampleId)
public final Example createExample(AppName parent, Example example, String exampleId)Creates a new example in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
Example example = Example.newBuilder().build();
String exampleId = "exampleId-64591835";
Example response = agentServiceClient.createExample(parent, example, exampleId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to create an example in. |
example |
ExampleRequired. The example to create. |
exampleId |
StringOptional. The ID to use for the example, which will become the final component of the example's resource name. If not provided, a unique ID will be automatically assigned for the example. |
| Returns | |
|---|---|
| Type | Description |
Example |
|
createExample(CreateExampleRequest request)
public final Example createExample(CreateExampleRequest request)Creates a new example in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateExampleRequest request =
CreateExampleRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setExampleId("exampleId-64591835")
.setExample(Example.newBuilder().build())
.build();
Example response = agentServiceClient.createExample(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateExampleRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Example |
|
createExample(String parent, Example example)
public final Example createExample(String parent, Example example)Creates a new example in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
Example example = Example.newBuilder().build();
Example response = agentServiceClient.createExample(parent, example);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to create an example in. |
example |
ExampleRequired. The example to create. |
| Returns | |
|---|---|
| Type | Description |
Example |
|
createExample(String parent, Example example, String exampleId)
public final Example createExample(String parent, Example example, String exampleId)Creates a new example in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
Example example = Example.newBuilder().build();
String exampleId = "exampleId-64591835";
Example response = agentServiceClient.createExample(parent, example, exampleId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to create an example in. |
example |
ExampleRequired. The example to create. |
exampleId |
StringOptional. The ID to use for the example, which will become the final component of the example's resource name. If not provided, a unique ID will be automatically assigned for the example. |
| Returns | |
|---|---|
| Type | Description |
Example |
|
createExampleCallable()
public final UnaryCallable<CreateExampleRequest,Example> createExampleCallable()Creates a new example in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateExampleRequest request =
CreateExampleRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setExampleId("exampleId-64591835")
.setExample(Example.newBuilder().build())
.build();
ApiFuture<Example> future = agentServiceClient.createExampleCallable().futureCall(request);
// Do something.
Example response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateExampleRequest,Example> |
|
createGuardrail(AppName parent, Guardrail guardrail)
public final Guardrail createGuardrail(AppName parent, Guardrail guardrail)Creates a new guardrail in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
Guardrail guardrail = Guardrail.newBuilder().build();
Guardrail response = agentServiceClient.createGuardrail(parent, guardrail);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to create a guardrail in. |
guardrail |
GuardrailRequired. The guardrail to create. |
| Returns | |
|---|---|
| Type | Description |
Guardrail |
|
createGuardrail(AppName parent, Guardrail guardrail, String guardrailId)
public final Guardrail createGuardrail(AppName parent, Guardrail guardrail, String guardrailId)Creates a new guardrail in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
Guardrail guardrail = Guardrail.newBuilder().build();
String guardrailId = "guardrailId1875412786";
Guardrail response = agentServiceClient.createGuardrail(parent, guardrail, guardrailId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to create a guardrail in. |
guardrail |
GuardrailRequired. The guardrail to create. |
guardrailId |
StringOptional. The ID to use for the guardrail, which will become the final component of the guardrail's resource name. If not provided, a unique ID will be automatically assigned for the guardrail. |
| Returns | |
|---|---|
| Type | Description |
Guardrail |
|
createGuardrail(CreateGuardrailRequest request)
public final Guardrail createGuardrail(CreateGuardrailRequest request)Creates a new guardrail in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateGuardrailRequest request =
CreateGuardrailRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setGuardrailId("guardrailId1875412786")
.setGuardrail(Guardrail.newBuilder().build())
.build();
Guardrail response = agentServiceClient.createGuardrail(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateGuardrailRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Guardrail |
|
createGuardrail(String parent, Guardrail guardrail)
public final Guardrail createGuardrail(String parent, Guardrail guardrail)Creates a new guardrail in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
Guardrail guardrail = Guardrail.newBuilder().build();
Guardrail response = agentServiceClient.createGuardrail(parent, guardrail);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to create a guardrail in. |
guardrail |
GuardrailRequired. The guardrail to create. |
| Returns | |
|---|---|
| Type | Description |
Guardrail |
|
createGuardrail(String parent, Guardrail guardrail, String guardrailId)
public final Guardrail createGuardrail(String parent, Guardrail guardrail, String guardrailId)Creates a new guardrail in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
Guardrail guardrail = Guardrail.newBuilder().build();
String guardrailId = "guardrailId1875412786";
Guardrail response = agentServiceClient.createGuardrail(parent, guardrail, guardrailId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to create a guardrail in. |
guardrail |
GuardrailRequired. The guardrail to create. |
guardrailId |
StringOptional. The ID to use for the guardrail, which will become the final component of the guardrail's resource name. If not provided, a unique ID will be automatically assigned for the guardrail. |
| Returns | |
|---|---|
| Type | Description |
Guardrail |
|
createGuardrailCallable()
public final UnaryCallable<CreateGuardrailRequest,Guardrail> createGuardrailCallable()Creates a new guardrail in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateGuardrailRequest request =
CreateGuardrailRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setGuardrailId("guardrailId1875412786")
.setGuardrail(Guardrail.newBuilder().build())
.build();
ApiFuture<Guardrail> future =
agentServiceClient.createGuardrailCallable().futureCall(request);
// Do something.
Guardrail response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateGuardrailRequest,Guardrail> |
|
createTool(AppName parent, Tool tool)
public final Tool createTool(AppName parent, Tool tool)Creates a new tool in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
Tool tool = Tool.newBuilder().build();
Tool response = agentServiceClient.createTool(parent, tool);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to create a tool in. |
tool |
ToolRequired. The tool to create. |
| Returns | |
|---|---|
| Type | Description |
Tool |
|
createTool(AppName parent, Tool tool, String toolId)
public final Tool createTool(AppName parent, Tool tool, String toolId)Creates a new tool in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
Tool tool = Tool.newBuilder().build();
String toolId = "toolId-868061997";
Tool response = agentServiceClient.createTool(parent, tool, toolId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to create a tool in. |
tool |
ToolRequired. The tool to create. |
toolId |
StringOptional. The ID to use for the tool, which will become the final component of the tool's resource name. If not provided, a unique ID will be automatically assigned for the tool. |
| Returns | |
|---|---|
| Type | Description |
Tool |
|
createTool(CreateToolRequest request)
public final Tool createTool(CreateToolRequest request)Creates a new tool in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateToolRequest request =
CreateToolRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setToolId("toolId-868061997")
.setTool(Tool.newBuilder().build())
.build();
Tool response = agentServiceClient.createTool(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateToolRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Tool |
|
createTool(String parent, Tool tool)
public final Tool createTool(String parent, Tool tool)Creates a new tool in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
Tool tool = Tool.newBuilder().build();
Tool response = agentServiceClient.createTool(parent, tool);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to create a tool in. |
tool |
ToolRequired. The tool to create. |
| Returns | |
|---|---|
| Type | Description |
Tool |
|
createTool(String parent, Tool tool, String toolId)
public final Tool createTool(String parent, Tool tool, String toolId)Creates a new tool in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
Tool tool = Tool.newBuilder().build();
String toolId = "toolId-868061997";
Tool response = agentServiceClient.createTool(parent, tool, toolId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to create a tool in. |
tool |
ToolRequired. The tool to create. |
toolId |
StringOptional. The ID to use for the tool, which will become the final component of the tool's resource name. If not provided, a unique ID will be automatically assigned for the tool. |
| Returns | |
|---|---|
| Type | Description |
Tool |
|
createToolCallable()
public final UnaryCallable<CreateToolRequest,Tool> createToolCallable()Creates a new tool in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateToolRequest request =
CreateToolRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setToolId("toolId-868061997")
.setTool(Tool.newBuilder().build())
.build();
ApiFuture<Tool> future = agentServiceClient.createToolCallable().futureCall(request);
// Do something.
Tool response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateToolRequest,Tool> |
|
createToolset(AppName parent, Toolset toolset)
public final Toolset createToolset(AppName parent, Toolset toolset)Creates a new toolset in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
Toolset toolset = Toolset.newBuilder().build();
Toolset response = agentServiceClient.createToolset(parent, toolset);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to create a toolset in. |
toolset |
ToolsetRequired. The toolset to create. |
| Returns | |
|---|---|
| Type | Description |
Toolset |
|
createToolset(AppName parent, Toolset toolset, String toolsetId)
public final Toolset createToolset(AppName parent, Toolset toolset, String toolsetId)Creates a new toolset in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
Toolset toolset = Toolset.newBuilder().build();
String toolsetId = "toolsetId-397931899";
Toolset response = agentServiceClient.createToolset(parent, toolset, toolsetId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to create a toolset in. |
toolset |
ToolsetRequired. The toolset to create. |
toolsetId |
StringOptional. The ID to use for the toolset, which will become the final component of the toolset's resource name. If not provided, a unique ID will be automatically assigned for the toolset. |
| Returns | |
|---|---|
| Type | Description |
Toolset |
|
createToolset(CreateToolsetRequest request)
public final Toolset createToolset(CreateToolsetRequest request)Creates a new toolset in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateToolsetRequest request =
CreateToolsetRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setToolsetId("toolsetId-397931899")
.setToolset(Toolset.newBuilder().build())
.build();
Toolset response = agentServiceClient.createToolset(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateToolsetRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Toolset |
|
createToolset(String parent, Toolset toolset)
public final Toolset createToolset(String parent, Toolset toolset)Creates a new toolset in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
Toolset toolset = Toolset.newBuilder().build();
Toolset response = agentServiceClient.createToolset(parent, toolset);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to create a toolset in. |
toolset |
ToolsetRequired. The toolset to create. |
| Returns | |
|---|---|
| Type | Description |
Toolset |
|
createToolset(String parent, Toolset toolset, String toolsetId)
public final Toolset createToolset(String parent, Toolset toolset, String toolsetId)Creates a new toolset in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
Toolset toolset = Toolset.newBuilder().build();
String toolsetId = "toolsetId-397931899";
Toolset response = agentServiceClient.createToolset(parent, toolset, toolsetId);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to create a toolset in. |
toolset |
ToolsetRequired. The toolset to create. |
toolsetId |
StringOptional. The ID to use for the toolset, which will become the final component of the toolset's resource name. If not provided, a unique ID will be automatically assigned for the toolset. |
| Returns | |
|---|---|
| Type | Description |
Toolset |
|
createToolsetCallable()
public final UnaryCallable<CreateToolsetRequest,Toolset> createToolsetCallable()Creates a new toolset in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
CreateToolsetRequest request =
CreateToolsetRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setToolsetId("toolsetId-397931899")
.setToolset(Toolset.newBuilder().build())
.build();
ApiFuture<Toolset> future = agentServiceClient.createToolsetCallable().futureCall(request);
// Do something.
Toolset response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateToolsetRequest,Toolset> |
|
deleteAgent(AgentName name)
public final void deleteAgent(AgentName name)Deletes the specified agent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[AGENT]");
agentServiceClient.deleteAgent(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
AgentNameRequired. The resource name of the agent to delete. |
deleteAgent(DeleteAgentRequest request)
public final void deleteAgent(DeleteAgentRequest request)Deletes the specified agent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteAgentRequest request =
DeleteAgentRequest.newBuilder()
.setName(AgentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[AGENT]").toString())
.setForce(true)
.setEtag("etag3123477")
.build();
agentServiceClient.deleteAgent(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteAgentRequestThe request object containing all of the parameters for the API call. |
deleteAgent(String name)
public final void deleteAgent(String name)Deletes the specified agent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = AgentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[AGENT]").toString();
agentServiceClient.deleteAgent(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the agent to delete. |
deleteAgentCallable()
public final UnaryCallable<DeleteAgentRequest,Empty> deleteAgentCallable()Deletes the specified agent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteAgentRequest request =
DeleteAgentRequest.newBuilder()
.setName(AgentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[AGENT]").toString())
.setForce(true)
.setEtag("etag3123477")
.build();
ApiFuture<Empty> future = agentServiceClient.deleteAgentCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteAgentRequest,Empty> |
|
deleteAppAsync(AppName name)
public final OperationFuture<Empty,OperationMetadata> deleteAppAsync(AppName name)Deletes the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName name = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
agentServiceClient.deleteAppAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
AppNameRequired. The resource name of the app to delete. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteAppAsync(DeleteAppRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteAppAsync(DeleteAppRequest request)Deletes the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteAppRequest request =
DeleteAppRequest.newBuilder()
.setName(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setEtag("etag3123477")
.build();
agentServiceClient.deleteAppAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteAppRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteAppAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteAppAsync(String name)Deletes the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
agentServiceClient.deleteAppAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the app to delete. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteAppCallable()
public final UnaryCallable<DeleteAppRequest,Operation> deleteAppCallable()Deletes the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteAppRequest request =
DeleteAppRequest.newBuilder()
.setName(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future = agentServiceClient.deleteAppCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteAppRequest,Operation> |
|
deleteAppOperationCallable()
public final OperationCallable<DeleteAppRequest,Empty,OperationMetadata> deleteAppOperationCallable()Deletes the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteAppRequest request =
DeleteAppRequest.newBuilder()
.setName(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
agentServiceClient.deleteAppOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteAppRequest,Empty,OperationMetadata> |
|
deleteAppVersion(AppVersionName name)
public final void deleteAppVersion(AppVersionName name)Deletes the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppVersionName name = AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]");
agentServiceClient.deleteAppVersion(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
AppVersionNameRequired. The resource name of the app version to delete. |
deleteAppVersion(DeleteAppVersionRequest request)
public final void deleteAppVersion(DeleteAppVersionRequest request)Deletes the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteAppVersionRequest request =
DeleteAppVersionRequest.newBuilder()
.setName(
AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]").toString())
.setEtag("etag3123477")
.build();
agentServiceClient.deleteAppVersion(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteAppVersionRequestThe request object containing all of the parameters for the API call. |
deleteAppVersion(String name)
public final void deleteAppVersion(String name)Deletes the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]").toString();
agentServiceClient.deleteAppVersion(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the app version to delete. |
deleteAppVersionCallable()
public final UnaryCallable<DeleteAppVersionRequest,Empty> deleteAppVersionCallable()Deletes the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteAppVersionRequest request =
DeleteAppVersionRequest.newBuilder()
.setName(
AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Empty> future = agentServiceClient.deleteAppVersionCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteAppVersionRequest,Empty> |
|
deleteConversation(ConversationName name)
public final void deleteConversation(ConversationName name)Deletes the specified conversation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ConversationName name =
ConversationName.of("[PROJECT]", "[LOCATION]", "[APP]", "[CONVERSATION]");
agentServiceClient.deleteConversation(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ConversationNameRequired. The resource name of the conversation to delete. |
deleteConversation(DeleteConversationRequest request)
public final void deleteConversation(DeleteConversationRequest request)Deletes the specified conversation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteConversationRequest request =
DeleteConversationRequest.newBuilder()
.setName(
ConversationName.of("[PROJECT]", "[LOCATION]", "[APP]", "[CONVERSATION]")
.toString())
.build();
agentServiceClient.deleteConversation(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteConversationRequestThe request object containing all of the parameters for the API call. |
deleteConversation(String name)
public final void deleteConversation(String name)Deletes the specified conversation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name =
ConversationName.of("[PROJECT]", "[LOCATION]", "[APP]", "[CONVERSATION]").toString();
agentServiceClient.deleteConversation(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the conversation to delete. |
deleteConversationCallable()
public final UnaryCallable<DeleteConversationRequest,Empty> deleteConversationCallable()Deletes the specified conversation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteConversationRequest request =
DeleteConversationRequest.newBuilder()
.setName(
ConversationName.of("[PROJECT]", "[LOCATION]", "[APP]", "[CONVERSATION]")
.toString())
.build();
ApiFuture<Empty> future = agentServiceClient.deleteConversationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteConversationRequest,Empty> |
|
deleteDeployment(DeleteDeploymentRequest request)
public final void deleteDeployment(DeleteDeploymentRequest request)Deletes the specified deployment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteDeploymentRequest request =
DeleteDeploymentRequest.newBuilder()
.setName(
DeploymentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[DEPLOYMENT]").toString())
.setEtag("etag3123477")
.build();
agentServiceClient.deleteDeployment(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteDeploymentRequestThe request object containing all of the parameters for the API call. |
deleteDeployment(DeploymentName name)
public final void deleteDeployment(DeploymentName name)Deletes the specified deployment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[DEPLOYMENT]");
agentServiceClient.deleteDeployment(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
DeploymentNameRequired. The name of the deployment to delete. Format:
|
deleteDeployment(String name)
public final void deleteDeployment(String name)Deletes the specified deployment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name =
DeploymentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[DEPLOYMENT]").toString();
agentServiceClient.deleteDeployment(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the deployment to delete. Format:
|
deleteDeploymentCallable()
public final UnaryCallable<DeleteDeploymentRequest,Empty> deleteDeploymentCallable()Deletes the specified deployment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteDeploymentRequest request =
DeleteDeploymentRequest.newBuilder()
.setName(
DeploymentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[DEPLOYMENT]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Empty> future = agentServiceClient.deleteDeploymentCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteDeploymentRequest,Empty> |
|
deleteExample(DeleteExampleRequest request)
public final void deleteExample(DeleteExampleRequest request)Deletes the specified example.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteExampleRequest request =
DeleteExampleRequest.newBuilder()
.setName(ExampleName.of("[PROJECT]", "[LOCATION]", "[APP]", "[EXAMPLE]").toString())
.setEtag("etag3123477")
.build();
agentServiceClient.deleteExample(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteExampleRequestThe request object containing all of the parameters for the API call. |
deleteExample(ExampleName name)
public final void deleteExample(ExampleName name)Deletes the specified example.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ExampleName name = ExampleName.of("[PROJECT]", "[LOCATION]", "[APP]", "[EXAMPLE]");
agentServiceClient.deleteExample(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ExampleNameRequired. The resource name of the example to delete. |
deleteExample(String name)
public final void deleteExample(String name)Deletes the specified example.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = ExampleName.of("[PROJECT]", "[LOCATION]", "[APP]", "[EXAMPLE]").toString();
agentServiceClient.deleteExample(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the example to delete. |
deleteExampleCallable()
public final UnaryCallable<DeleteExampleRequest,Empty> deleteExampleCallable()Deletes the specified example.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteExampleRequest request =
DeleteExampleRequest.newBuilder()
.setName(ExampleName.of("[PROJECT]", "[LOCATION]", "[APP]", "[EXAMPLE]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Empty> future = agentServiceClient.deleteExampleCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteExampleRequest,Empty> |
|
deleteGuardrail(DeleteGuardrailRequest request)
public final void deleteGuardrail(DeleteGuardrailRequest request)Deletes the specified guardrail.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteGuardrailRequest request =
DeleteGuardrailRequest.newBuilder()
.setName(
GuardrailName.of("[PROJECT]", "[LOCATION]", "[APP]", "[GUARDRAIL]").toString())
.setForce(true)
.setEtag("etag3123477")
.build();
agentServiceClient.deleteGuardrail(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteGuardrailRequestThe request object containing all of the parameters for the API call. |
deleteGuardrail(GuardrailName name)
public final void deleteGuardrail(GuardrailName name)Deletes the specified guardrail.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GuardrailName name = GuardrailName.of("[PROJECT]", "[LOCATION]", "[APP]", "[GUARDRAIL]");
agentServiceClient.deleteGuardrail(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
GuardrailNameRequired. The resource name of the guardrail to delete. |
deleteGuardrail(String name)
public final void deleteGuardrail(String name)Deletes the specified guardrail.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = GuardrailName.of("[PROJECT]", "[LOCATION]", "[APP]", "[GUARDRAIL]").toString();
agentServiceClient.deleteGuardrail(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the guardrail to delete. |
deleteGuardrailCallable()
public final UnaryCallable<DeleteGuardrailRequest,Empty> deleteGuardrailCallable()Deletes the specified guardrail.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteGuardrailRequest request =
DeleteGuardrailRequest.newBuilder()
.setName(
GuardrailName.of("[PROJECT]", "[LOCATION]", "[APP]", "[GUARDRAIL]").toString())
.setForce(true)
.setEtag("etag3123477")
.build();
ApiFuture<Empty> future = agentServiceClient.deleteGuardrailCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteGuardrailRequest,Empty> |
|
deleteTool(DeleteToolRequest request)
public final void deleteTool(DeleteToolRequest request)Deletes the specified tool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteToolRequest request =
DeleteToolRequest.newBuilder()
.setName(ToolName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOL]").toString())
.setForce(true)
.setEtag("etag3123477")
.build();
agentServiceClient.deleteTool(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteToolRequestThe request object containing all of the parameters for the API call. |
deleteTool(ToolName name)
public final void deleteTool(ToolName name)Deletes the specified tool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOL]");
agentServiceClient.deleteTool(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ToolNameRequired. The resource name of the tool to delete. |
deleteTool(String name)
public final void deleteTool(String name)Deletes the specified tool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = ToolName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOL]").toString();
agentServiceClient.deleteTool(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the tool to delete. |
deleteToolCallable()
public final UnaryCallable<DeleteToolRequest,Empty> deleteToolCallable()Deletes the specified tool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteToolRequest request =
DeleteToolRequest.newBuilder()
.setName(ToolName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOL]").toString())
.setForce(true)
.setEtag("etag3123477")
.build();
ApiFuture<Empty> future = agentServiceClient.deleteToolCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteToolRequest,Empty> |
|
deleteToolset(DeleteToolsetRequest request)
public final void deleteToolset(DeleteToolsetRequest request)Deletes the specified toolset.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteToolsetRequest request =
DeleteToolsetRequest.newBuilder()
.setName(ToolsetName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOLSET]").toString())
.setForce(true)
.setEtag("etag3123477")
.build();
agentServiceClient.deleteToolset(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteToolsetRequestThe request object containing all of the parameters for the API call. |
deleteToolset(ToolsetName name)
public final void deleteToolset(ToolsetName name)Deletes the specified toolset.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ToolsetName name = ToolsetName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOLSET]");
agentServiceClient.deleteToolset(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ToolsetNameRequired. The resource name of the toolset to delete. |
deleteToolset(String name)
public final void deleteToolset(String name)Deletes the specified toolset.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = ToolsetName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOLSET]").toString();
agentServiceClient.deleteToolset(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the toolset to delete. |
deleteToolsetCallable()
public final UnaryCallable<DeleteToolsetRequest,Empty> deleteToolsetCallable()Deletes the specified toolset.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeleteToolsetRequest request =
DeleteToolsetRequest.newBuilder()
.setName(ToolsetName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOLSET]").toString())
.setForce(true)
.setEtag("etag3123477")
.build();
ApiFuture<Empty> future = agentServiceClient.deleteToolsetCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteToolsetRequest,Empty> |
|
exportAppAsync(AppName name)
public final OperationFuture<ExportAppResponse,OperationMetadata> exportAppAsync(AppName name)Exports the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName name = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
ExportAppResponse response = agentServiceClient.exportAppAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
AppNameRequired. The resource name of the app to export. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ExportAppResponse,OperationMetadata> |
|
exportAppAsync(ExportAppRequest request)
public final OperationFuture<ExportAppResponse,OperationMetadata> exportAppAsync(ExportAppRequest request)Exports the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ExportAppRequest request =
ExportAppRequest.newBuilder()
.setName(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setGcsUri("gcsUri-1251224875")
.build();
ExportAppResponse response = agentServiceClient.exportAppAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
ExportAppRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ExportAppResponse,OperationMetadata> |
|
exportAppAsync(String name)
public final OperationFuture<ExportAppResponse,OperationMetadata> exportAppAsync(String name)Exports the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
ExportAppResponse response = agentServiceClient.exportAppAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the app to export. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ExportAppResponse,OperationMetadata> |
|
exportAppCallable()
public final UnaryCallable<ExportAppRequest,Operation> exportAppCallable()Exports the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ExportAppRequest request =
ExportAppRequest.newBuilder()
.setName(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setGcsUri("gcsUri-1251224875")
.build();
ApiFuture<Operation> future = agentServiceClient.exportAppCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ExportAppRequest,Operation> |
|
exportAppOperationCallable()
public final OperationCallable<ExportAppRequest,ExportAppResponse,OperationMetadata> exportAppOperationCallable()Exports the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ExportAppRequest request =
ExportAppRequest.newBuilder()
.setName(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setGcsUri("gcsUri-1251224875")
.build();
OperationFuture<ExportAppResponse, OperationMetadata> future =
agentServiceClient.exportAppOperationCallable().futureCall(request);
// Do something.
ExportAppResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<ExportAppRequest,ExportAppResponse,OperationMetadata> |
|
getAgent(AgentName name)
public final Agent getAgent(AgentName name)Gets details of the specified agent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AgentName name = AgentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[AGENT]");
Agent response = agentServiceClient.getAgent(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
AgentNameRequired. The resource name of the agent to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Agent |
|
getAgent(GetAgentRequest request)
public final Agent getAgent(GetAgentRequest request)Gets details of the specified agent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetAgentRequest request =
GetAgentRequest.newBuilder()
.setName(AgentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[AGENT]").toString())
.build();
Agent response = agentServiceClient.getAgent(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetAgentRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Agent |
|
getAgent(String name)
public final Agent getAgent(String name)Gets details of the specified agent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = AgentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[AGENT]").toString();
Agent response = agentServiceClient.getAgent(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the agent to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Agent |
|
getAgentCallable()
public final UnaryCallable<GetAgentRequest,Agent> getAgentCallable()Gets details of the specified agent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetAgentRequest request =
GetAgentRequest.newBuilder()
.setName(AgentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[AGENT]").toString())
.build();
ApiFuture<Agent> future = agentServiceClient.getAgentCallable().futureCall(request);
// Do something.
Agent response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetAgentRequest,Agent> |
|
getApp(AppName name)
public final App getApp(AppName name)Gets details of the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName name = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
App response = agentServiceClient.getApp(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
AppNameRequired. The resource name of the app to retrieve. |
| Returns | |
|---|---|
| Type | Description |
App |
|
getApp(GetAppRequest request)
public final App getApp(GetAppRequest request)Gets details of the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetAppRequest request =
GetAppRequest.newBuilder()
.setName(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.build();
App response = agentServiceClient.getApp(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetAppRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
App |
|
getApp(String name)
public final App getApp(String name)Gets details of the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
App response = agentServiceClient.getApp(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the app to retrieve. |
| Returns | |
|---|---|
| Type | Description |
App |
|
getAppCallable()
public final UnaryCallable<GetAppRequest,App> getAppCallable()Gets details of the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetAppRequest request =
GetAppRequest.newBuilder()
.setName(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.build();
ApiFuture<App> future = agentServiceClient.getAppCallable().futureCall(request);
// Do something.
App response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetAppRequest,App> |
|
getAppVersion(AppVersionName name)
public final AppVersion getAppVersion(AppVersionName name)Gets details of the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppVersionName name = AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]");
AppVersion response = agentServiceClient.getAppVersion(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
AppVersionNameRequired. The resource name of the app version to retrieve. |
| Returns | |
|---|---|
| Type | Description |
AppVersion |
|
getAppVersion(GetAppVersionRequest request)
public final AppVersion getAppVersion(GetAppVersionRequest request)Gets details of the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetAppVersionRequest request =
GetAppVersionRequest.newBuilder()
.setName(
AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]").toString())
.build();
AppVersion response = agentServiceClient.getAppVersion(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetAppVersionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AppVersion |
|
getAppVersion(String name)
public final AppVersion getAppVersion(String name)Gets details of the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]").toString();
AppVersion response = agentServiceClient.getAppVersion(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the app version to retrieve. |
| Returns | |
|---|---|
| Type | Description |
AppVersion |
|
getAppVersionCallable()
public final UnaryCallable<GetAppVersionRequest,AppVersion> getAppVersionCallable()Gets details of the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetAppVersionRequest request =
GetAppVersionRequest.newBuilder()
.setName(
AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]").toString())
.build();
ApiFuture<AppVersion> future = agentServiceClient.getAppVersionCallable().futureCall(request);
// Do something.
AppVersion response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetAppVersionRequest,AppVersion> |
|
getChangelog(ChangelogName name)
public final Changelog getChangelog(ChangelogName name)Gets the specified changelog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ChangelogName name = ChangelogName.of("[PROJECT]", "[LOCATION]", "[APP]", "[CHANGELOG]");
Changelog response = agentServiceClient.getChangelog(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ChangelogNameRequired. The resource name of the changelog to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Changelog |
|
getChangelog(GetChangelogRequest request)
public final Changelog getChangelog(GetChangelogRequest request)Gets the specified changelog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetChangelogRequest request =
GetChangelogRequest.newBuilder()
.setName(
ChangelogName.of("[PROJECT]", "[LOCATION]", "[APP]", "[CHANGELOG]").toString())
.build();
Changelog response = agentServiceClient.getChangelog(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetChangelogRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Changelog |
|
getChangelog(String name)
public final Changelog getChangelog(String name)Gets the specified changelog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = ChangelogName.of("[PROJECT]", "[LOCATION]", "[APP]", "[CHANGELOG]").toString();
Changelog response = agentServiceClient.getChangelog(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the changelog to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Changelog |
|
getChangelogCallable()
public final UnaryCallable<GetChangelogRequest,Changelog> getChangelogCallable()Gets the specified changelog.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetChangelogRequest request =
GetChangelogRequest.newBuilder()
.setName(
ChangelogName.of("[PROJECT]", "[LOCATION]", "[APP]", "[CHANGELOG]").toString())
.build();
ApiFuture<Changelog> future = agentServiceClient.getChangelogCallable().futureCall(request);
// Do something.
Changelog response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetChangelogRequest,Changelog> |
|
getConversation(ConversationName name)
public final Conversation getConversation(ConversationName name)Gets details of the specified conversation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ConversationName name =
ConversationName.of("[PROJECT]", "[LOCATION]", "[APP]", "[CONVERSATION]");
Conversation response = agentServiceClient.getConversation(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ConversationNameRequired. The resource name of the conversation to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Conversation |
|
getConversation(GetConversationRequest request)
public final Conversation getConversation(GetConversationRequest request)Gets details of the specified conversation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetConversationRequest request =
GetConversationRequest.newBuilder()
.setName(
ConversationName.of("[PROJECT]", "[LOCATION]", "[APP]", "[CONVERSATION]")
.toString())
.build();
Conversation response = agentServiceClient.getConversation(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetConversationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Conversation |
|
getConversation(String name)
public final Conversation getConversation(String name)Gets details of the specified conversation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name =
ConversationName.of("[PROJECT]", "[LOCATION]", "[APP]", "[CONVERSATION]").toString();
Conversation response = agentServiceClient.getConversation(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the conversation to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Conversation |
|
getConversationCallable()
public final UnaryCallable<GetConversationRequest,Conversation> getConversationCallable()Gets details of the specified conversation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetConversationRequest request =
GetConversationRequest.newBuilder()
.setName(
ConversationName.of("[PROJECT]", "[LOCATION]", "[APP]", "[CONVERSATION]")
.toString())
.build();
ApiFuture<Conversation> future =
agentServiceClient.getConversationCallable().futureCall(request);
// Do something.
Conversation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetConversationRequest,Conversation> |
|
getDeployment(DeploymentName name)
public final Deployment getDeployment(DeploymentName name)Gets details of the specified deployment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
DeploymentName name = DeploymentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[DEPLOYMENT]");
Deployment response = agentServiceClient.getDeployment(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
DeploymentNameRequired. The name of the deployment. Format:
|
| Returns | |
|---|---|
| Type | Description |
Deployment |
|
getDeployment(GetDeploymentRequest request)
public final Deployment getDeployment(GetDeploymentRequest request)Gets details of the specified deployment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetDeploymentRequest request =
GetDeploymentRequest.newBuilder()
.setName(
DeploymentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[DEPLOYMENT]").toString())
.build();
Deployment response = agentServiceClient.getDeployment(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetDeploymentRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Deployment |
|
getDeployment(String name)
public final Deployment getDeployment(String name)Gets details of the specified deployment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name =
DeploymentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[DEPLOYMENT]").toString();
Deployment response = agentServiceClient.getDeployment(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the deployment. Format:
|
| Returns | |
|---|---|
| Type | Description |
Deployment |
|
getDeploymentCallable()
public final UnaryCallable<GetDeploymentRequest,Deployment> getDeploymentCallable()Gets details of the specified deployment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetDeploymentRequest request =
GetDeploymentRequest.newBuilder()
.setName(
DeploymentName.of("[PROJECT]", "[LOCATION]", "[APP]", "[DEPLOYMENT]").toString())
.build();
ApiFuture<Deployment> future = agentServiceClient.getDeploymentCallable().futureCall(request);
// Do something.
Deployment response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetDeploymentRequest,Deployment> |
|
getExample(ExampleName name)
public final Example getExample(ExampleName name)Gets details of the specified example.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ExampleName name = ExampleName.of("[PROJECT]", "[LOCATION]", "[APP]", "[EXAMPLE]");
Example response = agentServiceClient.getExample(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ExampleNameRequired. The resource name of the example to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Example |
|
getExample(GetExampleRequest request)
public final Example getExample(GetExampleRequest request)Gets details of the specified example.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetExampleRequest request =
GetExampleRequest.newBuilder()
.setName(ExampleName.of("[PROJECT]", "[LOCATION]", "[APP]", "[EXAMPLE]").toString())
.build();
Example response = agentServiceClient.getExample(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetExampleRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Example |
|
getExample(String name)
public final Example getExample(String name)Gets details of the specified example.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = ExampleName.of("[PROJECT]", "[LOCATION]", "[APP]", "[EXAMPLE]").toString();
Example response = agentServiceClient.getExample(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the example to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Example |
|
getExampleCallable()
public final UnaryCallable<GetExampleRequest,Example> getExampleCallable()Gets details of the specified example.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetExampleRequest request =
GetExampleRequest.newBuilder()
.setName(ExampleName.of("[PROJECT]", "[LOCATION]", "[APP]", "[EXAMPLE]").toString())
.build();
ApiFuture<Example> future = agentServiceClient.getExampleCallable().futureCall(request);
// Do something.
Example response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetExampleRequest,Example> |
|
getGuardrail(GetGuardrailRequest request)
public final Guardrail getGuardrail(GetGuardrailRequest request)Gets details of the specified guardrail.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetGuardrailRequest request =
GetGuardrailRequest.newBuilder()
.setName(
GuardrailName.of("[PROJECT]", "[LOCATION]", "[APP]", "[GUARDRAIL]").toString())
.build();
Guardrail response = agentServiceClient.getGuardrail(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetGuardrailRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Guardrail |
|
getGuardrail(GuardrailName name)
public final Guardrail getGuardrail(GuardrailName name)Gets details of the specified guardrail.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GuardrailName name = GuardrailName.of("[PROJECT]", "[LOCATION]", "[APP]", "[GUARDRAIL]");
Guardrail response = agentServiceClient.getGuardrail(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
GuardrailNameRequired. The resource name of the guardrail to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Guardrail |
|
getGuardrail(String name)
public final Guardrail getGuardrail(String name)Gets details of the specified guardrail.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = GuardrailName.of("[PROJECT]", "[LOCATION]", "[APP]", "[GUARDRAIL]").toString();
Guardrail response = agentServiceClient.getGuardrail(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the guardrail to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Guardrail |
|
getGuardrailCallable()
public final UnaryCallable<GetGuardrailRequest,Guardrail> getGuardrailCallable()Gets details of the specified guardrail.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetGuardrailRequest request =
GetGuardrailRequest.newBuilder()
.setName(
GuardrailName.of("[PROJECT]", "[LOCATION]", "[APP]", "[GUARDRAIL]").toString())
.build();
ApiFuture<Guardrail> future = agentServiceClient.getGuardrailCallable().futureCall(request);
// Do something.
Guardrail response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetGuardrailRequest,Guardrail> |
|
getHttpJsonOperationsClient()
public final OperationsClient getHttpJsonOperationsClient()Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
| Returns | |
|---|---|
| Type | Description |
OperationsClient |
|
getLocation(GetLocationRequest request)
public final Location getLocation(GetLocationRequest request)Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = agentServiceClient.getLocation(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.GetLocationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.cloud.location.Location |
|
getLocationCallable()
public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future = agentServiceClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
|
getOperationsClient()
public final OperationsClient getOperationsClient()Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
| Returns | |
|---|---|
| Type | Description |
OperationsClient |
|
getSettings()
public final AgentServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
AgentServiceSettings |
|
getStub()
public AgentServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
AgentServiceStub |
|
getTool(GetToolRequest request)
public final Tool getTool(GetToolRequest request)Gets details of the specified tool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetToolRequest request =
GetToolRequest.newBuilder()
.setName(ToolName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOL]").toString())
.build();
Tool response = agentServiceClient.getTool(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetToolRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Tool |
|
getTool(ToolName name)
public final Tool getTool(ToolName name)Gets details of the specified tool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOL]");
Tool response = agentServiceClient.getTool(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ToolNameRequired. The resource name of the tool to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Tool |
|
getTool(String name)
public final Tool getTool(String name)Gets details of the specified tool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = ToolName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOL]").toString();
Tool response = agentServiceClient.getTool(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the tool to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Tool |
|
getToolCallable()
public final UnaryCallable<GetToolRequest,Tool> getToolCallable()Gets details of the specified tool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetToolRequest request =
GetToolRequest.newBuilder()
.setName(ToolName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOL]").toString())
.build();
ApiFuture<Tool> future = agentServiceClient.getToolCallable().futureCall(request);
// Do something.
Tool response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetToolRequest,Tool> |
|
getToolset(GetToolsetRequest request)
public final Toolset getToolset(GetToolsetRequest request)Gets details of the specified toolset.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetToolsetRequest request =
GetToolsetRequest.newBuilder()
.setName(ToolsetName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOLSET]").toString())
.build();
Toolset response = agentServiceClient.getToolset(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetToolsetRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Toolset |
|
getToolset(ToolsetName name)
public final Toolset getToolset(ToolsetName name)Gets details of the specified toolset.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ToolsetName name = ToolsetName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOLSET]");
Toolset response = agentServiceClient.getToolset(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
ToolsetNameRequired. The resource name of the toolset to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Toolset |
|
getToolset(String name)
public final Toolset getToolset(String name)Gets details of the specified toolset.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = ToolsetName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOLSET]").toString();
Toolset response = agentServiceClient.getToolset(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the toolset to retrieve. |
| Returns | |
|---|---|
| Type | Description |
Toolset |
|
getToolsetCallable()
public final UnaryCallable<GetToolsetRequest,Toolset> getToolsetCallable()Gets details of the specified toolset.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
GetToolsetRequest request =
GetToolsetRequest.newBuilder()
.setName(ToolsetName.of("[PROJECT]", "[LOCATION]", "[APP]", "[TOOLSET]").toString())
.build();
ApiFuture<Toolset> future = agentServiceClient.getToolsetCallable().futureCall(request);
// Do something.
Toolset response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetToolsetRequest,Toolset> |
|
importAppAsync(ImportAppRequest request)
public final OperationFuture<ImportAppResponse,OperationMetadata> importAppAsync(ImportAppRequest request)Imports the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ImportAppRequest request =
ImportAppRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDisplayName("displayName1714148973")
.setAppId("appId93028124")
.setImportOptions(ImportAppRequest.ImportOptions.newBuilder().build())
.setIgnoreAppLock(true)
.build();
ImportAppResponse response = agentServiceClient.importAppAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
ImportAppRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ImportAppResponse,OperationMetadata> |
|
importAppAsync(LocationName parent, String displayName, String appId)
public final OperationFuture<ImportAppResponse,OperationMetadata> importAppAsync(LocationName parent, String displayName, String appId)Imports the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
String displayName = "displayName1714148973";
String appId = "appId93028124";
ImportAppResponse response =
agentServiceClient.importAppAsync(parent, displayName, appId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource name with the location of the app to import. |
displayName |
StringOptional. The display name of the app to import.
|
appId |
StringOptional. The ID to use for the imported app.
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ImportAppResponse,OperationMetadata> |
|
importAppAsync(String parent, String displayName, String appId)
public final OperationFuture<ImportAppResponse,OperationMetadata> importAppAsync(String parent, String displayName, String appId)Imports the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
String displayName = "displayName1714148973";
String appId = "appId93028124";
ImportAppResponse response =
agentServiceClient.importAppAsync(parent, displayName, appId).get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource name with the location of the app to import. |
displayName |
StringOptional. The display name of the app to import.
|
appId |
StringOptional. The ID to use for the imported app.
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ImportAppResponse,OperationMetadata> |
|
importAppCallable()
public final UnaryCallable<ImportAppRequest,Operation> importAppCallable()Imports the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ImportAppRequest request =
ImportAppRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDisplayName("displayName1714148973")
.setAppId("appId93028124")
.setImportOptions(ImportAppRequest.ImportOptions.newBuilder().build())
.setIgnoreAppLock(true)
.build();
ApiFuture<Operation> future = agentServiceClient.importAppCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ImportAppRequest,Operation> |
|
importAppOperationCallable()
public final OperationCallable<ImportAppRequest,ImportAppResponse,OperationMetadata> importAppOperationCallable()Imports the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ImportAppRequest request =
ImportAppRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDisplayName("displayName1714148973")
.setAppId("appId93028124")
.setImportOptions(ImportAppRequest.ImportOptions.newBuilder().build())
.setIgnoreAppLock(true)
.build();
OperationFuture<ImportAppResponse, OperationMetadata> future =
agentServiceClient.importAppOperationCallable().futureCall(request);
// Do something.
ImportAppResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<ImportAppRequest,ImportAppResponse,OperationMetadata> |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listAgents(AppName parent)
public final AgentServiceClient.ListAgentsPagedResponse listAgents(AppName parent)Lists agents in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
for (Agent element : agentServiceClient.listAgents(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to list agents from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListAgentsPagedResponse |
|
listAgents(ListAgentsRequest request)
public final AgentServiceClient.ListAgentsPagedResponse listAgents(ListAgentsRequest request)Lists agents in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListAgentsRequest request =
ListAgentsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Agent element : agentServiceClient.listAgents(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListAgentsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListAgentsPagedResponse |
|
listAgents(String parent)
public final AgentServiceClient.ListAgentsPagedResponse listAgents(String parent)Lists agents in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
for (Agent element : agentServiceClient.listAgents(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to list agents from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListAgentsPagedResponse |
|
listAgentsCallable()
public final UnaryCallable<ListAgentsRequest,ListAgentsResponse> listAgentsCallable()Lists agents in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListAgentsRequest request =
ListAgentsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListAgentsResponse response = agentServiceClient.listAgentsCallable().call(request);
for (Agent element : response.getAgentsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListAgentsRequest,ListAgentsResponse> |
|
listAgentsPagedCallable()
public final UnaryCallable<ListAgentsRequest,AgentServiceClient.ListAgentsPagedResponse> listAgentsPagedCallable()Lists agents in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListAgentsRequest request =
ListAgentsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Agent> future = agentServiceClient.listAgentsPagedCallable().futureCall(request);
// Do something.
for (Agent element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListAgentsRequest,ListAgentsPagedResponse> |
|
listAppVersions(AppName parent)
public final AgentServiceClient.ListAppVersionsPagedResponse listAppVersions(AppName parent)Lists all app versions in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
for (AppVersion element : agentServiceClient.listAppVersions(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to list app versions from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListAppVersionsPagedResponse |
|
listAppVersions(ListAppVersionsRequest request)
public final AgentServiceClient.ListAppVersionsPagedResponse listAppVersions(ListAppVersionsRequest request)Lists all app versions in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListAppVersionsRequest request =
ListAppVersionsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (AppVersion element : agentServiceClient.listAppVersions(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListAppVersionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListAppVersionsPagedResponse |
|
listAppVersions(String parent)
public final AgentServiceClient.ListAppVersionsPagedResponse listAppVersions(String parent)Lists all app versions in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
for (AppVersion element : agentServiceClient.listAppVersions(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to list app versions from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListAppVersionsPagedResponse |
|
listAppVersionsCallable()
public final UnaryCallable<ListAppVersionsRequest,ListAppVersionsResponse> listAppVersionsCallable()Lists all app versions in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListAppVersionsRequest request =
ListAppVersionsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListAppVersionsResponse response =
agentServiceClient.listAppVersionsCallable().call(request);
for (AppVersion element : response.getAppVersionsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListAppVersionsRequest,ListAppVersionsResponse> |
|
listAppVersionsPagedCallable()
public final UnaryCallable<ListAppVersionsRequest,AgentServiceClient.ListAppVersionsPagedResponse> listAppVersionsPagedCallable()Lists all app versions in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListAppVersionsRequest request =
ListAppVersionsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<AppVersion> future =
agentServiceClient.listAppVersionsPagedCallable().futureCall(request);
// Do something.
for (AppVersion element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListAppVersionsRequest,ListAppVersionsPagedResponse> |
|
listApps(ListAppsRequest request)
public final AgentServiceClient.ListAppsPagedResponse listApps(ListAppsRequest request)Lists apps in the given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListAppsRequest request =
ListAppsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (App element : agentServiceClient.listApps(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListAppsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListAppsPagedResponse |
|
listApps(LocationName parent)
public final AgentServiceClient.ListAppsPagedResponse listApps(LocationName parent)Lists apps in the given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (App element : agentServiceClient.listApps(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The resource name of the location to list apps from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListAppsPagedResponse |
|
listApps(String parent)
public final AgentServiceClient.ListAppsPagedResponse listApps(String parent)Lists apps in the given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (App element : agentServiceClient.listApps(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the location to list apps from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListAppsPagedResponse |
|
listAppsCallable()
public final UnaryCallable<ListAppsRequest,ListAppsResponse> listAppsCallable()Lists apps in the given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListAppsRequest request =
ListAppsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListAppsResponse response = agentServiceClient.listAppsCallable().call(request);
for (App element : response.getAppsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListAppsRequest,ListAppsResponse> |
|
listAppsPagedCallable()
public final UnaryCallable<ListAppsRequest,AgentServiceClient.ListAppsPagedResponse> listAppsPagedCallable()Lists apps in the given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListAppsRequest request =
ListAppsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<App> future = agentServiceClient.listAppsPagedCallable().futureCall(request);
// Do something.
for (App element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListAppsRequest,ListAppsPagedResponse> |
|
listChangelogs(AppName parent)
public final AgentServiceClient.ListChangelogsPagedResponse listChangelogs(AppName parent)Lists the changelogs of the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
for (Changelog element : agentServiceClient.listChangelogs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to list changelogs from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListChangelogsPagedResponse |
|
listChangelogs(ListChangelogsRequest request)
public final AgentServiceClient.ListChangelogsPagedResponse listChangelogs(ListChangelogsRequest request)Lists the changelogs of the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListChangelogsRequest request =
ListChangelogsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Changelog element : agentServiceClient.listChangelogs(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListChangelogsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListChangelogsPagedResponse |
|
listChangelogs(String parent)
public final AgentServiceClient.ListChangelogsPagedResponse listChangelogs(String parent)Lists the changelogs of the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
for (Changelog element : agentServiceClient.listChangelogs(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to list changelogs from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListChangelogsPagedResponse |
|
listChangelogsCallable()
public final UnaryCallable<ListChangelogsRequest,ListChangelogsResponse> listChangelogsCallable()Lists the changelogs of the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListChangelogsRequest request =
ListChangelogsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListChangelogsResponse response = agentServiceClient.listChangelogsCallable().call(request);
for (Changelog element : response.getChangelogsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListChangelogsRequest,ListChangelogsResponse> |
|
listChangelogsPagedCallable()
public final UnaryCallable<ListChangelogsRequest,AgentServiceClient.ListChangelogsPagedResponse> listChangelogsPagedCallable()Lists the changelogs of the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListChangelogsRequest request =
ListChangelogsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Changelog> future =
agentServiceClient.listChangelogsPagedCallable().futureCall(request);
// Do something.
for (Changelog element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListChangelogsRequest,ListChangelogsPagedResponse> |
|
listConversations(AppName parent)
public final AgentServiceClient.ListConversationsPagedResponse listConversations(AppName parent)Lists conversations in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
for (Conversation element : agentServiceClient.listConversations(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to list conversations from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListConversationsPagedResponse |
|
listConversations(ListConversationsRequest request)
public final AgentServiceClient.ListConversationsPagedResponse listConversations(ListConversationsRequest request)Lists conversations in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListConversationsRequest request =
ListConversationsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.addAllSources(new ArrayList<Conversation.Source>())
.build();
for (Conversation element : agentServiceClient.listConversations(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListConversationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListConversationsPagedResponse |
|
listConversations(String parent)
public final AgentServiceClient.ListConversationsPagedResponse listConversations(String parent)Lists conversations in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
for (Conversation element : agentServiceClient.listConversations(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to list conversations from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListConversationsPagedResponse |
|
listConversationsCallable()
public final UnaryCallable<ListConversationsRequest,ListConversationsResponse> listConversationsCallable()Lists conversations in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListConversationsRequest request =
ListConversationsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.addAllSources(new ArrayList<Conversation.Source>())
.build();
while (true) {
ListConversationsResponse response =
agentServiceClient.listConversationsCallable().call(request);
for (Conversation element : response.getConversationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListConversationsRequest,ListConversationsResponse> |
|
listConversationsPagedCallable()
public final UnaryCallable<ListConversationsRequest,AgentServiceClient.ListConversationsPagedResponse> listConversationsPagedCallable()Lists conversations in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListConversationsRequest request =
ListConversationsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.addAllSources(new ArrayList<Conversation.Source>())
.build();
ApiFuture<Conversation> future =
agentServiceClient.listConversationsPagedCallable().futureCall(request);
// Do something.
for (Conversation element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListConversationsRequest,ListConversationsPagedResponse> |
|
listDeployments(AppName parent)
public final AgentServiceClient.ListDeploymentsPagedResponse listDeployments(AppName parent)Lists deployments in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
for (Deployment element : agentServiceClient.listDeployments(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The parent app. Format:
|
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListDeploymentsPagedResponse |
|
listDeployments(ListDeploymentsRequest request)
public final AgentServiceClient.ListDeploymentsPagedResponse listDeployments(ListDeploymentsRequest request)Lists deployments in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListDeploymentsRequest request =
ListDeploymentsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
for (Deployment element : agentServiceClient.listDeployments(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListDeploymentsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListDeploymentsPagedResponse |
|
listDeployments(String parent)
public final AgentServiceClient.ListDeploymentsPagedResponse listDeployments(String parent)Lists deployments in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
for (Deployment element : agentServiceClient.listDeployments(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent app. Format:
|
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListDeploymentsPagedResponse |
|
listDeploymentsCallable()
public final UnaryCallable<ListDeploymentsRequest,ListDeploymentsResponse> listDeploymentsCallable()Lists deployments in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListDeploymentsRequest request =
ListDeploymentsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListDeploymentsResponse response =
agentServiceClient.listDeploymentsCallable().call(request);
for (Deployment element : response.getDeploymentsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDeploymentsRequest,ListDeploymentsResponse> |
|
listDeploymentsPagedCallable()
public final UnaryCallable<ListDeploymentsRequest,AgentServiceClient.ListDeploymentsPagedResponse> listDeploymentsPagedCallable()Lists deployments in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListDeploymentsRequest request =
ListDeploymentsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Deployment> future =
agentServiceClient.listDeploymentsPagedCallable().futureCall(request);
// Do something.
for (Deployment element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListDeploymentsRequest,ListDeploymentsPagedResponse> |
|
listExamples(AppName parent)
public final AgentServiceClient.ListExamplesPagedResponse listExamples(AppName parent)Lists examples in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
for (Example element : agentServiceClient.listExamples(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to list examples from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListExamplesPagedResponse |
|
listExamples(ListExamplesRequest request)
public final AgentServiceClient.ListExamplesPagedResponse listExamples(ListExamplesRequest request)Lists examples in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListExamplesRequest request =
ListExamplesRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Example element : agentServiceClient.listExamples(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListExamplesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListExamplesPagedResponse |
|
listExamples(String parent)
public final AgentServiceClient.ListExamplesPagedResponse listExamples(String parent)Lists examples in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
for (Example element : agentServiceClient.listExamples(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to list examples from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListExamplesPagedResponse |
|
listExamplesCallable()
public final UnaryCallable<ListExamplesRequest,ListExamplesResponse> listExamplesCallable()Lists examples in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListExamplesRequest request =
ListExamplesRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListExamplesResponse response = agentServiceClient.listExamplesCallable().call(request);
for (Example element : response.getExamplesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListExamplesRequest,ListExamplesResponse> |
|
listExamplesPagedCallable()
public final UnaryCallable<ListExamplesRequest,AgentServiceClient.ListExamplesPagedResponse> listExamplesPagedCallable()Lists examples in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListExamplesRequest request =
ListExamplesRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Example> future =
agentServiceClient.listExamplesPagedCallable().futureCall(request);
// Do something.
for (Example element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListExamplesRequest,ListExamplesPagedResponse> |
|
listGuardrails(AppName parent)
public final AgentServiceClient.ListGuardrailsPagedResponse listGuardrails(AppName parent)Lists guardrails in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
for (Guardrail element : agentServiceClient.listGuardrails(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to list guardrails from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListGuardrailsPagedResponse |
|
listGuardrails(ListGuardrailsRequest request)
public final AgentServiceClient.ListGuardrailsPagedResponse listGuardrails(ListGuardrailsRequest request)Lists guardrails in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListGuardrailsRequest request =
ListGuardrailsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Guardrail element : agentServiceClient.listGuardrails(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListGuardrailsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListGuardrailsPagedResponse |
|
listGuardrails(String parent)
public final AgentServiceClient.ListGuardrailsPagedResponse listGuardrails(String parent)Lists guardrails in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
for (Guardrail element : agentServiceClient.listGuardrails(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to list guardrails from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListGuardrailsPagedResponse |
|
listGuardrailsCallable()
public final UnaryCallable<ListGuardrailsRequest,ListGuardrailsResponse> listGuardrailsCallable()Lists guardrails in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListGuardrailsRequest request =
ListGuardrailsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListGuardrailsResponse response = agentServiceClient.listGuardrailsCallable().call(request);
for (Guardrail element : response.getGuardrailsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListGuardrailsRequest,ListGuardrailsResponse> |
|
listGuardrailsPagedCallable()
public final UnaryCallable<ListGuardrailsRequest,AgentServiceClient.ListGuardrailsPagedResponse> listGuardrailsPagedCallable()Lists guardrails in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListGuardrailsRequest request =
ListGuardrailsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Guardrail> future =
agentServiceClient.listGuardrailsPagedCallable().futureCall(request);
// Do something.
for (Guardrail element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListGuardrailsRequest,ListGuardrailsPagedResponse> |
|
listLocations(ListLocationsRequest request)
public final AgentServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)Lists information about the supported locations for this service.This method can be called in two ways:
* **List all public locations:** Use the path GET /v1/locations.*
**List project-visible locations:** Use the pathGET
/v1/projects/{project_id}/locations. This may include publiclocations as well as private or
other locations specifically visibleto the project.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : agentServiceClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.ListLocationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListLocationsPagedResponse |
|
listLocationsCallable()
public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()Lists information about the supported locations for this service.This method can be called in two ways:
* **List all public locations:** Use the path GET /v1/locations.*
**List project-visible locations:** Use the pathGET
/v1/projects/{project_id}/locations. This may include publiclocations as well as private or
other locations specifically visibleto the project.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response = agentServiceClient.listLocationsCallable().call(request);
for (Location element : response.getLocationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
|
listLocationsPagedCallable()
public final UnaryCallable<ListLocationsRequest,AgentServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.This method can be called in two ways:
* **List all public locations:** Use the path GET /v1/locations.*
**List project-visible locations:** Use the pathGET
/v1/projects/{project_id}/locations. This may include publiclocations as well as private or
other locations specifically visibleto the project.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
agentServiceClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
|
listTools(AppName parent)
public final AgentServiceClient.ListToolsPagedResponse listTools(AppName parent)Lists tools in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
for (Tool element : agentServiceClient.listTools(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to list tools from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListToolsPagedResponse |
|
listTools(ListToolsRequest request)
public final AgentServiceClient.ListToolsPagedResponse listTools(ListToolsRequest request)Lists tools in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListToolsRequest request =
ListToolsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Tool element : agentServiceClient.listTools(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListToolsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListToolsPagedResponse |
|
listTools(String parent)
public final AgentServiceClient.ListToolsPagedResponse listTools(String parent)Lists tools in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
for (Tool element : agentServiceClient.listTools(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to list tools from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListToolsPagedResponse |
|
listToolsCallable()
public final UnaryCallable<ListToolsRequest,ListToolsResponse> listToolsCallable()Lists tools in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListToolsRequest request =
ListToolsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListToolsResponse response = agentServiceClient.listToolsCallable().call(request);
for (Tool element : response.getToolsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListToolsRequest,ListToolsResponse> |
|
listToolsPagedCallable()
public final UnaryCallable<ListToolsRequest,AgentServiceClient.ListToolsPagedResponse> listToolsPagedCallable()Lists tools in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListToolsRequest request =
ListToolsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Tool> future = agentServiceClient.listToolsPagedCallable().futureCall(request);
// Do something.
for (Tool element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListToolsRequest,ListToolsPagedResponse> |
|
listToolsets(AppName parent)
public final AgentServiceClient.ListToolsetsPagedResponse listToolsets(AppName parent)Lists toolsets in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppName parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]");
for (Toolset element : agentServiceClient.listToolsets(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
AppNameRequired. The resource name of the app to list toolsets from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListToolsetsPagedResponse |
|
listToolsets(ListToolsetsRequest request)
public final AgentServiceClient.ListToolsetsPagedResponse listToolsets(ListToolsetsRequest request)Lists toolsets in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListToolsetsRequest request =
ListToolsetsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Toolset element : agentServiceClient.listToolsets(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListToolsetsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListToolsetsPagedResponse |
|
listToolsets(String parent)
public final AgentServiceClient.ListToolsetsPagedResponse listToolsets(String parent)Lists toolsets in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String parent = AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString();
for (Toolset element : agentServiceClient.listToolsets(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The resource name of the app to list toolsets from. |
| Returns | |
|---|---|
| Type | Description |
AgentServiceClient.ListToolsetsPagedResponse |
|
listToolsetsCallable()
public final UnaryCallable<ListToolsetsRequest,ListToolsetsResponse> listToolsetsCallable()Lists toolsets in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListToolsetsRequest request =
ListToolsetsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListToolsetsResponse response = agentServiceClient.listToolsetsCallable().call(request);
for (Toolset element : response.getToolsetsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListToolsetsRequest,ListToolsetsResponse> |
|
listToolsetsPagedCallable()
public final UnaryCallable<ListToolsetsRequest,AgentServiceClient.ListToolsetsPagedResponse> listToolsetsPagedCallable()Lists toolsets in the given app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
ListToolsetsRequest request =
ListToolsetsRequest.newBuilder()
.setParent(AppName.of("[PROJECT]", "[LOCATION]", "[APP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Toolset> future =
agentServiceClient.listToolsetsPagedCallable().futureCall(request);
// Do something.
for (Toolset element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListToolsetsRequest,ListToolsetsPagedResponse> |
|
restoreAppVersionAsync(AppVersionName name)
public final OperationFuture<RestoreAppVersionResponse,OperationMetadata> restoreAppVersionAsync(AppVersionName name)Restores the specified app version. This will create a new app version from the current draft app and overwrite the current draft with the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
AppVersionName name = AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]");
RestoreAppVersionResponse response = agentServiceClient.restoreAppVersionAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
AppVersionNameRequired. The resource name of the app version to restore. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<RestoreAppVersionResponse,OperationMetadata> |
|
restoreAppVersionAsync(RestoreAppVersionRequest request)
public final OperationFuture<RestoreAppVersionResponse,OperationMetadata> restoreAppVersionAsync(RestoreAppVersionRequest request)Restores the specified app version. This will create a new app version from the current draft app and overwrite the current draft with the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
RestoreAppVersionRequest request =
RestoreAppVersionRequest.newBuilder()
.setName(
AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]").toString())
.build();
RestoreAppVersionResponse response = agentServiceClient.restoreAppVersionAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
RestoreAppVersionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<RestoreAppVersionResponse,OperationMetadata> |
|
restoreAppVersionAsync(String name)
public final OperationFuture<RestoreAppVersionResponse,OperationMetadata> restoreAppVersionAsync(String name)Restores the specified app version. This will create a new app version from the current draft app and overwrite the current draft with the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
String name = AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]").toString();
RestoreAppVersionResponse response = agentServiceClient.restoreAppVersionAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The resource name of the app version to restore. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<RestoreAppVersionResponse,OperationMetadata> |
|
restoreAppVersionCallable()
public final UnaryCallable<RestoreAppVersionRequest,Operation> restoreAppVersionCallable()Restores the specified app version. This will create a new app version from the current draft app and overwrite the current draft with the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
RestoreAppVersionRequest request =
RestoreAppVersionRequest.newBuilder()
.setName(
AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]").toString())
.build();
ApiFuture<Operation> future =
agentServiceClient.restoreAppVersionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<RestoreAppVersionRequest,Operation> |
|
restoreAppVersionOperationCallable()
public final OperationCallable<RestoreAppVersionRequest,RestoreAppVersionResponse,OperationMetadata> restoreAppVersionOperationCallable()Restores the specified app version. This will create a new app version from the current draft app and overwrite the current draft with the specified app version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
RestoreAppVersionRequest request =
RestoreAppVersionRequest.newBuilder()
.setName(
AppVersionName.of("[PROJECT]", "[LOCATION]", "[APP]", "[VERSION]").toString())
.build();
OperationFuture<RestoreAppVersionResponse, OperationMetadata> future =
agentServiceClient.restoreAppVersionOperationCallable().futureCall(request);
// Do something.
RestoreAppVersionResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<RestoreAppVersionRequest,RestoreAppVersionResponse,OperationMetadata> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()updateAgent(Agent agent, FieldMask updateMask)
public final Agent updateAgent(Agent agent, FieldMask updateMask)Updates the specified agent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
Agent agent = Agent.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Agent response = agentServiceClient.updateAgent(agent, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
agent |
AgentRequired. The agent to update. |
updateMask |
FieldMaskOptional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated. |
| Returns | |
|---|---|
| Type | Description |
Agent |
|
updateAgent(UpdateAgentRequest request)
public final Agent updateAgent(UpdateAgentRequest request)Updates the specified agent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateAgentRequest request =
UpdateAgentRequest.newBuilder()
.setAgent(Agent.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Agent response = agentServiceClient.updateAgent(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateAgentRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Agent |
|
updateAgentCallable()
public final UnaryCallable<UpdateAgentRequest,Agent> updateAgentCallable()Updates the specified agent.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateAgentRequest request =
UpdateAgentRequest.newBuilder()
.setAgent(Agent.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Agent> future = agentServiceClient.updateAgentCallable().futureCall(request);
// Do something.
Agent response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateAgentRequest,Agent> |
|
updateApp(App app, FieldMask updateMask)
public final App updateApp(App app, FieldMask updateMask)Updates the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
App app = App.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
App response = agentServiceClient.updateApp(app, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
app |
AppRequired. The app to update. |
updateMask |
FieldMaskOptional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated. |
| Returns | |
|---|---|
| Type | Description |
App |
|
updateApp(UpdateAppRequest request)
public final App updateApp(UpdateAppRequest request)Updates the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateAppRequest request =
UpdateAppRequest.newBuilder()
.setApp(App.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
App response = agentServiceClient.updateApp(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateAppRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
App |
|
updateAppCallable()
public final UnaryCallable<UpdateAppRequest,App> updateAppCallable()Updates the specified app.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateAppRequest request =
UpdateAppRequest.newBuilder()
.setApp(App.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<App> future = agentServiceClient.updateAppCallable().futureCall(request);
// Do something.
App response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateAppRequest,App> |
|
updateDeployment(Deployment deployment, FieldMask updateMask)
public final Deployment updateDeployment(Deployment deployment, FieldMask updateMask)Updates the specified deployment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
Deployment deployment = Deployment.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Deployment response = agentServiceClient.updateDeployment(deployment, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
deployment |
DeploymentRequired. The deployment to update. |
updateMask |
FieldMaskOptional. The list of fields to update. |
| Returns | |
|---|---|
| Type | Description |
Deployment |
|
updateDeployment(UpdateDeploymentRequest request)
public final Deployment updateDeployment(UpdateDeploymentRequest request)Updates the specified deployment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateDeploymentRequest request =
UpdateDeploymentRequest.newBuilder()
.setDeployment(Deployment.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Deployment response = agentServiceClient.updateDeployment(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateDeploymentRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Deployment |
|
updateDeploymentCallable()
public final UnaryCallable<UpdateDeploymentRequest,Deployment> updateDeploymentCallable()Updates the specified deployment.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateDeploymentRequest request =
UpdateDeploymentRequest.newBuilder()
.setDeployment(Deployment.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Deployment> future =
agentServiceClient.updateDeploymentCallable().futureCall(request);
// Do something.
Deployment response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateDeploymentRequest,Deployment> |
|
updateExample(Example example, FieldMask updateMask)
public final Example updateExample(Example example, FieldMask updateMask)Updates the specified example.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
Example example = Example.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Example response = agentServiceClient.updateExample(example, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
example |
ExampleRequired. The example to update. |
updateMask |
FieldMaskOptional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated. |
| Returns | |
|---|---|
| Type | Description |
Example |
|
updateExample(UpdateExampleRequest request)
public final Example updateExample(UpdateExampleRequest request)Updates the specified example.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateExampleRequest request =
UpdateExampleRequest.newBuilder()
.setExample(Example.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Example response = agentServiceClient.updateExample(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateExampleRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Example |
|
updateExampleCallable()
public final UnaryCallable<UpdateExampleRequest,Example> updateExampleCallable()Updates the specified example.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateExampleRequest request =
UpdateExampleRequest.newBuilder()
.setExample(Example.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Example> future = agentServiceClient.updateExampleCallable().futureCall(request);
// Do something.
Example response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateExampleRequest,Example> |
|
updateGuardrail(Guardrail guardrail, FieldMask updateMask)
public final Guardrail updateGuardrail(Guardrail guardrail, FieldMask updateMask)Updates the specified guardrail.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
Guardrail guardrail = Guardrail.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Guardrail response = agentServiceClient.updateGuardrail(guardrail, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
guardrail |
GuardrailRequired. The guardrail to update. |
updateMask |
FieldMaskOptional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated. |
| Returns | |
|---|---|
| Type | Description |
Guardrail |
|
updateGuardrail(UpdateGuardrailRequest request)
public final Guardrail updateGuardrail(UpdateGuardrailRequest request)Updates the specified guardrail.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateGuardrailRequest request =
UpdateGuardrailRequest.newBuilder()
.setGuardrail(Guardrail.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Guardrail response = agentServiceClient.updateGuardrail(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateGuardrailRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Guardrail |
|
updateGuardrailCallable()
public final UnaryCallable<UpdateGuardrailRequest,Guardrail> updateGuardrailCallable()Updates the specified guardrail.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateGuardrailRequest request =
UpdateGuardrailRequest.newBuilder()
.setGuardrail(Guardrail.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Guardrail> future =
agentServiceClient.updateGuardrailCallable().futureCall(request);
// Do something.
Guardrail response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateGuardrailRequest,Guardrail> |
|
updateTool(Tool tool, FieldMask updateMask)
public final Tool updateTool(Tool tool, FieldMask updateMask)Updates the specified tool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
Tool tool = Tool.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Tool response = agentServiceClient.updateTool(tool, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
tool |
ToolRequired. The tool to update. |
updateMask |
FieldMaskOptional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated. |
| Returns | |
|---|---|
| Type | Description |
Tool |
|
updateTool(UpdateToolRequest request)
public final Tool updateTool(UpdateToolRequest request)Updates the specified tool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateToolRequest request =
UpdateToolRequest.newBuilder()
.setTool(Tool.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Tool response = agentServiceClient.updateTool(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateToolRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Tool |
|
updateToolCallable()
public final UnaryCallable<UpdateToolRequest,Tool> updateToolCallable()Updates the specified tool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateToolRequest request =
UpdateToolRequest.newBuilder()
.setTool(Tool.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Tool> future = agentServiceClient.updateToolCallable().futureCall(request);
// Do something.
Tool response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateToolRequest,Tool> |
|
updateToolset(Toolset toolset, FieldMask updateMask)
public final Toolset updateToolset(Toolset toolset, FieldMask updateMask)Updates the specified toolset.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
Toolset toolset = Toolset.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Toolset response = agentServiceClient.updateToolset(toolset, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
toolset |
ToolsetRequired. The toolset to update. |
updateMask |
FieldMaskOptional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated. |
| Returns | |
|---|---|
| Type | Description |
Toolset |
|
updateToolset(UpdateToolsetRequest request)
public final Toolset updateToolset(UpdateToolsetRequest request)Updates the specified toolset.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateToolsetRequest request =
UpdateToolsetRequest.newBuilder()
.setToolset(Toolset.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Toolset response = agentServiceClient.updateToolset(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateToolsetRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
Toolset |
|
updateToolsetCallable()
public final UnaryCallable<UpdateToolsetRequest,Toolset> updateToolsetCallable()Updates the specified toolset.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AgentServiceClient agentServiceClient = AgentServiceClient.create()) {
UpdateToolsetRequest request =
UpdateToolsetRequest.newBuilder()
.setToolset(Toolset.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Toolset> future = agentServiceClient.updateToolsetCallable().futureCall(request);
// Do something.
Toolset response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateToolsetRequest,Toolset> |
|