- 4.61.0 (latest)
- 4.60.0
- 4.59.0
- 4.58.0
- 4.57.0
- 4.55.0
- 4.54.0
- 4.53.0
- 4.52.0
- 4.51.0
- 4.50.0
- 4.49.0
- 4.48.0
- 4.47.0
- 4.46.0
- 4.45.0
- 4.43.0
- 4.42.0
- 4.41.0
- 4.40.0
- 4.39.0
- 4.38.0
- 4.37.0
- 4.36.0
- 4.35.0
- 4.34.0
- 4.33.0
- 4.30.0
- 4.29.0
- 4.28.0
- 4.27.0
- 4.26.0
- 4.25.0
- 4.24.0
- 4.23.0
- 4.22.0
- 4.21.0
- 4.20.0
- 4.19.0
- 4.18.0
- 4.17.0
- 4.15.0
- 4.14.0
- 4.13.0
- 4.12.0
- 4.11.0
- 4.10.0
- 4.9.1
- 4.8.6
- 4.7.5
- 4.6.0
- 4.5.11
- 4.4.0
- 4.3.1
GitHub Repository | Product Reference |
Service Description: Manages a collection of models for human agent assistant.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
String name = "name3373707";
ConversationModel response = conversationModelsClient.getConversationModel(name);
}
Note: close() needs to be called on the ConversationModelsClient 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 |
---|---|---|
CreateConversationModel | Creates a model. This method is a long-running operation. The returned - |
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.
|
GetConversationModel | Gets conversation model. |
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.
|
ListConversationModels | Lists conversation models. |
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.
|
DeleteConversationModel | Deletes a model. This method is a long-running operation. The returned - |
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.
|
DeployConversationModel | Deploys a model. If a model is already deployed, deploying it has no effect. A model can only serve prediction requests after it gets deployed. For article suggestion, custom model will not be used unless it is deployed. This method is a long-running operation. The returned - |
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.
|
UndeployConversationModel | Undeploys a model. If the model is not deployed this method has no effect. If the model is currently being used: - For article suggestion, article suggestion will fallback to the default model if model is undeployed. This method is a long-running operation. The returned - |
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.
|
GetConversationModelEvaluation | Gets an evaluation of conversation model. |
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.
|
ListConversationModelEvaluations | Lists evaluations of a conversation model. |
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.
|
CreateConversationModelEvaluation | Creates evaluation of a conversation model. |
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.
|
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 ConversationModelsSettings 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
ConversationModelsSettings conversationModelsSettings =
ConversationModelsSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ConversationModelsClient conversationModelsClient =
ConversationModelsClient.create(conversationModelsSettings);
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
ConversationModelsSettings conversationModelsSettings =
ConversationModelsSettings.newBuilder().setEndpoint(myEndpoint).build();
ConversationModelsClient conversationModelsClient =
ConversationModelsClient.create(conversationModelsSettings);
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
ConversationModelsSettings conversationModelsSettings =
ConversationModelsSettings.newHttpJsonBuilder().build();
ConversationModelsClient conversationModelsClient =
ConversationModelsClient.create(conversationModelsSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final ConversationModelsClient create()
Constructs an instance of ConversationModelsClient with default settings.
Returns | |
---|---|
Type | Description |
ConversationModelsClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(ConversationModelsSettings settings)
public static final ConversationModelsClient create(ConversationModelsSettings settings)
Constructs an instance of ConversationModelsClient, 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 |
ConversationModelsSettings |
Returns | |
---|---|
Type | Description |
ConversationModelsClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(ConversationModelsStub stub)
public static final ConversationModelsClient create(ConversationModelsStub stub)
Constructs an instance of ConversationModelsClient, using the given stub for making calls. This is for advanced usage - prefer using create(ConversationModelsSettings).
Parameter | |
---|---|
Name | Description |
stub |
ConversationModelsStub |
Returns | |
---|---|
Type | Description |
ConversationModelsClient |
Constructors
ConversationModelsClient(ConversationModelsSettings settings)
protected ConversationModelsClient(ConversationModelsSettings settings)
Constructs an instance of ConversationModelsClient, 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 |
ConversationModelsSettings |
ConversationModelsClient(ConversationModelsStub stub)
protected ConversationModelsClient(ConversationModelsStub stub)
Parameter | |
---|---|
Name | Description |
stub |
ConversationModelsStub |
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 |
close()
public final void close()
createConversationModelAsync(CreateConversationModelRequest request)
public final OperationFuture<ConversationModel,CreateConversationModelOperationMetadata> createConversationModelAsync(CreateConversationModelRequest request)
Creates a model.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
CreateConversationModelOperationMetadata
response
: ConversationModelSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { CreateConversationModelRequest request = CreateConversationModelRequest.newBuilder() .setParent("parent-995424086") .setConversationModel(ConversationModel.newBuilder().build()) .build(); ConversationModel response = conversationModelsClient.createConversationModelAsync(request).get(); }
Parameter | |
---|---|
Name | Description |
request |
CreateConversationModelRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversationModel,CreateConversationModelOperationMetadata> |
createConversationModelAsync(String parent, ConversationModel conversationModel)
public final OperationFuture<ConversationModel,CreateConversationModelOperationMetadata> createConversationModelAsync(String parent, ConversationModel conversationModel)
Creates a model.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
CreateConversationModelOperationMetadata
response
: ConversationModelSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { String parent = "parent-995424086"; ConversationModel conversationModel = ConversationModel.newBuilder().build(); ConversationModel response = conversationModelsClient.createConversationModelAsync(parent, conversationModel).get(); }
Parameters | |
---|---|
Name | Description |
parent |
String The project to create conversation model for. Format: |
conversationModel |
ConversationModel Required. The conversation model to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversationModel,CreateConversationModelOperationMetadata> |
createConversationModelCallable()
public final UnaryCallable<CreateConversationModelRequest,Operation> createConversationModelCallable()
Creates a model.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
CreateConversationModelOperationMetadata
response
: ConversationModelSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { CreateConversationModelRequest request = CreateConversationModelRequest.newBuilder() .setParent("parent-995424086") .setConversationModel(ConversationModel.newBuilder().build()) .build(); ApiFuture<Operation> future = conversationModelsClient.createConversationModelCallable().futureCall(request); // Do something. Operation response = future.get(); }
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateConversationModelRequest,Operation> |
createConversationModelEvaluationAsync(ConversationModelName parent, ConversationModelEvaluation conversationModelEvaluation)
public final OperationFuture<ConversationModelEvaluation,CreateConversationModelEvaluationOperationMetadata> createConversationModelEvaluationAsync(ConversationModelName parent, ConversationModelEvaluation conversationModelEvaluation)
Creates evaluation of a conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
ConversationModelName parent =
ConversationModelName.ofProjectLocationConversationModelName(
"[PROJECT]", "[LOCATION]", "[CONVERSATION_MODEL]");
ConversationModelEvaluation conversationModelEvaluation =
ConversationModelEvaluation.newBuilder().build();
ConversationModelEvaluation response =
conversationModelsClient
.createConversationModelEvaluationAsync(parent, conversationModelEvaluation)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
ConversationModelName Required. The conversation model resource name. Format: |
conversationModelEvaluation |
ConversationModelEvaluation Required. The conversation model evaluation to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversationModelEvaluation,CreateConversationModelEvaluationOperationMetadata> |
createConversationModelEvaluationAsync(CreateConversationModelEvaluationRequest request)
public final OperationFuture<ConversationModelEvaluation,CreateConversationModelEvaluationOperationMetadata> createConversationModelEvaluationAsync(CreateConversationModelEvaluationRequest request)
Creates evaluation of a conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
CreateConversationModelEvaluationRequest request =
CreateConversationModelEvaluationRequest.newBuilder()
.setParent(
ConversationModelName.ofProjectLocationConversationModelName(
"[PROJECT]", "[LOCATION]", "[CONVERSATION_MODEL]")
.toString())
.setConversationModelEvaluation(ConversationModelEvaluation.newBuilder().build())
.build();
ConversationModelEvaluation response =
conversationModelsClient.createConversationModelEvaluationAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateConversationModelEvaluationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversationModelEvaluation,CreateConversationModelEvaluationOperationMetadata> |
createConversationModelEvaluationAsync(String parent, ConversationModelEvaluation conversationModelEvaluation)
public final OperationFuture<ConversationModelEvaluation,CreateConversationModelEvaluationOperationMetadata> createConversationModelEvaluationAsync(String parent, ConversationModelEvaluation conversationModelEvaluation)
Creates evaluation of a conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
String parent =
ConversationModelName.ofProjectLocationConversationModelName(
"[PROJECT]", "[LOCATION]", "[CONVERSATION_MODEL]")
.toString();
ConversationModelEvaluation conversationModelEvaluation =
ConversationModelEvaluation.newBuilder().build();
ConversationModelEvaluation response =
conversationModelsClient
.createConversationModelEvaluationAsync(parent, conversationModelEvaluation)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The conversation model resource name. Format: |
conversationModelEvaluation |
ConversationModelEvaluation Required. The conversation model evaluation to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<ConversationModelEvaluation,CreateConversationModelEvaluationOperationMetadata> |
createConversationModelEvaluationCallable()
public final UnaryCallable<CreateConversationModelEvaluationRequest,Operation> createConversationModelEvaluationCallable()
Creates evaluation of a conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
CreateConversationModelEvaluationRequest request =
CreateConversationModelEvaluationRequest.newBuilder()
.setParent(
ConversationModelName.ofProjectLocationConversationModelName(
"[PROJECT]", "[LOCATION]", "[CONVERSATION_MODEL]")
.toString())
.setConversationModelEvaluation(ConversationModelEvaluation.newBuilder().build())
.build();
ApiFuture<Operation> future =
conversationModelsClient.createConversationModelEvaluationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateConversationModelEvaluationRequest,Operation> |
createConversationModelEvaluationOperationCallable()
public final OperationCallable<CreateConversationModelEvaluationRequest,ConversationModelEvaluation,CreateConversationModelEvaluationOperationMetadata> createConversationModelEvaluationOperationCallable()
Creates evaluation of a conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
CreateConversationModelEvaluationRequest request =
CreateConversationModelEvaluationRequest.newBuilder()
.setParent(
ConversationModelName.ofProjectLocationConversationModelName(
"[PROJECT]", "[LOCATION]", "[CONVERSATION_MODEL]")
.toString())
.setConversationModelEvaluation(ConversationModelEvaluation.newBuilder().build())
.build();
OperationFuture< conversationmodelevaluation,="" createconversationmodelevaluationoperationmetadata="">
future =
conversationModelsClient
.createConversationModelEvaluationOperationCallable()
.futureCall(request);
// Do something.
ConversationModelEvaluation response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateConversationModelEvaluationRequest,ConversationModelEvaluation,CreateConversationModelEvaluationOperationMetadata> |
createConversationModelOperationCallable()
public final OperationCallable<CreateConversationModelRequest,ConversationModel,CreateConversationModelOperationMetadata> createConversationModelOperationCallable()
Creates a model.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
CreateConversationModelOperationMetadata
response
: ConversationModelSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { CreateConversationModelRequest request = CreateConversationModelRequest.newBuilder() .setParent("parent-995424086") .setConversationModel(ConversationModel.newBuilder().build()) .build(); OperationFuture<ConversationModel, CreateConversationModelOperationMetadata> future = conversationModelsClient.createConversationModelOperationCallable().futureCall(request); // Do something. ConversationModel response = future.get(); }
Returns | |
---|---|
Type | Description |
OperationCallable<CreateConversationModelRequest,ConversationModel,CreateConversationModelOperationMetadata> |
deleteConversationModelAsync(DeleteConversationModelRequest request)
public final OperationFuture<Empty,DeleteConversationModelOperationMetadata> deleteConversationModelAsync(DeleteConversationModelRequest request)
Deletes a model.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
DeleteConversationModelOperationMetadata
response
: An Empty messageSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { DeleteConversationModelRequest request = DeleteConversationModelRequest.newBuilder().setName("name3373707").build(); conversationModelsClient.deleteConversationModelAsync(request).get(); }
Parameter | |
---|---|
Name | Description |
request |
DeleteConversationModelRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,DeleteConversationModelOperationMetadata> |
deleteConversationModelAsync(String name)
public final OperationFuture<Empty,DeleteConversationModelOperationMetadata> deleteConversationModelAsync(String name)
Deletes a model.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
DeleteConversationModelOperationMetadata
response
: An Empty messageSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { String name = "name3373707"; conversationModelsClient.deleteConversationModelAsync(name).get(); }
Parameter | |
---|---|
Name | Description |
name |
String Required. The conversation model to delete. Format: |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,DeleteConversationModelOperationMetadata> |
deleteConversationModelCallable()
public final UnaryCallable<DeleteConversationModelRequest,Operation> deleteConversationModelCallable()
Deletes a model.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
DeleteConversationModelOperationMetadata
response
: An Empty messageSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { DeleteConversationModelRequest request = DeleteConversationModelRequest.newBuilder().setName("name3373707").build(); ApiFuture<Operation> future = conversationModelsClient.deleteConversationModelCallable().futureCall(request); // Do something. future.get(); }
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteConversationModelRequest,Operation> |
deleteConversationModelOperationCallable()
public final OperationCallable<DeleteConversationModelRequest,Empty,DeleteConversationModelOperationMetadata> deleteConversationModelOperationCallable()
Deletes a model.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
DeleteConversationModelOperationMetadata
response
: An Empty messageSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { DeleteConversationModelRequest request = DeleteConversationModelRequest.newBuilder().setName("name3373707").build(); OperationFuture<Empty, DeleteConversationModelOperationMetadata> future = conversationModelsClient.deleteConversationModelOperationCallable().futureCall(request); // Do something. future.get(); }
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteConversationModelRequest,Empty,DeleteConversationModelOperationMetadata> |
deployConversationModelAsync(DeployConversationModelRequest request)
public final OperationFuture<Empty,DeployConversationModelOperationMetadata> deployConversationModelAsync(DeployConversationModelRequest request)
Deploys a model. If a model is already deployed, deploying it has no effect. A model can only serve prediction requests after it gets deployed. For article suggestion, custom model will not be used unless it is deployed.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
DeployConversationModelOperationMetadata
response
: An Empty messageSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { DeployConversationModelRequest request = DeployConversationModelRequest.newBuilder().setName("name3373707").build(); conversationModelsClient.deployConversationModelAsync(request).get(); }
Parameter | |
---|---|
Name | Description |
request |
DeployConversationModelRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,DeployConversationModelOperationMetadata> |
deployConversationModelCallable()
public final UnaryCallable<DeployConversationModelRequest,Operation> deployConversationModelCallable()
Deploys a model. If a model is already deployed, deploying it has no effect. A model can only serve prediction requests after it gets deployed. For article suggestion, custom model will not be used unless it is deployed.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
DeployConversationModelOperationMetadata
response
: An Empty messageSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { DeployConversationModelRequest request = DeployConversationModelRequest.newBuilder().setName("name3373707").build(); ApiFuture<Operation> future = conversationModelsClient.deployConversationModelCallable().futureCall(request); // Do something. future.get(); }
Returns | |
---|---|
Type | Description |
UnaryCallable<DeployConversationModelRequest,Operation> |
deployConversationModelOperationCallable()
public final OperationCallable<DeployConversationModelRequest,Empty,DeployConversationModelOperationMetadata> deployConversationModelOperationCallable()
Deploys a model. If a model is already deployed, deploying it has no effect. A model can only serve prediction requests after it gets deployed. For article suggestion, custom model will not be used unless it is deployed.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
DeployConversationModelOperationMetadata
response
: An Empty messageSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { DeployConversationModelRequest request = DeployConversationModelRequest.newBuilder().setName("name3373707").build(); OperationFuture<Empty, DeployConversationModelOperationMetadata> future = conversationModelsClient.deployConversationModelOperationCallable().futureCall(request); // Do something. future.get(); }
Returns | |
---|---|
Type | Description |
OperationCallable<DeployConversationModelRequest,Empty,DeployConversationModelOperationMetadata> |
getConversationModel(GetConversationModelRequest request)
public final ConversationModel getConversationModel(GetConversationModelRequest request)
Gets conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
GetConversationModelRequest request =
GetConversationModelRequest.newBuilder().setName("name3373707").build();
ConversationModel response = conversationModelsClient.getConversationModel(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetConversationModelRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
ConversationModel |
getConversationModel(String name)
public final ConversationModel getConversationModel(String name)
Gets conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
String name = "name3373707";
ConversationModel response = conversationModelsClient.getConversationModel(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The conversation model to retrieve. Format: |
Returns | |
---|---|
Type | Description |
ConversationModel |
getConversationModelCallable()
public final UnaryCallable<GetConversationModelRequest,ConversationModel> getConversationModelCallable()
Gets conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
GetConversationModelRequest request =
GetConversationModelRequest.newBuilder().setName("name3373707").build();
ApiFuture<ConversationModel> future =
conversationModelsClient.getConversationModelCallable().futureCall(request);
// Do something.
ConversationModel response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetConversationModelRequest,ConversationModel> |
getConversationModelEvaluation(GetConversationModelEvaluationRequest request)
public final ConversationModelEvaluation getConversationModelEvaluation(GetConversationModelEvaluationRequest request)
Gets an evaluation of conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
GetConversationModelEvaluationRequest request =
GetConversationModelEvaluationRequest.newBuilder().setName("name3373707").build();
ConversationModelEvaluation response =
conversationModelsClient.getConversationModelEvaluation(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetConversationModelEvaluationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
ConversationModelEvaluation |
getConversationModelEvaluation(String name)
public final ConversationModelEvaluation getConversationModelEvaluation(String name)
Gets an evaluation of conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
String name = "name3373707";
ConversationModelEvaluation response =
conversationModelsClient.getConversationModelEvaluation(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The conversation model evaluation resource name. Format:
|
Returns | |
---|---|
Type | Description |
ConversationModelEvaluation |
getConversationModelEvaluationCallable()
public final UnaryCallable<GetConversationModelEvaluationRequest,ConversationModelEvaluation> getConversationModelEvaluationCallable()
Gets an evaluation of conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
GetConversationModelEvaluationRequest request =
GetConversationModelEvaluationRequest.newBuilder().setName("name3373707").build();
ApiFuture<ConversationModelEvaluation> future =
conversationModelsClient.getConversationModelEvaluationCallable().futureCall(request);
// Do something.
ConversationModelEvaluation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetConversationModelEvaluationRequest,ConversationModelEvaluation> |
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = conversationModelsClient.getLocation(request);
}
Parameter | |
---|---|
Name | Description |
request |
com.google.cloud.location.GetLocationRequest The 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
conversationModelsClient.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 ConversationModelsSettings getSettings()
Returns | |
---|---|
Type | Description |
ConversationModelsSettings |
getStub()
public ConversationModelsStub getStub()
Returns | |
---|---|
Type | Description |
ConversationModelsStub |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
listConversationModelEvaluations(ListConversationModelEvaluationsRequest request)
public final ConversationModelsClient.ListConversationModelEvaluationsPagedResponse listConversationModelEvaluations(ListConversationModelEvaluationsRequest request)
Lists evaluations of a conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
ListConversationModelEvaluationsRequest request =
ListConversationModelEvaluationsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (ConversationModelEvaluation element :
conversationModelsClient.listConversationModelEvaluations(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListConversationModelEvaluationsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
ConversationModelsClient.ListConversationModelEvaluationsPagedResponse |
listConversationModelEvaluations(String parent)
public final ConversationModelsClient.ListConversationModelEvaluationsPagedResponse listConversationModelEvaluations(String parent)
Lists evaluations of a conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
String parent = "parent-995424086";
for (ConversationModelEvaluation element :
conversationModelsClient.listConversationModelEvaluations(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. The conversation model resource name. Format: |
Returns | |
---|---|
Type | Description |
ConversationModelsClient.ListConversationModelEvaluationsPagedResponse |
listConversationModelEvaluationsCallable()
public final UnaryCallable<ListConversationModelEvaluationsRequest,ListConversationModelEvaluationsResponse> listConversationModelEvaluationsCallable()
Lists evaluations of a conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
ListConversationModelEvaluationsRequest request =
ListConversationModelEvaluationsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListConversationModelEvaluationsResponse response =
conversationModelsClient.listConversationModelEvaluationsCallable().call(request);
for (ConversationModelEvaluation element : response.getConversationModelEvaluationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListConversationModelEvaluationsRequest,ListConversationModelEvaluationsResponse> |
listConversationModelEvaluationsPagedCallable()
public final UnaryCallable<ListConversationModelEvaluationsRequest,ConversationModelsClient.ListConversationModelEvaluationsPagedResponse> listConversationModelEvaluationsPagedCallable()
Lists evaluations of a conversation model.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
ListConversationModelEvaluationsRequest request =
ListConversationModelEvaluationsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<ConversationModelEvaluation> future =
conversationModelsClient
.listConversationModelEvaluationsPagedCallable()
.futureCall(request);
// Do something.
for (ConversationModelEvaluation element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListConversationModelEvaluationsRequest,ListConversationModelEvaluationsPagedResponse> |
listConversationModels(ListConversationModelsRequest request)
public final ConversationModelsClient.ListConversationModelsPagedResponse listConversationModels(ListConversationModelsRequest request)
Lists conversation models.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
ListConversationModelsRequest request =
ListConversationModelsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (ConversationModel element :
conversationModelsClient.listConversationModels(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListConversationModelsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
ConversationModelsClient.ListConversationModelsPagedResponse |
listConversationModels(String parent)
public final ConversationModelsClient.ListConversationModelsPagedResponse listConversationModels(String parent)
Lists conversation models.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
String parent = "parent-995424086";
for (ConversationModel element :
conversationModelsClient.listConversationModels(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. The project to list all conversation models for. Format:
|
Returns | |
---|---|
Type | Description |
ConversationModelsClient.ListConversationModelsPagedResponse |
listConversationModelsCallable()
public final UnaryCallable<ListConversationModelsRequest,ListConversationModelsResponse> listConversationModelsCallable()
Lists conversation models.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
ListConversationModelsRequest request =
ListConversationModelsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListConversationModelsResponse response =
conversationModelsClient.listConversationModelsCallable().call(request);
for (ConversationModel element : response.getConversationModelsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListConversationModelsRequest,ListConversationModelsResponse> |
listConversationModelsPagedCallable()
public final UnaryCallable<ListConversationModelsRequest,ConversationModelsClient.ListConversationModelsPagedResponse> listConversationModelsPagedCallable()
Lists conversation models.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
ListConversationModelsRequest request =
ListConversationModelsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<ConversationModel> future =
conversationModelsClient.listConversationModelsPagedCallable().futureCall(request);
// Do something.
for (ConversationModel element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListConversationModelsRequest,ListConversationModelsPagedResponse> |
listLocations(ListLocationsRequest request)
public final ConversationModelsClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)
Lists information about the supported locations for this service.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : conversationModelsClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
com.google.cloud.location.ListLocationsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
ConversationModelsClient.ListLocationsPagedResponse |
listLocationsCallable()
public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
Lists information about the supported locations for this service.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
conversationModelsClient.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,ConversationModelsClient.ListLocationsPagedResponse> listLocationsPagedCallable()
Lists information about the supported locations for this service.
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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
conversationModelsClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
undeployConversationModelAsync(UndeployConversationModelRequest request)
public final OperationFuture<Empty,UndeployConversationModelOperationMetadata> undeployConversationModelAsync(UndeployConversationModelRequest request)
Undeploys a model. If the model is not deployed this method has no effect. If the model is currently being used: - For article suggestion, article suggestion will fallback to the default model if model is undeployed.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
UndeployConversationModelOperationMetadata
response
: An Empty messageSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { UndeployConversationModelRequest request = UndeployConversationModelRequest.newBuilder().setName("name3373707").build(); conversationModelsClient.undeployConversationModelAsync(request).get(); }
Parameter | |
---|---|
Name | Description |
request |
UndeployConversationModelRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,UndeployConversationModelOperationMetadata> |
undeployConversationModelCallable()
public final UnaryCallable<UndeployConversationModelRequest,Operation> undeployConversationModelCallable()
Undeploys a model. If the model is not deployed this method has no effect. If the model is currently being used: - For article suggestion, article suggestion will fallback to the default model if model is undeployed.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
UndeployConversationModelOperationMetadata
response
: An Empty messageSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { UndeployConversationModelRequest request = UndeployConversationModelRequest.newBuilder().setName("name3373707").build(); ApiFuture<Operation> future = conversationModelsClient.undeployConversationModelCallable().futureCall(request); // Do something. future.get(); }
Returns | |
---|---|
Type | Description |
UnaryCallable<UndeployConversationModelRequest,Operation> |
undeployConversationModelOperationCallable()
public final OperationCallable<UndeployConversationModelRequest,Empty,UndeployConversationModelOperationMetadata> undeployConversationModelOperationCallable()
Undeploys a model. If the model is not deployed this method has no effect. If the model is currently being used: - For article suggestion, article suggestion will fallback to the default model if model is undeployed.
This method is a long-running
operation. The
returned Operation
type has the following method-specific fields:
- metadata
:
UndeployConversationModelOperationMetadata
response
: An Empty messageSample 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 (ConversationModelsClient conversationModelsClient = ConversationModelsClient.create()) { UndeployConversationModelRequest request = UndeployConversationModelRequest.newBuilder().setName("name3373707").build(); OperationFuture<Empty, UndeployConversationModelOperationMetadata> future = conversationModelsClient.undeployConversationModelOperationCallable().futureCall(request); // Do something. future.get(); }
Returns | |
---|---|
Type | Description |
OperationCallable<UndeployConversationModelRequest,Empty,UndeployConversationModelOperationMetadata> |