- 0.61.0 (latest)
- 0.60.0
- 0.59.0
- 0.58.0
- 0.56.0
- 0.55.0
- 0.54.0
- 0.53.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.4
- 0.8.10
public class PredictionApiKeyRegistryClient implements BackgroundResource
Service Description: Service for registering API keys for use with the predict
method. If you
use an API key to request predictions, you must first register the API key. Otherwise, your
prediction request is rejected. If you use OAuth to authenticate your predict
method call, you
do not need to register an API key. You can register up to 20 API keys per project.
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 (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
EventStoreName parent =
EventStoreName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]");
PredictionApiKeyRegistration predictionApiKeyRegistration =
PredictionApiKeyRegistration.newBuilder().build();
PredictionApiKeyRegistration response =
predictionApiKeyRegistryClient.createPredictionApiKeyRegistration(
parent, predictionApiKeyRegistration);
}
Note: close() needs to be called on the PredictionApiKeyRegistryClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns 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 PredictionApiKeyRegistrySettings 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
PredictionApiKeyRegistrySettings predictionApiKeyRegistrySettings =
PredictionApiKeyRegistrySettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create(predictionApiKeyRegistrySettings);
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
PredictionApiKeyRegistrySettings predictionApiKeyRegistrySettings =
PredictionApiKeyRegistrySettings.newBuilder().setEndpoint(myEndpoint).build();
PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create(predictionApiKeyRegistrySettings);
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
PredictionApiKeyRegistrySettings predictionApiKeyRegistrySettings =
PredictionApiKeyRegistrySettings.newHttpJsonBuilder().build();
PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create(predictionApiKeyRegistrySettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final PredictionApiKeyRegistryClient create()
Constructs an instance of PredictionApiKeyRegistryClient with default settings.
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistryClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(PredictionApiKeyRegistrySettings settings)
public static final PredictionApiKeyRegistryClient create(PredictionApiKeyRegistrySettings settings)
Constructs an instance of PredictionApiKeyRegistryClient, 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 | PredictionApiKeyRegistrySettings |
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistryClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(PredictionApiKeyRegistryStub stub)
public static final PredictionApiKeyRegistryClient create(PredictionApiKeyRegistryStub stub)
Constructs an instance of PredictionApiKeyRegistryClient, using the given stub for making calls. This is for advanced usage - prefer using create(PredictionApiKeyRegistrySettings).
Parameter | |
---|---|
Name | Description |
stub | PredictionApiKeyRegistryStub |
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistryClient |
Constructors
PredictionApiKeyRegistryClient(PredictionApiKeyRegistrySettings settings)
protected PredictionApiKeyRegistryClient(PredictionApiKeyRegistrySettings settings)
Constructs an instance of PredictionApiKeyRegistryClient, 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 | PredictionApiKeyRegistrySettings |
PredictionApiKeyRegistryClient(PredictionApiKeyRegistryStub stub)
protected PredictionApiKeyRegistryClient(PredictionApiKeyRegistryStub stub)
Parameter | |
---|---|
Name | Description |
stub | PredictionApiKeyRegistryStub |
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()
createPredictionApiKeyRegistration(CreatePredictionApiKeyRegistrationRequest request)
public final PredictionApiKeyRegistration createPredictionApiKeyRegistration(CreatePredictionApiKeyRegistrationRequest request)
Register an API key for use with predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
CreatePredictionApiKeyRegistrationRequest request =
CreatePredictionApiKeyRegistrationRequest.newBuilder()
.setParent(
EventStoreName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]")
.toString())
.setPredictionApiKeyRegistration(PredictionApiKeyRegistration.newBuilder().build())
.build();
PredictionApiKeyRegistration response =
predictionApiKeyRegistryClient.createPredictionApiKeyRegistration(request);
}
Parameter | |
---|---|
Name | Description |
request | CreatePredictionApiKeyRegistrationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistration |
createPredictionApiKeyRegistration(EventStoreName parent, PredictionApiKeyRegistration predictionApiKeyRegistration)
public final PredictionApiKeyRegistration createPredictionApiKeyRegistration(EventStoreName parent, PredictionApiKeyRegistration predictionApiKeyRegistration)
Register an API key for use with predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
EventStoreName parent =
EventStoreName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]");
PredictionApiKeyRegistration predictionApiKeyRegistration =
PredictionApiKeyRegistration.newBuilder().build();
PredictionApiKeyRegistration response =
predictionApiKeyRegistryClient.createPredictionApiKeyRegistration(
parent, predictionApiKeyRegistration);
}
Parameters | |
---|---|
Name | Description |
parent | EventStoreName Required. The parent resource path.
|
predictionApiKeyRegistration | PredictionApiKeyRegistration Required. The prediction API key registration. |
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistration |
createPredictionApiKeyRegistration(String parent, PredictionApiKeyRegistration predictionApiKeyRegistration)
public final PredictionApiKeyRegistration createPredictionApiKeyRegistration(String parent, PredictionApiKeyRegistration predictionApiKeyRegistration)
Register an API key for use with predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
String parent =
EventStoreName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]").toString();
PredictionApiKeyRegistration predictionApiKeyRegistration =
PredictionApiKeyRegistration.newBuilder().build();
PredictionApiKeyRegistration response =
predictionApiKeyRegistryClient.createPredictionApiKeyRegistration(
parent, predictionApiKeyRegistration);
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent resource path.
|
predictionApiKeyRegistration | PredictionApiKeyRegistration Required. The prediction API key registration. |
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistration |
createPredictionApiKeyRegistrationCallable()
public final UnaryCallable<CreatePredictionApiKeyRegistrationRequest,PredictionApiKeyRegistration> createPredictionApiKeyRegistrationCallable()
Register an API key for use with predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
CreatePredictionApiKeyRegistrationRequest request =
CreatePredictionApiKeyRegistrationRequest.newBuilder()
.setParent(
EventStoreName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]")
.toString())
.setPredictionApiKeyRegistration(PredictionApiKeyRegistration.newBuilder().build())
.build();
ApiFuture<PredictionApiKeyRegistration> future =
predictionApiKeyRegistryClient
.createPredictionApiKeyRegistrationCallable()
.futureCall(request);
// Do something.
PredictionApiKeyRegistration response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreatePredictionApiKeyRegistrationRequest,PredictionApiKeyRegistration> |
deletePredictionApiKeyRegistration(DeletePredictionApiKeyRegistrationRequest request)
public final void deletePredictionApiKeyRegistration(DeletePredictionApiKeyRegistrationRequest request)
Unregister an apiKey from using for predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
DeletePredictionApiKeyRegistrationRequest request =
DeletePredictionApiKeyRegistrationRequest.newBuilder()
.setName(
PredictionApiKeyRegistrationName.of(
"[PROJECT]",
"[LOCATION]",
"[CATALOG]",
"[EVENT_STORE]",
"[PREDICTION_API_KEY_REGISTRATION]")
.toString())
.build();
predictionApiKeyRegistryClient.deletePredictionApiKeyRegistration(request);
}
Parameter | |
---|---|
Name | Description |
request | DeletePredictionApiKeyRegistrationRequest The request object containing all of the parameters for the API call. |
deletePredictionApiKeyRegistration(PredictionApiKeyRegistrationName name)
public final void deletePredictionApiKeyRegistration(PredictionApiKeyRegistrationName name)
Unregister an apiKey from using for predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
PredictionApiKeyRegistrationName name =
PredictionApiKeyRegistrationName.of(
"[PROJECT]",
"[LOCATION]",
"[CATALOG]",
"[EVENT_STORE]",
"[PREDICTION_API_KEY_REGISTRATION]");
predictionApiKeyRegistryClient.deletePredictionApiKeyRegistration(name);
}
Parameter | |
---|---|
Name | Description |
name | PredictionApiKeyRegistrationName Required. The API key to unregister including full resource path.
|
deletePredictionApiKeyRegistration(String name)
public final void deletePredictionApiKeyRegistration(String name)
Unregister an apiKey from using for predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
String name =
PredictionApiKeyRegistrationName.of(
"[PROJECT]",
"[LOCATION]",
"[CATALOG]",
"[EVENT_STORE]",
"[PREDICTION_API_KEY_REGISTRATION]")
.toString();
predictionApiKeyRegistryClient.deletePredictionApiKeyRegistration(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The API key to unregister including full resource path.
|
deletePredictionApiKeyRegistrationCallable()
public final UnaryCallable<DeletePredictionApiKeyRegistrationRequest,Empty> deletePredictionApiKeyRegistrationCallable()
Unregister an apiKey from using for predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
DeletePredictionApiKeyRegistrationRequest request =
DeletePredictionApiKeyRegistrationRequest.newBuilder()
.setName(
PredictionApiKeyRegistrationName.of(
"[PROJECT]",
"[LOCATION]",
"[CATALOG]",
"[EVENT_STORE]",
"[PREDICTION_API_KEY_REGISTRATION]")
.toString())
.build();
ApiFuture<Empty> future =
predictionApiKeyRegistryClient
.deletePredictionApiKeyRegistrationCallable()
.futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeletePredictionApiKeyRegistrationRequest,Empty> |
getSettings()
public final PredictionApiKeyRegistrySettings getSettings()
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistrySettings |
getStub()
public PredictionApiKeyRegistryStub getStub()
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistryStub |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
listPredictionApiKeyRegistrations(EventStoreName parent)
public final PredictionApiKeyRegistryClient.ListPredictionApiKeyRegistrationsPagedResponse listPredictionApiKeyRegistrations(EventStoreName parent)
List the registered apiKeys for use with predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
EventStoreName parent =
EventStoreName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]");
for (PredictionApiKeyRegistration element :
predictionApiKeyRegistryClient.listPredictionApiKeyRegistrations(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent | EventStoreName Required. The parent placement resource name such as
|
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistryClient.ListPredictionApiKeyRegistrationsPagedResponse |
listPredictionApiKeyRegistrations(ListPredictionApiKeyRegistrationsRequest request)
public final PredictionApiKeyRegistryClient.ListPredictionApiKeyRegistrationsPagedResponse listPredictionApiKeyRegistrations(ListPredictionApiKeyRegistrationsRequest request)
List the registered apiKeys for use with predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
ListPredictionApiKeyRegistrationsRequest request =
ListPredictionApiKeyRegistrationsRequest.newBuilder()
.setParent(
EventStoreName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (PredictionApiKeyRegistration element :
predictionApiKeyRegistryClient.listPredictionApiKeyRegistrations(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request | ListPredictionApiKeyRegistrationsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistryClient.ListPredictionApiKeyRegistrationsPagedResponse |
listPredictionApiKeyRegistrations(String parent)
public final PredictionApiKeyRegistryClient.ListPredictionApiKeyRegistrationsPagedResponse listPredictionApiKeyRegistrations(String parent)
List the registered apiKeys for use with predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
String parent =
EventStoreName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]").toString();
for (PredictionApiKeyRegistration element :
predictionApiKeyRegistryClient.listPredictionApiKeyRegistrations(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent | String Required. The parent placement resource name such as
|
Returns | |
---|---|
Type | Description |
PredictionApiKeyRegistryClient.ListPredictionApiKeyRegistrationsPagedResponse |
listPredictionApiKeyRegistrationsCallable()
public final UnaryCallable<ListPredictionApiKeyRegistrationsRequest,ListPredictionApiKeyRegistrationsResponse> listPredictionApiKeyRegistrationsCallable()
List the registered apiKeys for use with predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
ListPredictionApiKeyRegistrationsRequest request =
ListPredictionApiKeyRegistrationsRequest.newBuilder()
.setParent(
EventStoreName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListPredictionApiKeyRegistrationsResponse response =
predictionApiKeyRegistryClient
.listPredictionApiKeyRegistrationsCallable()
.call(request);
for (PredictionApiKeyRegistration element :
response.getPredictionApiKeyRegistrationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListPredictionApiKeyRegistrationsRequest,ListPredictionApiKeyRegistrationsResponse> |
listPredictionApiKeyRegistrationsPagedCallable()
public final UnaryCallable<ListPredictionApiKeyRegistrationsRequest,PredictionApiKeyRegistryClient.ListPredictionApiKeyRegistrationsPagedResponse> listPredictionApiKeyRegistrationsPagedCallable()
List the registered apiKeys for use with predict method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (PredictionApiKeyRegistryClient predictionApiKeyRegistryClient =
PredictionApiKeyRegistryClient.create()) {
ListPredictionApiKeyRegistrationsRequest request =
ListPredictionApiKeyRegistrationsRequest.newBuilder()
.setParent(
EventStoreName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[EVENT_STORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<PredictionApiKeyRegistration> future =
predictionApiKeyRegistryClient
.listPredictionApiKeyRegistrationsPagedCallable()
.futureCall(request);
// Do something.
for (PredictionApiKeyRegistration element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListPredictionApiKeyRegistrationsRequest,ListPredictionApiKeyRegistrationsPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()