@BetaApi @Generated(value="by gapic-generator-java") public class ConversationHistoryClient extends Object implements com.google.api.gax.core.BackgroundResource
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
ConversationName name =
ConversationName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CONVERSATION]");
Conversation response = conversationHistoryClient.getConversation(name);
}
Note: close() needs to be called on the ConversationHistoryClient 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 |
|---|---|---|
ListConversations |
Returns the list of all conversations. |
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 |
Retrieves 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.
|
ListLocations |
Lists information about the supported locations for this service. |
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 ConversationHistorySettings 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
ConversationHistorySettings conversationHistorySettings =
ConversationHistorySettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ConversationHistoryClient conversationHistoryClient =
ConversationHistoryClient.create(conversationHistorySettings);
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
ConversationHistorySettings conversationHistorySettings =
ConversationHistorySettings.newBuilder().setEndpoint(myEndpoint).build();
ConversationHistoryClient conversationHistoryClient =
ConversationHistoryClient.create(conversationHistorySettings);
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
ConversationHistorySettings conversationHistorySettings =
ConversationHistorySettings.newHttpJsonBuilder().build();
ConversationHistoryClient conversationHistoryClient =
ConversationHistoryClient.create(conversationHistorySettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
ConversationHistoryClient.ListConversationsFixedSizeCollection |
static class |
ConversationHistoryClient.ListConversationsPage |
static class |
ConversationHistoryClient.ListConversationsPagedResponse |
static class |
ConversationHistoryClient.ListLocationsFixedSizeCollection |
static class |
ConversationHistoryClient.ListLocationsPage |
static class |
ConversationHistoryClient.ListLocationsPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
ConversationHistoryClient(ConversationHistorySettings settings)
Constructs an instance of ConversationHistoryClient, using the given settings.
|
protected |
ConversationHistoryClient(ConversationHistoryStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static ConversationHistoryClient |
create()
Constructs an instance of ConversationHistoryClient with default settings.
|
static ConversationHistoryClient |
create(ConversationHistorySettings settings)
Constructs an instance of ConversationHistoryClient, using the given settings.
|
static ConversationHistoryClient |
create(ConversationHistoryStub stub)
Constructs an instance of ConversationHistoryClient, using the given stub for making calls.
|
void |
deleteConversation(ConversationName name)
Deletes the specified conversation.
|
void |
deleteConversation(DeleteConversationRequest request)
Deletes the specified conversation.
|
void |
deleteConversation(String name)
Deletes the specified conversation.
|
com.google.api.gax.rpc.UnaryCallable<DeleteConversationRequest,com.google.protobuf.Empty> |
deleteConversationCallable()
Deletes the specified conversation.
|
Conversation |
getConversation(ConversationName name)
Retrieves the specified conversation.
|
Conversation |
getConversation(GetConversationRequest request)
Retrieves the specified conversation.
|
Conversation |
getConversation(String name)
Retrieves the specified conversation.
|
com.google.api.gax.rpc.UnaryCallable<GetConversationRequest,Conversation> |
getConversationCallable()
Retrieves the specified conversation.
|
com.google.cloud.location.Location |
getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getLocationCallable()
Gets information about a location.
|
ConversationHistorySettings |
getSettings() |
ConversationHistoryStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
ConversationHistoryClient.ListConversationsPagedResponse |
listConversations(AgentName parent)
Returns the list of all conversations.
|
ConversationHistoryClient.ListConversationsPagedResponse |
listConversations(ListConversationsRequest request)
Returns the list of all conversations.
|
ConversationHistoryClient.ListConversationsPagedResponse |
listConversations(String parent)
Returns the list of all conversations.
|
com.google.api.gax.rpc.UnaryCallable<ListConversationsRequest,ListConversationsResponse> |
listConversationsCallable()
Returns the list of all conversations.
|
com.google.api.gax.rpc.UnaryCallable<ListConversationsRequest,ConversationHistoryClient.ListConversationsPagedResponse> |
listConversationsPagedCallable()
Returns the list of all conversations.
|
ConversationHistoryClient.ListLocationsPagedResponse |
listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
listLocationsCallable()
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,ConversationHistoryClient.ListLocationsPagedResponse> |
listLocationsPagedCallable()
Lists information about the supported locations for this service.
|
void |
shutdown() |
void |
shutdownNow() |
protected ConversationHistoryClient(ConversationHistorySettings settings) throws IOException
IOExceptionprotected ConversationHistoryClient(ConversationHistoryStub stub)
public static final ConversationHistoryClient create() throws IOException
IOExceptionpublic static final ConversationHistoryClient create(ConversationHistorySettings settings) throws IOException
IOExceptionpublic static final ConversationHistoryClient create(ConversationHistoryStub stub)
public final ConversationHistorySettings getSettings()
public ConversationHistoryStub getStub()
public final ConversationHistoryClient.ListConversationsPagedResponse listConversations(AgentName parent)
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
for (Conversation element :
conversationHistoryClient.listConversations(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The agent to list all conversations for. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ConversationHistoryClient.ListConversationsPagedResponse listConversations(String parent)
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
for (Conversation element :
conversationHistoryClient.listConversations(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The agent to list all conversations for. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final ConversationHistoryClient.ListConversationsPagedResponse listConversations(ListConversationsRequest request)
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
ListConversationsRequest request =
ListConversationsRequest.newBuilder()
.setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Conversation element :
conversationHistoryClient.listConversations(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListConversationsRequest,ConversationHistoryClient.ListConversationsPagedResponse> listConversationsPagedCallable()
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
ListConversationsRequest request =
ListConversationsRequest.newBuilder()
.setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Conversation> future =
conversationHistoryClient.listConversationsPagedCallable().futureCall(request);
// Do something.
for (Conversation element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListConversationsRequest,ListConversationsResponse> listConversationsCallable()
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
ListConversationsRequest request =
ListConversationsRequest.newBuilder()
.setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListConversationsResponse response =
conversationHistoryClient.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;
}
}
}
public final Conversation getConversation(ConversationName name)
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
ConversationName name =
ConversationName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CONVERSATION]");
Conversation response = conversationHistoryClient.getConversation(name);
}
name - Required. The name of the conversation. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/conversations/<ConversationID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Conversation getConversation(String name)
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
String name =
ConversationName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CONVERSATION]").toString();
Conversation response = conversationHistoryClient.getConversation(name);
}
name - Required. The name of the conversation. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/conversations/<ConversationID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Conversation getConversation(GetConversationRequest request)
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
GetConversationRequest request =
GetConversationRequest.newBuilder()
.setName(
ConversationName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CONVERSATION]")
.toString())
.build();
Conversation response = conversationHistoryClient.getConversation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetConversationRequest,Conversation> getConversationCallable()
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
GetConversationRequest request =
GetConversationRequest.newBuilder()
.setName(
ConversationName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CONVERSATION]")
.toString())
.build();
ApiFuture<Conversation> future =
conversationHistoryClient.getConversationCallable().futureCall(request);
// Do something.
Conversation response = future.get();
}
public final void deleteConversation(ConversationName name)
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
ConversationName name =
ConversationName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CONVERSATION]");
conversationHistoryClient.deleteConversation(name);
}
name - Required. The name of the conversation. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/conversations/<ConversationID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteConversation(String name)
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
String name =
ConversationName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CONVERSATION]").toString();
conversationHistoryClient.deleteConversation(name);
}
name - Required. The name of the conversation. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/conversations/<ConversationID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteConversation(DeleteConversationRequest request)
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
DeleteConversationRequest request =
DeleteConversationRequest.newBuilder()
.setName(
ConversationName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CONVERSATION]")
.toString())
.build();
conversationHistoryClient.deleteConversation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteConversationRequest,com.google.protobuf.Empty> deleteConversationCallable()
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
DeleteConversationRequest request =
DeleteConversationRequest.newBuilder()
.setName(
ConversationName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CONVERSATION]")
.toString())
.build();
ApiFuture<Empty> future =
conversationHistoryClient.deleteConversationCallable().futureCall(request);
// Do something.
future.get();
}
public final ConversationHistoryClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.ListLocationsRequest request)
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : conversationHistoryClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,ConversationHistoryClient.ListLocationsPagedResponse> listLocationsPagedCallable()
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
conversationHistoryClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
conversationHistoryClient.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;
}
}
}
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.GetLocationRequest request)
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = conversationHistoryClient.getLocation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> getLocationCallable()
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 (ConversationHistoryClient conversationHistoryClient = ConversationHistoryClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
conversationHistoryClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2025 Google LLC. All rights reserved.