@BetaApi @Generated(value="by gapic-generator-java") public class EngineServiceClient 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
Engine engine = Engine.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Engine response = engineServiceClient.updateEngine(engine, updateMask);
}
Note: close() needs to be called on the EngineServiceClient 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 |
|---|---|---|
CreateEngine |
Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteEngine |
Deletes a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateEngine |
Updates an [Engine][google.cloud.discoveryengine.v1alpha.Engine] |
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.
|
GetEngine |
Gets a [Engine][google.cloud.discoveryengine.v1alpha.Engine]. |
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.
|
ListEngines |
Lists all the [Engine][google.cloud.discoveryengine.v1alpha.Engine]s associated with the project. |
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.
|
PauseEngine |
Pauses the training of an existing engine. Only applicable if [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. |
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.
|
ResumeEngine |
Resumes the training of an existing engine. Only applicable if [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. |
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.
|
TuneEngine |
Tunes an existing engine. Only applicable if [SolutionType][google.cloud.discoveryengine.v1alpha.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. |
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 `OperationFuture`, which is used to track polling of the service.
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 EngineServiceSettings 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
EngineServiceSettings engineServiceSettings =
EngineServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
EngineServiceClient engineServiceClient = EngineServiceClient.create(engineServiceSettings);
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
EngineServiceSettings engineServiceSettings =
EngineServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
EngineServiceClient engineServiceClient = EngineServiceClient.create(engineServiceSettings);
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
EngineServiceSettings engineServiceSettings =
EngineServiceSettings.newHttpJsonBuilder().build();
EngineServiceClient engineServiceClient = EngineServiceClient.create(engineServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
EngineServiceClient.ListEnginesFixedSizeCollection |
static class |
EngineServiceClient.ListEnginesPage |
static class |
EngineServiceClient.ListEnginesPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
EngineServiceClient(EngineServiceSettings settings)
Constructs an instance of EngineServiceClient, using the given settings.
|
protected |
EngineServiceClient(EngineServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static EngineServiceClient |
create()
Constructs an instance of EngineServiceClient with default settings.
|
static EngineServiceClient |
create(EngineServiceSettings settings)
Constructs an instance of EngineServiceClient, using the given settings.
|
static EngineServiceClient |
create(EngineServiceStub stub)
Constructs an instance of EngineServiceClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<Engine,CreateEngineMetadata> |
createEngineAsync(CollectionName parent,
Engine engine,
String engineId)
Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
com.google.api.gax.longrunning.OperationFuture<Engine,CreateEngineMetadata> |
createEngineAsync(CreateEngineRequest request)
Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
com.google.api.gax.longrunning.OperationFuture<Engine,CreateEngineMetadata> |
createEngineAsync(String parent,
Engine engine,
String engineId)
Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
com.google.api.gax.rpc.UnaryCallable<CreateEngineRequest,com.google.longrunning.Operation> |
createEngineCallable()
Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
com.google.api.gax.rpc.OperationCallable<CreateEngineRequest,Engine,CreateEngineMetadata> |
createEngineOperationCallable()
Creates a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteEngineMetadata> |
deleteEngineAsync(DeleteEngineRequest request)
Deletes a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteEngineMetadata> |
deleteEngineAsync(EngineName name)
Deletes a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteEngineMetadata> |
deleteEngineAsync(String name)
Deletes a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
com.google.api.gax.rpc.UnaryCallable<DeleteEngineRequest,com.google.longrunning.Operation> |
deleteEngineCallable()
Deletes a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
com.google.api.gax.rpc.OperationCallable<DeleteEngineRequest,com.google.protobuf.Empty,DeleteEngineMetadata> |
deleteEngineOperationCallable()
Deletes a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
Engine |
getEngine(EngineName name)
Gets a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
Engine |
getEngine(GetEngineRequest request)
Gets a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
Engine |
getEngine(String name)
Gets a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
com.google.api.gax.rpc.UnaryCallable<GetEngineRequest,Engine> |
getEngineCallable()
Gets a [Engine][google.cloud.discoveryengine.v1alpha.Engine].
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
EngineServiceSettings |
getSettings() |
EngineServiceStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
EngineServiceClient.ListEnginesPagedResponse |
listEngines(CollectionName parent)
Lists all the [Engine][google.cloud.discoveryengine.v1alpha.Engine]s associated with the
project.
|
EngineServiceClient.ListEnginesPagedResponse |
listEngines(ListEnginesRequest request)
Lists all the [Engine][google.cloud.discoveryengine.v1alpha.Engine]s associated with the
project.
|
EngineServiceClient.ListEnginesPagedResponse |
listEngines(String parent)
Lists all the [Engine][google.cloud.discoveryengine.v1alpha.Engine]s associated with the
project.
|
com.google.api.gax.rpc.UnaryCallable<ListEnginesRequest,ListEnginesResponse> |
listEnginesCallable()
Lists all the [Engine][google.cloud.discoveryengine.v1alpha.Engine]s associated with the
project.
|
com.google.api.gax.rpc.UnaryCallable<ListEnginesRequest,EngineServiceClient.ListEnginesPagedResponse> |
listEnginesPagedCallable()
Lists all the [Engine][google.cloud.discoveryengine.v1alpha.Engine]s associated with the
project.
|
Engine |
pauseEngine(EngineName name)
Pauses the training of an existing engine.
|
Engine |
pauseEngine(PauseEngineRequest request)
Pauses the training of an existing engine.
|
Engine |
pauseEngine(String name)
Pauses the training of an existing engine.
|
com.google.api.gax.rpc.UnaryCallable<PauseEngineRequest,Engine> |
pauseEngineCallable()
Pauses the training of an existing engine.
|
Engine |
resumeEngine(EngineName name)
Resumes the training of an existing engine.
|
Engine |
resumeEngine(ResumeEngineRequest request)
Resumes the training of an existing engine.
|
Engine |
resumeEngine(String name)
Resumes the training of an existing engine.
|
com.google.api.gax.rpc.UnaryCallable<ResumeEngineRequest,Engine> |
resumeEngineCallable()
Resumes the training of an existing engine.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<TuneEngineResponse,TuneEngineMetadata> |
tuneEngineAsync(EngineName name)
Tunes an existing engine.
|
com.google.api.gax.longrunning.OperationFuture<TuneEngineResponse,TuneEngineMetadata> |
tuneEngineAsync(String name)
Tunes an existing engine.
|
com.google.api.gax.longrunning.OperationFuture<TuneEngineResponse,TuneEngineMetadata> |
tuneEngineAsync(TuneEngineRequest request)
Tunes an existing engine.
|
com.google.api.gax.rpc.UnaryCallable<TuneEngineRequest,com.google.longrunning.Operation> |
tuneEngineCallable()
Tunes an existing engine.
|
com.google.api.gax.rpc.OperationCallable<TuneEngineRequest,TuneEngineResponse,TuneEngineMetadata> |
tuneEngineOperationCallable()
Tunes an existing engine.
|
Engine |
updateEngine(Engine engine,
com.google.protobuf.FieldMask updateMask)
Updates an [Engine][google.cloud.discoveryengine.v1alpha.Engine]
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
Engine engine = Engine.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Engine response = engineServiceClient.updateEngine(engine, updateMask);
}
|
Engine |
updateEngine(UpdateEngineRequest request)
Updates an [Engine][google.cloud.discoveryengine.v1alpha.Engine]
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
UpdateEngineRequest request =
UpdateEngineRequest.newBuilder()
.setEngine(Engine.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Engine response = engineServiceClient.updateEngine(request);
}
|
com.google.api.gax.rpc.UnaryCallable<UpdateEngineRequest,Engine> |
updateEngineCallable()
Updates an [Engine][google.cloud.discoveryengine.v1alpha.Engine]
Sample code:
{@code
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
UpdateEngineRequest request =
UpdateEngineRequest.newBuilder()
.setEngine(Engine.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture
|
protected EngineServiceClient(EngineServiceSettings settings) throws IOException
IOExceptionprotected EngineServiceClient(EngineServiceStub stub)
public static final EngineServiceClient create() throws IOException
IOExceptionpublic static final EngineServiceClient create(EngineServiceSettings settings) throws IOException
IOExceptionpublic static final EngineServiceClient create(EngineServiceStub stub)
public final EngineServiceSettings getSettings()
public EngineServiceStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final com.google.api.gax.longrunning.OperationFuture<Engine,CreateEngineMetadata> createEngineAsync(CollectionName parent, Engine engine, String engineId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
CollectionName parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]");
Engine engine = Engine.newBuilder().build();
String engineId = "engineId1820490493";
Engine response = engineServiceClient.createEngineAsync(parent, engine, engineId).get();
}
parent - Required. The parent resource name, such as
`projects/{project}/locations/{location}/collections/{collection}`.engine - Required. The [Engine][google.cloud.discoveryengine.v1alpha.Engine] to create.engineId - Required. The ID to use for the
[Engine][google.cloud.discoveryengine.v1alpha.Engine], which will become the final
component of the [Engine][google.cloud.discoveryengine.v1alpha.Engine]'s resource name.
This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Engine,CreateEngineMetadata> createEngineAsync(String parent, Engine engine, String engineId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
String parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString();
Engine engine = Engine.newBuilder().build();
String engineId = "engineId1820490493";
Engine response = engineServiceClient.createEngineAsync(parent, engine, engineId).get();
}
parent - Required. The parent resource name, such as
`projects/{project}/locations/{location}/collections/{collection}`.engine - Required. The [Engine][google.cloud.discoveryengine.v1alpha.Engine] to create.engineId - Required. The ID to use for the
[Engine][google.cloud.discoveryengine.v1alpha.Engine], which will become the final
component of the [Engine][google.cloud.discoveryengine.v1alpha.Engine]'s resource name.
This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Engine,CreateEngineMetadata> createEngineAsync(CreateEngineRequest 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
CreateEngineRequest request =
CreateEngineRequest.newBuilder()
.setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
.setEngine(Engine.newBuilder().build())
.setEngineId("engineId1820490493")
.build();
Engine response = engineServiceClient.createEngineAsync(request).get();
}
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.OperationCallable<CreateEngineRequest,Engine,CreateEngineMetadata> createEngineOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
CreateEngineRequest request =
CreateEngineRequest.newBuilder()
.setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
.setEngine(Engine.newBuilder().build())
.setEngineId("engineId1820490493")
.build();
OperationFuture<Engine, CreateEngineMetadata> future =
engineServiceClient.createEngineOperationCallable().futureCall(request);
// Do something.
Engine response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateEngineRequest,com.google.longrunning.Operation> createEngineCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
CreateEngineRequest request =
CreateEngineRequest.newBuilder()
.setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
.setEngine(Engine.newBuilder().build())
.setEngineId("engineId1820490493")
.build();
ApiFuture<Operation> future = engineServiceClient.createEngineCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteEngineMetadata> deleteEngineAsync(EngineName 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
EngineName name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
engineServiceClient.deleteEngineAsync(name).get();
}
name - Required. Full resource name of
[Engine][google.cloud.discoveryengine.v1alpha.Engine], such as
`projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
If the caller does not have permission to delete the [Engine][google.cloud.discoveryengine.v1alpha.Engine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
If the [Engine][google.cloud.discoveryengine.v1alpha.Engine] to delete does not exist, a NOT_FOUND error is returned.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteEngineMetadata> deleteEngineAsync(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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
String name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString();
engineServiceClient.deleteEngineAsync(name).get();
}
name - Required. Full resource name of
[Engine][google.cloud.discoveryengine.v1alpha.Engine], such as
`projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
If the caller does not have permission to delete the [Engine][google.cloud.discoveryengine.v1alpha.Engine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
If the [Engine][google.cloud.discoveryengine.v1alpha.Engine] to delete does not exist, a NOT_FOUND error is returned.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteEngineMetadata> deleteEngineAsync(DeleteEngineRequest 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
DeleteEngineRequest request =
DeleteEngineRequest.newBuilder()
.setName(
EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
.build();
engineServiceClient.deleteEngineAsync(request).get();
}
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.OperationCallable<DeleteEngineRequest,com.google.protobuf.Empty,DeleteEngineMetadata> deleteEngineOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
DeleteEngineRequest request =
DeleteEngineRequest.newBuilder()
.setName(
EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
.build();
OperationFuture<Empty, DeleteEngineMetadata> future =
engineServiceClient.deleteEngineOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteEngineRequest,com.google.longrunning.Operation> deleteEngineCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
DeleteEngineRequest request =
DeleteEngineRequest.newBuilder()
.setName(
EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
.build();
ApiFuture<Operation> future = engineServiceClient.deleteEngineCallable().futureCall(request);
// Do something.
future.get();
}
public final Engine updateEngine(Engine engine, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
Engine engine = Engine.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Engine response = engineServiceClient.updateEngine(engine, updateMask);
}
engine - Required. The [Engine][google.cloud.discoveryengine.v1alpha.Engine] to update.
If the caller does not have permission to update the [Engine][google.cloud.discoveryengine.v1alpha.Engine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
If the [Engine][google.cloud.discoveryengine.v1alpha.Engine] to update does not exist, a NOT_FOUND error is returned.
updateMask - Indicates which fields in the provided
[Engine][google.cloud.discoveryengine.v1alpha.Engine] to update.
If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final Engine updateEngine(UpdateEngineRequest 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
UpdateEngineRequest request =
UpdateEngineRequest.newBuilder()
.setEngine(Engine.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Engine response = engineServiceClient.updateEngine(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<UpdateEngineRequest,Engine> updateEngineCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
UpdateEngineRequest request =
UpdateEngineRequest.newBuilder()
.setEngine(Engine.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Engine> future = engineServiceClient.updateEngineCallable().futureCall(request);
// Do something.
Engine response = future.get();
}
public final Engine getEngine(EngineName 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
EngineName name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
Engine response = engineServiceClient.getEngine(name);
}
name - Required. Full resource name of
[Engine][google.cloud.discoveryengine.v1alpha.Engine], such as
`projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Engine getEngine(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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
String name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString();
Engine response = engineServiceClient.getEngine(name);
}
name - Required. Full resource name of
[Engine][google.cloud.discoveryengine.v1alpha.Engine], such as
`projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Engine getEngine(GetEngineRequest 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
GetEngineRequest request =
GetEngineRequest.newBuilder()
.setName(
EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
.build();
Engine response = engineServiceClient.getEngine(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<GetEngineRequest,Engine> getEngineCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
GetEngineRequest request =
GetEngineRequest.newBuilder()
.setName(
EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
.build();
ApiFuture<Engine> future = engineServiceClient.getEngineCallable().futureCall(request);
// Do something.
Engine response = future.get();
}
public final EngineServiceClient.ListEnginesPagedResponse listEngines(CollectionName 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
CollectionName parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]");
for (Engine element : engineServiceClient.listEngines(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent resource name, such as
`projects/{project}/locations/{location}/collections/{collection_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final EngineServiceClient.ListEnginesPagedResponse listEngines(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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
String parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString();
for (Engine element : engineServiceClient.listEngines(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent resource name, such as
`projects/{project}/locations/{location}/collections/{collection_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final EngineServiceClient.ListEnginesPagedResponse listEngines(ListEnginesRequest 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
ListEnginesRequest request =
ListEnginesRequest.newBuilder()
.setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
for (Engine element : engineServiceClient.listEngines(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<ListEnginesRequest,EngineServiceClient.ListEnginesPagedResponse> listEnginesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
ListEnginesRequest request =
ListEnginesRequest.newBuilder()
.setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
ApiFuture<Engine> future = engineServiceClient.listEnginesPagedCallable().futureCall(request);
// Do something.
for (Engine element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListEnginesRequest,ListEnginesResponse> listEnginesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
ListEnginesRequest request =
ListEnginesRequest.newBuilder()
.setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.build();
while (true) {
ListEnginesResponse response = engineServiceClient.listEnginesCallable().call(request);
for (Engine element : response.getEnginesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Engine pauseEngine(EngineName 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
EngineName name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
Engine response = engineServiceClient.pauseEngine(name);
}
name - Required. The name of the engine to pause. Format:
`projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Engine pauseEngine(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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
String name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString();
Engine response = engineServiceClient.pauseEngine(name);
}
name - Required. The name of the engine to pause. Format:
`projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Engine pauseEngine(PauseEngineRequest 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
PauseEngineRequest request =
PauseEngineRequest.newBuilder()
.setName(
EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
.build();
Engine response = engineServiceClient.pauseEngine(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<PauseEngineRequest,Engine> pauseEngineCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
PauseEngineRequest request =
PauseEngineRequest.newBuilder()
.setName(
EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
.build();
ApiFuture<Engine> future = engineServiceClient.pauseEngineCallable().futureCall(request);
// Do something.
Engine response = future.get();
}
public final Engine resumeEngine(EngineName 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
EngineName name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
Engine response = engineServiceClient.resumeEngine(name);
}
name - Required. The name of the engine to resume. Format:
`projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Engine resumeEngine(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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
String name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString();
Engine response = engineServiceClient.resumeEngine(name);
}
name - Required. The name of the engine to resume. Format:
`projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Engine resumeEngine(ResumeEngineRequest 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
ResumeEngineRequest request =
ResumeEngineRequest.newBuilder()
.setName(
EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
.build();
Engine response = engineServiceClient.resumeEngine(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<ResumeEngineRequest,Engine> resumeEngineCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
ResumeEngineRequest request =
ResumeEngineRequest.newBuilder()
.setName(
EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
.build();
ApiFuture<Engine> future = engineServiceClient.resumeEngineCallable().futureCall(request);
// Do something.
Engine response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<TuneEngineResponse,TuneEngineMetadata> tuneEngineAsync(EngineName 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
EngineName name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
TuneEngineResponse response = engineServiceClient.tuneEngineAsync(name).get();
}
name - Required. The resource name of the engine to tune. Format:
`projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<TuneEngineResponse,TuneEngineMetadata> tuneEngineAsync(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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
String name = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString();
TuneEngineResponse response = engineServiceClient.tuneEngineAsync(name).get();
}
name - Required. The resource name of the engine to tune. Format:
`projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<TuneEngineResponse,TuneEngineMetadata> tuneEngineAsync(TuneEngineRequest 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
TuneEngineRequest request =
TuneEngineRequest.newBuilder()
.setName(
EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
.build();
TuneEngineResponse response = engineServiceClient.tuneEngineAsync(request).get();
}
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.OperationCallable<TuneEngineRequest,TuneEngineResponse,TuneEngineMetadata> tuneEngineOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
TuneEngineRequest request =
TuneEngineRequest.newBuilder()
.setName(
EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
.build();
OperationFuture<TuneEngineResponse, TuneEngineMetadata> future =
engineServiceClient.tuneEngineOperationCallable().futureCall(request);
// Do something.
TuneEngineResponse response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<TuneEngineRequest,com.google.longrunning.Operation> tuneEngineCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
TuneEngineRequest request =
TuneEngineRequest.newBuilder()
.setName(
EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
.build();
ApiFuture<Operation> future = engineServiceClient.tuneEngineCallable().futureCall(request);
// Do something.
Operation 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.