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: * *
{@code
* try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceClient.java
index c4424c20f..35ff8a17d 100644
--- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceClient.java
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/EndpointServiceClient.java
@@ -42,8 +42,10 @@
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
- * 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:
+ * Service Description: A service for managing Vertex AI's Endpoints.
+ *
+ * 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:
*
*
{@code
* try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointServiceClient.java
new file mode 100644
index 000000000..261e47b91
--- /dev/null
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointServiceClient.java
@@ -0,0 +1,1186 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.aiplatform.v1;
+
+import com.google.api.core.ApiFuture;
+import com.google.api.core.ApiFutures;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.api.gax.paging.AbstractFixedSizeCollection;
+import com.google.api.gax.paging.AbstractPage;
+import com.google.api.gax.paging.AbstractPagedListResponse;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.aiplatform.v1.stub.IndexEndpointServiceStub;
+import com.google.cloud.aiplatform.v1.stub.IndexEndpointServiceStubSettings;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.longrunning.Operation;
+import com.google.longrunning.OperationsClient;
+import com.google.protobuf.Empty;
+import com.google.protobuf.FieldMask;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: A service for managing Vertex AI's IndexEndpoints.
+ *
+ * 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:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]");
+ * IndexEndpoint response = indexEndpointServiceClient.getIndexEndpoint(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the IndexEndpointServiceClient 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 IndexEndpointServiceSettings
+ * to create(). For example:
+ *
+ *
To customize credentials:
+ *
+ *
{@code
+ * IndexEndpointServiceSettings indexEndpointServiceSettings =
+ * IndexEndpointServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create(indexEndpointServiceSettings);
+ * }
+ *
+ * To customize the endpoint:
+ *
+ *
{@code
+ * IndexEndpointServiceSettings indexEndpointServiceSettings =
+ * IndexEndpointServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create(indexEndpointServiceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class IndexEndpointServiceClient implements BackgroundResource {
+ private final IndexEndpointServiceSettings settings;
+ private final IndexEndpointServiceStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of IndexEndpointServiceClient with default settings. */
+ public static final IndexEndpointServiceClient create() throws IOException {
+ return create(IndexEndpointServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of IndexEndpointServiceClient, using the given settings. The channels
+ * are created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final IndexEndpointServiceClient create(IndexEndpointServiceSettings settings)
+ throws IOException {
+ return new IndexEndpointServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of IndexEndpointServiceClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(IndexEndpointServiceSettings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final IndexEndpointServiceClient create(IndexEndpointServiceStub stub) {
+ return new IndexEndpointServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of IndexEndpointServiceClient, 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.
+ */
+ protected IndexEndpointServiceClient(IndexEndpointServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((IndexEndpointServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected IndexEndpointServiceClient(IndexEndpointServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final IndexEndpointServiceSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public IndexEndpointServiceStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an IndexEndpoint.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build();
+ * IndexEndpoint response =
+ * indexEndpointServiceClient.createIndexEndpointAsync(parent, indexEndpoint).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location to create the IndexEndpoint in.
+ * Format: `projects/{project}/locations/{location}`
+ * @param indexEndpoint Required. The IndexEndpoint to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ createIndexEndpointAsync(LocationName parent, IndexEndpoint indexEndpoint) {
+ CreateIndexEndpointRequest request =
+ CreateIndexEndpointRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setIndexEndpoint(indexEndpoint)
+ .build();
+ return createIndexEndpointAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build();
+ * IndexEndpoint response =
+ * indexEndpointServiceClient.createIndexEndpointAsync(parent, indexEndpoint).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location to create the IndexEndpoint in.
+ * Format: `projects/{project}/locations/{location}`
+ * @param indexEndpoint Required. The IndexEndpoint to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ createIndexEndpointAsync(String parent, IndexEndpoint indexEndpoint) {
+ CreateIndexEndpointRequest request =
+ CreateIndexEndpointRequest.newBuilder()
+ .setParent(parent)
+ .setIndexEndpoint(indexEndpoint)
+ .build();
+ return createIndexEndpointAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * CreateIndexEndpointRequest request =
+ * CreateIndexEndpointRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setIndexEndpoint(IndexEndpoint.newBuilder().build())
+ * .build();
+ * IndexEndpoint response = indexEndpointServiceClient.createIndexEndpointAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ createIndexEndpointAsync(CreateIndexEndpointRequest request) {
+ return createIndexEndpointOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * CreateIndexEndpointRequest request =
+ * CreateIndexEndpointRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setIndexEndpoint(IndexEndpoint.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * indexEndpointServiceClient.createIndexEndpointOperationCallable().futureCall(request);
+ * // Do something.
+ * IndexEndpoint response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointOperationMetadata>
+ createIndexEndpointOperationCallable() {
+ return stub.createIndexEndpointOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * CreateIndexEndpointRequest request =
+ * CreateIndexEndpointRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setIndexEndpoint(IndexEndpoint.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * indexEndpointServiceClient.createIndexEndpointCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable createIndexEndpointCallable() {
+ return stub.createIndexEndpointCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]");
+ * IndexEndpoint response = indexEndpointServiceClient.getIndexEndpoint(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the IndexEndpoint resource. Format:
+ * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final IndexEndpoint getIndexEndpoint(IndexEndpointName name) {
+ GetIndexEndpointRequest request =
+ GetIndexEndpointRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getIndexEndpoint(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * String name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString();
+ * IndexEndpoint response = indexEndpointServiceClient.getIndexEndpoint(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the IndexEndpoint resource. Format:
+ * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final IndexEndpoint getIndexEndpoint(String name) {
+ GetIndexEndpointRequest request = GetIndexEndpointRequest.newBuilder().setName(name).build();
+ return getIndexEndpoint(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * GetIndexEndpointRequest request =
+ * GetIndexEndpointRequest.newBuilder()
+ * .setName(
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+ * .build();
+ * IndexEndpoint response = indexEndpointServiceClient.getIndexEndpoint(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final IndexEndpoint getIndexEndpoint(GetIndexEndpointRequest request) {
+ return getIndexEndpointCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * GetIndexEndpointRequest request =
+ * GetIndexEndpointRequest.newBuilder()
+ * .setName(
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+ * .build();
+ * ApiFuture future =
+ * indexEndpointServiceClient.getIndexEndpointCallable().futureCall(request);
+ * // Do something.
+ * IndexEndpoint response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getIndexEndpointCallable() {
+ return stub.getIndexEndpointCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists IndexEndpoints in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (IndexEndpoint element :
+ * indexEndpointServiceClient.listIndexEndpoints(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location from which to list the
+ * IndexEndpoints. Format: `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListIndexEndpointsPagedResponse listIndexEndpoints(LocationName parent) {
+ ListIndexEndpointsRequest request =
+ ListIndexEndpointsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listIndexEndpoints(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists IndexEndpoints in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (IndexEndpoint element :
+ * indexEndpointServiceClient.listIndexEndpoints(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location from which to list the
+ * IndexEndpoints. Format: `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListIndexEndpointsPagedResponse listIndexEndpoints(String parent) {
+ ListIndexEndpointsRequest request =
+ ListIndexEndpointsRequest.newBuilder().setParent(parent).build();
+ return listIndexEndpoints(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists IndexEndpoints in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * ListIndexEndpointsRequest request =
+ * ListIndexEndpointsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * for (IndexEndpoint element :
+ * indexEndpointServiceClient.listIndexEndpoints(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListIndexEndpointsPagedResponse listIndexEndpoints(
+ ListIndexEndpointsRequest request) {
+ return listIndexEndpointsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists IndexEndpoints in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * ListIndexEndpointsRequest request =
+ * ListIndexEndpointsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * indexEndpointServiceClient.listIndexEndpointsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (IndexEndpoint element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listIndexEndpointsPagedCallable() {
+ return stub.listIndexEndpointsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists IndexEndpoints in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * ListIndexEndpointsRequest request =
+ * ListIndexEndpointsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * while (true) {
+ * ListIndexEndpointsResponse response =
+ * indexEndpointServiceClient.listIndexEndpointsCallable().call(request);
+ * for (IndexEndpoint element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listIndexEndpointsCallable() {
+ return stub.listIndexEndpointsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * IndexEndpoint indexEndpoint = IndexEndpoint.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * IndexEndpoint response =
+ * indexEndpointServiceClient.updateIndexEndpoint(indexEndpoint, updateMask);
+ * }
+ * }
+ *
+ * @param indexEndpoint Required. The IndexEndpoint which replaces the resource on the server.
+ * @param updateMask Required. The update mask applies to the resource. See
+ * [google.protobuf.FieldMask][google.protobuf.FieldMask].
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final IndexEndpoint updateIndexEndpoint(
+ IndexEndpoint indexEndpoint, FieldMask updateMask) {
+ UpdateIndexEndpointRequest request =
+ UpdateIndexEndpointRequest.newBuilder()
+ .setIndexEndpoint(indexEndpoint)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateIndexEndpoint(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * UpdateIndexEndpointRequest request =
+ * UpdateIndexEndpointRequest.newBuilder()
+ * .setIndexEndpoint(IndexEndpoint.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * IndexEndpoint response = indexEndpointServiceClient.updateIndexEndpoint(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final IndexEndpoint updateIndexEndpoint(UpdateIndexEndpointRequest request) {
+ return updateIndexEndpointCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * UpdateIndexEndpointRequest request =
+ * UpdateIndexEndpointRequest.newBuilder()
+ * .setIndexEndpoint(IndexEndpoint.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * indexEndpointServiceClient.updateIndexEndpointCallable().futureCall(request);
+ * // Do something.
+ * IndexEndpoint response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ updateIndexEndpointCallable() {
+ return stub.updateIndexEndpointCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]");
+ * indexEndpointServiceClient.deleteIndexEndpointAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the IndexEndpoint resource to be deleted. Format:
+ * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteIndexEndpointAsync(
+ IndexEndpointName name) {
+ DeleteIndexEndpointRequest request =
+ DeleteIndexEndpointRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return deleteIndexEndpointAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * String name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString();
+ * indexEndpointServiceClient.deleteIndexEndpointAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the IndexEndpoint resource to be deleted. Format:
+ * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteIndexEndpointAsync(
+ String name) {
+ DeleteIndexEndpointRequest request =
+ DeleteIndexEndpointRequest.newBuilder().setName(name).build();
+ return deleteIndexEndpointAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * DeleteIndexEndpointRequest request =
+ * DeleteIndexEndpointRequest.newBuilder()
+ * .setName(
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+ * .build();
+ * indexEndpointServiceClient.deleteIndexEndpointAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteIndexEndpointAsync(
+ DeleteIndexEndpointRequest request) {
+ return deleteIndexEndpointOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * DeleteIndexEndpointRequest request =
+ * DeleteIndexEndpointRequest.newBuilder()
+ * .setName(
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+ * .build();
+ * OperationFuture future =
+ * indexEndpointServiceClient.deleteIndexEndpointOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deleteIndexEndpointOperationCallable() {
+ return stub.deleteIndexEndpointOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an IndexEndpoint.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * DeleteIndexEndpointRequest request =
+ * DeleteIndexEndpointRequest.newBuilder()
+ * .setName(
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+ * .build();
+ * ApiFuture future =
+ * indexEndpointServiceClient.deleteIndexEndpointCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteIndexEndpointCallable() {
+ return stub.deleteIndexEndpointCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deploys an Index into this IndexEndpoint, creating a DeployedIndex within it. Only non-empty
+ * Indexes can be deployed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * IndexEndpointName indexEndpoint =
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]");
+ * DeployedIndex deployedIndex = DeployedIndex.newBuilder().build();
+ * DeployIndexResponse response =
+ * indexEndpointServiceClient.deployIndexAsync(indexEndpoint, deployedIndex).get();
+ * }
+ * }
+ *
+ * @param indexEndpoint Required. The name of the IndexEndpoint resource into which to deploy an
+ * Index. Format: `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+ * @param deployedIndex Required. The DeployedIndex to be created within the IndexEndpoint.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deployIndexAsync(
+ IndexEndpointName indexEndpoint, DeployedIndex deployedIndex) {
+ DeployIndexRequest request =
+ DeployIndexRequest.newBuilder()
+ .setIndexEndpoint(indexEndpoint == null ? null : indexEndpoint.toString())
+ .setDeployedIndex(deployedIndex)
+ .build();
+ return deployIndexAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deploys an Index into this IndexEndpoint, creating a DeployedIndex within it. Only non-empty
+ * Indexes can be deployed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * String indexEndpoint =
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString();
+ * DeployedIndex deployedIndex = DeployedIndex.newBuilder().build();
+ * DeployIndexResponse response =
+ * indexEndpointServiceClient.deployIndexAsync(indexEndpoint, deployedIndex).get();
+ * }
+ * }
+ *
+ * @param indexEndpoint Required. The name of the IndexEndpoint resource into which to deploy an
+ * Index. Format: `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+ * @param deployedIndex Required. The DeployedIndex to be created within the IndexEndpoint.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deployIndexAsync(
+ String indexEndpoint, DeployedIndex deployedIndex) {
+ DeployIndexRequest request =
+ DeployIndexRequest.newBuilder()
+ .setIndexEndpoint(indexEndpoint)
+ .setDeployedIndex(deployedIndex)
+ .build();
+ return deployIndexAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deploys an Index into this IndexEndpoint, creating a DeployedIndex within it. Only non-empty
+ * Indexes can be deployed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * DeployIndexRequest request =
+ * DeployIndexRequest.newBuilder()
+ * .setIndexEndpoint(
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+ * .setDeployedIndex(DeployedIndex.newBuilder().build())
+ * .build();
+ * DeployIndexResponse response = indexEndpointServiceClient.deployIndexAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deployIndexAsync(
+ DeployIndexRequest request) {
+ return deployIndexOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deploys an Index into this IndexEndpoint, creating a DeployedIndex within it. Only non-empty
+ * Indexes can be deployed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * DeployIndexRequest request =
+ * DeployIndexRequest.newBuilder()
+ * .setIndexEndpoint(
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+ * .setDeployedIndex(DeployedIndex.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * indexEndpointServiceClient.deployIndexOperationCallable().futureCall(request);
+ * // Do something.
+ * DeployIndexResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ DeployIndexRequest, DeployIndexResponse, DeployIndexOperationMetadata>
+ deployIndexOperationCallable() {
+ return stub.deployIndexOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deploys an Index into this IndexEndpoint, creating a DeployedIndex within it. Only non-empty
+ * Indexes can be deployed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * DeployIndexRequest request =
+ * DeployIndexRequest.newBuilder()
+ * .setIndexEndpoint(
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+ * .setDeployedIndex(DeployedIndex.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * indexEndpointServiceClient.deployIndexCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deployIndexCallable() {
+ return stub.deployIndexCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Undeploys an Index from an IndexEndpoint, removing a DeployedIndex from it, and freeing all
+ * resources it's using.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * IndexEndpointName indexEndpoint =
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]");
+ * String deployedIndexId = "deployedIndexId-1101212953";
+ * UndeployIndexResponse response =
+ * indexEndpointServiceClient.undeployIndexAsync(indexEndpoint, deployedIndexId).get();
+ * }
+ * }
+ *
+ * @param indexEndpoint Required. The name of the IndexEndpoint resource from which to undeploy an
+ * Index. Format: `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+ * @param deployedIndexId Required. The ID of the DeployedIndex to be undeployed from the
+ * IndexEndpoint.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ undeployIndexAsync(IndexEndpointName indexEndpoint, String deployedIndexId) {
+ UndeployIndexRequest request =
+ UndeployIndexRequest.newBuilder()
+ .setIndexEndpoint(indexEndpoint == null ? null : indexEndpoint.toString())
+ .setDeployedIndexId(deployedIndexId)
+ .build();
+ return undeployIndexAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Undeploys an Index from an IndexEndpoint, removing a DeployedIndex from it, and freeing all
+ * resources it's using.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * String indexEndpoint =
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString();
+ * String deployedIndexId = "deployedIndexId-1101212953";
+ * UndeployIndexResponse response =
+ * indexEndpointServiceClient.undeployIndexAsync(indexEndpoint, deployedIndexId).get();
+ * }
+ * }
+ *
+ * @param indexEndpoint Required. The name of the IndexEndpoint resource from which to undeploy an
+ * Index. Format: `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
+ * @param deployedIndexId Required. The ID of the DeployedIndex to be undeployed from the
+ * IndexEndpoint.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ undeployIndexAsync(String indexEndpoint, String deployedIndexId) {
+ UndeployIndexRequest request =
+ UndeployIndexRequest.newBuilder()
+ .setIndexEndpoint(indexEndpoint)
+ .setDeployedIndexId(deployedIndexId)
+ .build();
+ return undeployIndexAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Undeploys an Index from an IndexEndpoint, removing a DeployedIndex from it, and freeing all
+ * resources it's using.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * UndeployIndexRequest request =
+ * UndeployIndexRequest.newBuilder()
+ * .setIndexEndpoint(
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+ * .setDeployedIndexId("deployedIndexId-1101212953")
+ * .build();
+ * UndeployIndexResponse response = indexEndpointServiceClient.undeployIndexAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ undeployIndexAsync(UndeployIndexRequest request) {
+ return undeployIndexOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Undeploys an Index from an IndexEndpoint, removing a DeployedIndex from it, and freeing all
+ * resources it's using.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * UndeployIndexRequest request =
+ * UndeployIndexRequest.newBuilder()
+ * .setIndexEndpoint(
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+ * .setDeployedIndexId("deployedIndexId-1101212953")
+ * .build();
+ * OperationFuture future =
+ * indexEndpointServiceClient.undeployIndexOperationCallable().futureCall(request);
+ * // Do something.
+ * UndeployIndexResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ UndeployIndexRequest, UndeployIndexResponse, UndeployIndexOperationMetadata>
+ undeployIndexOperationCallable() {
+ return stub.undeployIndexOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Undeploys an Index from an IndexEndpoint, removing a DeployedIndex from it, and freeing all
+ * resources it's using.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * UndeployIndexRequest request =
+ * UndeployIndexRequest.newBuilder()
+ * .setIndexEndpoint(
+ * IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]").toString())
+ * .setDeployedIndexId("deployedIndexId-1101212953")
+ * .build();
+ * ApiFuture future =
+ * indexEndpointServiceClient.undeployIndexCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable undeployIndexCallable() {
+ return stub.undeployIndexCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+
+ public static class ListIndexEndpointsPagedResponse
+ extends AbstractPagedListResponse<
+ ListIndexEndpointsRequest,
+ ListIndexEndpointsResponse,
+ IndexEndpoint,
+ ListIndexEndpointsPage,
+ ListIndexEndpointsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListIndexEndpointsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListIndexEndpointsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListIndexEndpointsPagedResponse(ListIndexEndpointsPage page) {
+ super(page, ListIndexEndpointsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListIndexEndpointsPage
+ extends AbstractPage<
+ ListIndexEndpointsRequest,
+ ListIndexEndpointsResponse,
+ IndexEndpoint,
+ ListIndexEndpointsPage> {
+
+ private ListIndexEndpointsPage(
+ PageContext context,
+ ListIndexEndpointsResponse response) {
+ super(context, response);
+ }
+
+ private static ListIndexEndpointsPage createEmptyPage() {
+ return new ListIndexEndpointsPage(null, null);
+ }
+
+ @Override
+ protected ListIndexEndpointsPage createPage(
+ PageContext context,
+ ListIndexEndpointsResponse response) {
+ return new ListIndexEndpointsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListIndexEndpointsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListIndexEndpointsRequest,
+ ListIndexEndpointsResponse,
+ IndexEndpoint,
+ ListIndexEndpointsPage,
+ ListIndexEndpointsFixedSizeCollection> {
+
+ private ListIndexEndpointsFixedSizeCollection(
+ List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListIndexEndpointsFixedSizeCollection createEmptyCollection() {
+ return new ListIndexEndpointsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListIndexEndpointsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListIndexEndpointsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+}
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointServiceSettings.java
new file mode 100644
index 000000000..283aaa5c8
--- /dev/null
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointServiceSettings.java
@@ -0,0 +1,314 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.aiplatform.v1;
+
+import static com.google.cloud.aiplatform.v1.IndexEndpointServiceClient.ListIndexEndpointsPagedResponse;
+
+import com.google.api.core.ApiFunction;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.GoogleCredentialsProvider;
+import com.google.api.gax.core.InstantiatingExecutorProvider;
+import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.rpc.ApiClientHeaderProvider;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientSettings;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.cloud.aiplatform.v1.stub.IndexEndpointServiceStubSettings;
+import com.google.longrunning.Operation;
+import com.google.protobuf.Empty;
+import java.io.IOException;
+import java.util.List;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Settings class to configure an instance of {@link IndexEndpointServiceClient}.
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ *
+ * - The default service address (aiplatform.googleapis.com) and default port (443) are used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ *
For example, to set the total timeout of getIndexEndpoint to 30 seconds:
+ *
+ *
{@code
+ * IndexEndpointServiceSettings.Builder indexEndpointServiceSettingsBuilder =
+ * IndexEndpointServiceSettings.newBuilder();
+ * indexEndpointServiceSettingsBuilder
+ * .getIndexEndpointSettings()
+ * .setRetrySettings(
+ * indexEndpointServiceSettingsBuilder
+ * .getIndexEndpointSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * IndexEndpointServiceSettings indexEndpointServiceSettings =
+ * indexEndpointServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class IndexEndpointServiceSettings extends ClientSettings {
+
+ /** Returns the object with the settings used for calls to createIndexEndpoint. */
+ public UnaryCallSettings createIndexEndpointSettings() {
+ return ((IndexEndpointServiceStubSettings) getStubSettings()).createIndexEndpointSettings();
+ }
+
+ /** Returns the object with the settings used for calls to createIndexEndpoint. */
+ public OperationCallSettings<
+ CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointOperationMetadata>
+ createIndexEndpointOperationSettings() {
+ return ((IndexEndpointServiceStubSettings) getStubSettings())
+ .createIndexEndpointOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getIndexEndpoint. */
+ public UnaryCallSettings getIndexEndpointSettings() {
+ return ((IndexEndpointServiceStubSettings) getStubSettings()).getIndexEndpointSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listIndexEndpoints. */
+ public PagedCallSettings<
+ ListIndexEndpointsRequest, ListIndexEndpointsResponse, ListIndexEndpointsPagedResponse>
+ listIndexEndpointsSettings() {
+ return ((IndexEndpointServiceStubSettings) getStubSettings()).listIndexEndpointsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateIndexEndpoint. */
+ public UnaryCallSettings
+ updateIndexEndpointSettings() {
+ return ((IndexEndpointServiceStubSettings) getStubSettings()).updateIndexEndpointSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteIndexEndpoint. */
+ public UnaryCallSettings deleteIndexEndpointSettings() {
+ return ((IndexEndpointServiceStubSettings) getStubSettings()).deleteIndexEndpointSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteIndexEndpoint. */
+ public OperationCallSettings
+ deleteIndexEndpointOperationSettings() {
+ return ((IndexEndpointServiceStubSettings) getStubSettings())
+ .deleteIndexEndpointOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deployIndex. */
+ public UnaryCallSettings deployIndexSettings() {
+ return ((IndexEndpointServiceStubSettings) getStubSettings()).deployIndexSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deployIndex. */
+ public OperationCallSettings<
+ DeployIndexRequest, DeployIndexResponse, DeployIndexOperationMetadata>
+ deployIndexOperationSettings() {
+ return ((IndexEndpointServiceStubSettings) getStubSettings()).deployIndexOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to undeployIndex. */
+ public UnaryCallSettings undeployIndexSettings() {
+ return ((IndexEndpointServiceStubSettings) getStubSettings()).undeployIndexSettings();
+ }
+
+ /** Returns the object with the settings used for calls to undeployIndex. */
+ public OperationCallSettings<
+ UndeployIndexRequest, UndeployIndexResponse, UndeployIndexOperationMetadata>
+ undeployIndexOperationSettings() {
+ return ((IndexEndpointServiceStubSettings) getStubSettings()).undeployIndexOperationSettings();
+ }
+
+ public static final IndexEndpointServiceSettings create(IndexEndpointServiceStubSettings stub)
+ throws IOException {
+ return new IndexEndpointServiceSettings.Builder(stub.toBuilder()).build();
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return IndexEndpointServiceStubSettings.defaultExecutorProviderBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ public static String getDefaultEndpoint() {
+ return IndexEndpointServiceStubSettings.getDefaultEndpoint();
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return IndexEndpointServiceStubSettings.getDefaultServiceScopes();
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return IndexEndpointServiceStubSettings.defaultCredentialsProviderBuilder();
+ }
+
+ /** Returns a builder for the default ChannelProvider for this service. */
+ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
+ return IndexEndpointServiceStubSettings.defaultGrpcTransportProviderBuilder();
+ }
+
+ public static TransportChannelProvider defaultTransportChannelProvider() {
+ return IndexEndpointServiceStubSettings.defaultTransportChannelProvider();
+ }
+
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return IndexEndpointServiceStubSettings.defaultApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder() {
+ return Builder.createDefault();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder(ClientContext clientContext) {
+ return new Builder(clientContext);
+ }
+
+ /** Returns a builder containing all the values of this settings class. */
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ protected IndexEndpointServiceSettings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+ }
+
+ /** Builder for IndexEndpointServiceSettings. */
+ public static class Builder
+ extends ClientSettings.Builder {
+
+ protected Builder() throws IOException {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(IndexEndpointServiceStubSettings.newBuilder(clientContext));
+ }
+
+ protected Builder(IndexEndpointServiceSettings settings) {
+ super(settings.getStubSettings().toBuilder());
+ }
+
+ protected Builder(IndexEndpointServiceStubSettings.Builder stubSettings) {
+ super(stubSettings);
+ }
+
+ private static Builder createDefault() {
+ return new Builder(IndexEndpointServiceStubSettings.newBuilder());
+ }
+
+ public IndexEndpointServiceStubSettings.Builder getStubSettingsBuilder() {
+ return ((IndexEndpointServiceStubSettings.Builder) getStubSettings());
+ }
+
+ /**
+ * Applies the given settings updater function to all of the unary API methods in this service.
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction, Void> settingsUpdater) {
+ super.applyToAllUnaryMethods(
+ getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
+ return this;
+ }
+
+ /** Returns the builder for the settings used for calls to createIndexEndpoint. */
+ public UnaryCallSettings.Builder
+ createIndexEndpointSettings() {
+ return getStubSettingsBuilder().createIndexEndpointSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to createIndexEndpoint. */
+ public OperationCallSettings.Builder<
+ CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointOperationMetadata>
+ createIndexEndpointOperationSettings() {
+ return getStubSettingsBuilder().createIndexEndpointOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getIndexEndpoint. */
+ public UnaryCallSettings.Builder
+ getIndexEndpointSettings() {
+ return getStubSettingsBuilder().getIndexEndpointSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listIndexEndpoints. */
+ public PagedCallSettings.Builder<
+ ListIndexEndpointsRequest, ListIndexEndpointsResponse, ListIndexEndpointsPagedResponse>
+ listIndexEndpointsSettings() {
+ return getStubSettingsBuilder().listIndexEndpointsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateIndexEndpoint. */
+ public UnaryCallSettings.Builder
+ updateIndexEndpointSettings() {
+ return getStubSettingsBuilder().updateIndexEndpointSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteIndexEndpoint. */
+ public UnaryCallSettings.Builder
+ deleteIndexEndpointSettings() {
+ return getStubSettingsBuilder().deleteIndexEndpointSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteIndexEndpoint. */
+ public OperationCallSettings.Builder
+ deleteIndexEndpointOperationSettings() {
+ return getStubSettingsBuilder().deleteIndexEndpointOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deployIndex. */
+ public UnaryCallSettings.Builder deployIndexSettings() {
+ return getStubSettingsBuilder().deployIndexSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deployIndex. */
+ public OperationCallSettings.Builder<
+ DeployIndexRequest, DeployIndexResponse, DeployIndexOperationMetadata>
+ deployIndexOperationSettings() {
+ return getStubSettingsBuilder().deployIndexOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to undeployIndex. */
+ public UnaryCallSettings.Builder undeployIndexSettings() {
+ return getStubSettingsBuilder().undeployIndexSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to undeployIndex. */
+ public OperationCallSettings.Builder<
+ UndeployIndexRequest, UndeployIndexResponse, UndeployIndexOperationMetadata>
+ undeployIndexOperationSettings() {
+ return getStubSettingsBuilder().undeployIndexOperationSettings();
+ }
+
+ @Override
+ public IndexEndpointServiceSettings build() throws IOException {
+ return new IndexEndpointServiceSettings(this);
+ }
+ }
+}
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceClient.java
new file mode 100644
index 000000000..9696bb4c2
--- /dev/null
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceClient.java
@@ -0,0 +1,848 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.aiplatform.v1;
+
+import com.google.api.core.ApiFuture;
+import com.google.api.core.ApiFutures;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.api.gax.paging.AbstractFixedSizeCollection;
+import com.google.api.gax.paging.AbstractPage;
+import com.google.api.gax.paging.AbstractPagedListResponse;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.aiplatform.v1.stub.IndexServiceStub;
+import com.google.cloud.aiplatform.v1.stub.IndexServiceStubSettings;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.longrunning.Operation;
+import com.google.longrunning.OperationsClient;
+import com.google.protobuf.Empty;
+import com.google.protobuf.FieldMask;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: A service for creating and managing Vertex AI's Index resources.
+ *
+ * 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:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * IndexName name = IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]");
+ * Index response = indexServiceClient.getIndex(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the IndexServiceClient 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 IndexServiceSettings to
+ * create(). For example:
+ *
+ *
To customize credentials:
+ *
+ *
{@code
+ * IndexServiceSettings indexServiceSettings =
+ * IndexServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * IndexServiceClient indexServiceClient = IndexServiceClient.create(indexServiceSettings);
+ * }
+ *
+ * To customize the endpoint:
+ *
+ *
{@code
+ * IndexServiceSettings indexServiceSettings =
+ * IndexServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * IndexServiceClient indexServiceClient = IndexServiceClient.create(indexServiceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class IndexServiceClient implements BackgroundResource {
+ private final IndexServiceSettings settings;
+ private final IndexServiceStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of IndexServiceClient with default settings. */
+ public static final IndexServiceClient create() throws IOException {
+ return create(IndexServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of IndexServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final IndexServiceClient create(IndexServiceSettings settings) throws IOException {
+ return new IndexServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of IndexServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(IndexServiceSettings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final IndexServiceClient create(IndexServiceStub stub) {
+ return new IndexServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of IndexServiceClient, 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.
+ */
+ protected IndexServiceClient(IndexServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((IndexServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected IndexServiceClient(IndexServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final IndexServiceSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public IndexServiceStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Index.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Index index = Index.newBuilder().build();
+ * Index response = indexServiceClient.createIndexAsync(parent, index).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location to create the Index in. Format:
+ * `projects/{project}/locations/{location}`
+ * @param index Required. The Index to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createIndexAsync(
+ LocationName parent, Index index) {
+ CreateIndexRequest request =
+ CreateIndexRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setIndex(index)
+ .build();
+ return createIndexAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Index.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Index index = Index.newBuilder().build();
+ * Index response = indexServiceClient.createIndexAsync(parent, index).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location to create the Index in. Format:
+ * `projects/{project}/locations/{location}`
+ * @param index Required. The Index to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createIndexAsync(
+ String parent, Index index) {
+ CreateIndexRequest request =
+ CreateIndexRequest.newBuilder().setParent(parent).setIndex(index).build();
+ return createIndexAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Index.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * CreateIndexRequest request =
+ * CreateIndexRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setIndex(Index.newBuilder().build())
+ * .build();
+ * Index response = indexServiceClient.createIndexAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createIndexAsync(
+ CreateIndexRequest request) {
+ return createIndexOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Index.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * CreateIndexRequest request =
+ * CreateIndexRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setIndex(Index.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * indexServiceClient.createIndexOperationCallable().futureCall(request);
+ * // Do something.
+ * Index response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ createIndexOperationCallable() {
+ return stub.createIndexOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Index.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * CreateIndexRequest request =
+ * CreateIndexRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setIndex(Index.newBuilder().build())
+ * .build();
+ * ApiFuture future = indexServiceClient.createIndexCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable createIndexCallable() {
+ return stub.createIndexCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an Index.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * IndexName name = IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]");
+ * Index response = indexServiceClient.getIndex(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the Index resource. Format:
+ * `projects/{project}/locations/{location}/indexes/{index}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Index getIndex(IndexName name) {
+ GetIndexRequest request =
+ GetIndexRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getIndex(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an Index.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * String name = IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString();
+ * Index response = indexServiceClient.getIndex(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the Index resource. Format:
+ * `projects/{project}/locations/{location}/indexes/{index}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Index getIndex(String name) {
+ GetIndexRequest request = GetIndexRequest.newBuilder().setName(name).build();
+ return getIndex(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an Index.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * GetIndexRequest request =
+ * GetIndexRequest.newBuilder()
+ * .setName(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+ * .build();
+ * Index response = indexServiceClient.getIndex(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Index getIndex(GetIndexRequest request) {
+ return getIndexCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an Index.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * GetIndexRequest request =
+ * GetIndexRequest.newBuilder()
+ * .setName(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+ * .build();
+ * ApiFuture future = indexServiceClient.getIndexCallable().futureCall(request);
+ * // Do something.
+ * Index response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getIndexCallable() {
+ return stub.getIndexCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Indexes in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Index element : indexServiceClient.listIndexes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location from which to list the Indexes.
+ * Format: `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListIndexesPagedResponse listIndexes(LocationName parent) {
+ ListIndexesRequest request =
+ ListIndexesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listIndexes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Indexes in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Index element : indexServiceClient.listIndexes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Location from which to list the Indexes.
+ * Format: `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListIndexesPagedResponse listIndexes(String parent) {
+ ListIndexesRequest request = ListIndexesRequest.newBuilder().setParent(parent).build();
+ return listIndexes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Indexes in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * ListIndexesRequest request =
+ * ListIndexesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * for (Index element : indexServiceClient.listIndexes(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListIndexesPagedResponse listIndexes(ListIndexesRequest request) {
+ return listIndexesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Indexes in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * ListIndexesRequest request =
+ * ListIndexesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = indexServiceClient.listIndexesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Index element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listIndexesPagedCallable() {
+ return stub.listIndexesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Indexes in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * ListIndexesRequest request =
+ * ListIndexesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * while (true) {
+ * ListIndexesResponse response = indexServiceClient.listIndexesCallable().call(request);
+ * for (Index element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listIndexesCallable() {
+ return stub.listIndexesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an Index.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * Index index = Index.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Index response = indexServiceClient.updateIndexAsync(index, updateMask).get();
+ * }
+ * }
+ *
+ * @param index Required. The Index which updates the resource on the server.
+ * @param updateMask The update mask applies to the resource. For the `FieldMask` definition, see
+ * [google.protobuf.FieldMask][google.protobuf.FieldMask].
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture updateIndexAsync(
+ Index index, FieldMask updateMask) {
+ UpdateIndexRequest request =
+ UpdateIndexRequest.newBuilder().setIndex(index).setUpdateMask(updateMask).build();
+ return updateIndexAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an Index.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * UpdateIndexRequest request =
+ * UpdateIndexRequest.newBuilder()
+ * .setIndex(Index.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Index response = indexServiceClient.updateIndexAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture updateIndexAsync(
+ UpdateIndexRequest request) {
+ return updateIndexOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an Index.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * UpdateIndexRequest request =
+ * UpdateIndexRequest.newBuilder()
+ * .setIndex(Index.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * indexServiceClient.updateIndexOperationCallable().futureCall(request);
+ * // Do something.
+ * Index response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ updateIndexOperationCallable() {
+ return stub.updateIndexOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an Index.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * UpdateIndexRequest request =
+ * UpdateIndexRequest.newBuilder()
+ * .setIndex(Index.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = indexServiceClient.updateIndexCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable updateIndexCallable() {
+ return stub.updateIndexCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an Index. An Index can only be deleted when all its
+ * [DeployedIndexes][google.cloud.aiplatform.v1.Index.deployed_indexes] had been undeployed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * IndexName name = IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]");
+ * indexServiceClient.deleteIndexAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Index resource to be deleted. Format:
+ * `projects/{project}/locations/{location}/indexes/{index}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteIndexAsync(IndexName name) {
+ DeleteIndexRequest request =
+ DeleteIndexRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return deleteIndexAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an Index. An Index can only be deleted when all its
+ * [DeployedIndexes][google.cloud.aiplatform.v1.Index.deployed_indexes] had been undeployed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * String name = IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString();
+ * indexServiceClient.deleteIndexAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Index resource to be deleted. Format:
+ * `projects/{project}/locations/{location}/indexes/{index}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteIndexAsync(String name) {
+ DeleteIndexRequest request = DeleteIndexRequest.newBuilder().setName(name).build();
+ return deleteIndexAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an Index. An Index can only be deleted when all its
+ * [DeployedIndexes][google.cloud.aiplatform.v1.Index.deployed_indexes] had been undeployed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * DeleteIndexRequest request =
+ * DeleteIndexRequest.newBuilder()
+ * .setName(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+ * .build();
+ * indexServiceClient.deleteIndexAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteIndexAsync(
+ DeleteIndexRequest request) {
+ return deleteIndexOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an Index. An Index can only be deleted when all its
+ * [DeployedIndexes][google.cloud.aiplatform.v1.Index.deployed_indexes] had been undeployed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * DeleteIndexRequest request =
+ * DeleteIndexRequest.newBuilder()
+ * .setName(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+ * .build();
+ * OperationFuture future =
+ * indexServiceClient.deleteIndexOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deleteIndexOperationCallable() {
+ return stub.deleteIndexOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an Index. An Index can only be deleted when all its
+ * [DeployedIndexes][google.cloud.aiplatform.v1.Index.deployed_indexes] had been undeployed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * DeleteIndexRequest request =
+ * DeleteIndexRequest.newBuilder()
+ * .setName(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+ * .build();
+ * ApiFuture future = indexServiceClient.deleteIndexCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteIndexCallable() {
+ return stub.deleteIndexCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+
+ public static class ListIndexesPagedResponse
+ extends AbstractPagedListResponse<
+ ListIndexesRequest,
+ ListIndexesResponse,
+ Index,
+ ListIndexesPage,
+ ListIndexesFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListIndexesPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage, input -> new ListIndexesPagedResponse(input), MoreExecutors.directExecutor());
+ }
+
+ private ListIndexesPagedResponse(ListIndexesPage page) {
+ super(page, ListIndexesFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListIndexesPage
+ extends AbstractPage {
+
+ private ListIndexesPage(
+ PageContext context,
+ ListIndexesResponse response) {
+ super(context, response);
+ }
+
+ private static ListIndexesPage createEmptyPage() {
+ return new ListIndexesPage(null, null);
+ }
+
+ @Override
+ protected ListIndexesPage createPage(
+ PageContext context,
+ ListIndexesResponse response) {
+ return new ListIndexesPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListIndexesFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListIndexesRequest,
+ ListIndexesResponse,
+ Index,
+ ListIndexesPage,
+ ListIndexesFixedSizeCollection> {
+
+ private ListIndexesFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListIndexesFixedSizeCollection createEmptyCollection() {
+ return new ListIndexesFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListIndexesFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListIndexesFixedSizeCollection(pages, collectionSize);
+ }
+ }
+}
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceSettings.java
new file mode 100644
index 000000000..2180f3540
--- /dev/null
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceSettings.java
@@ -0,0 +1,265 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.aiplatform.v1;
+
+import static com.google.cloud.aiplatform.v1.IndexServiceClient.ListIndexesPagedResponse;
+
+import com.google.api.core.ApiFunction;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.GoogleCredentialsProvider;
+import com.google.api.gax.core.InstantiatingExecutorProvider;
+import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.rpc.ApiClientHeaderProvider;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientSettings;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.cloud.aiplatform.v1.stub.IndexServiceStubSettings;
+import com.google.longrunning.Operation;
+import com.google.protobuf.Empty;
+import java.io.IOException;
+import java.util.List;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Settings class to configure an instance of {@link IndexServiceClient}.
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ *
+ * - The default service address (aiplatform.googleapis.com) and default port (443) are used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ *
For example, to set the total timeout of getIndex to 30 seconds:
+ *
+ *
{@code
+ * IndexServiceSettings.Builder indexServiceSettingsBuilder = IndexServiceSettings.newBuilder();
+ * indexServiceSettingsBuilder
+ * .getIndexSettings()
+ * .setRetrySettings(
+ * indexServiceSettingsBuilder
+ * .getIndexSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * IndexServiceSettings indexServiceSettings = indexServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class IndexServiceSettings extends ClientSettings {
+
+ /** Returns the object with the settings used for calls to createIndex. */
+ public UnaryCallSettings createIndexSettings() {
+ return ((IndexServiceStubSettings) getStubSettings()).createIndexSettings();
+ }
+
+ /** Returns the object with the settings used for calls to createIndex. */
+ public OperationCallSettings
+ createIndexOperationSettings() {
+ return ((IndexServiceStubSettings) getStubSettings()).createIndexOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getIndex. */
+ public UnaryCallSettings getIndexSettings() {
+ return ((IndexServiceStubSettings) getStubSettings()).getIndexSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listIndexes. */
+ public PagedCallSettings
+ listIndexesSettings() {
+ return ((IndexServiceStubSettings) getStubSettings()).listIndexesSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateIndex. */
+ public UnaryCallSettings updateIndexSettings() {
+ return ((IndexServiceStubSettings) getStubSettings()).updateIndexSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateIndex. */
+ public OperationCallSettings
+ updateIndexOperationSettings() {
+ return ((IndexServiceStubSettings) getStubSettings()).updateIndexOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteIndex. */
+ public UnaryCallSettings deleteIndexSettings() {
+ return ((IndexServiceStubSettings) getStubSettings()).deleteIndexSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteIndex. */
+ public OperationCallSettings
+ deleteIndexOperationSettings() {
+ return ((IndexServiceStubSettings) getStubSettings()).deleteIndexOperationSettings();
+ }
+
+ public static final IndexServiceSettings create(IndexServiceStubSettings stub)
+ throws IOException {
+ return new IndexServiceSettings.Builder(stub.toBuilder()).build();
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return IndexServiceStubSettings.defaultExecutorProviderBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ public static String getDefaultEndpoint() {
+ return IndexServiceStubSettings.getDefaultEndpoint();
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return IndexServiceStubSettings.getDefaultServiceScopes();
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return IndexServiceStubSettings.defaultCredentialsProviderBuilder();
+ }
+
+ /** Returns a builder for the default ChannelProvider for this service. */
+ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
+ return IndexServiceStubSettings.defaultGrpcTransportProviderBuilder();
+ }
+
+ public static TransportChannelProvider defaultTransportChannelProvider() {
+ return IndexServiceStubSettings.defaultTransportChannelProvider();
+ }
+
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return IndexServiceStubSettings.defaultApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder() {
+ return Builder.createDefault();
+ }
+
+ /** Returns a new builder for this class. */
+ public static Builder newBuilder(ClientContext clientContext) {
+ return new Builder(clientContext);
+ }
+
+ /** Returns a builder containing all the values of this settings class. */
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ protected IndexServiceSettings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+ }
+
+ /** Builder for IndexServiceSettings. */
+ public static class Builder extends ClientSettings.Builder {
+
+ protected Builder() throws IOException {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(IndexServiceStubSettings.newBuilder(clientContext));
+ }
+
+ protected Builder(IndexServiceSettings settings) {
+ super(settings.getStubSettings().toBuilder());
+ }
+
+ protected Builder(IndexServiceStubSettings.Builder stubSettings) {
+ super(stubSettings);
+ }
+
+ private static Builder createDefault() {
+ return new Builder(IndexServiceStubSettings.newBuilder());
+ }
+
+ public IndexServiceStubSettings.Builder getStubSettingsBuilder() {
+ return ((IndexServiceStubSettings.Builder) getStubSettings());
+ }
+
+ /**
+ * Applies the given settings updater function to all of the unary API methods in this service.
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction, Void> settingsUpdater) {
+ super.applyToAllUnaryMethods(
+ getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
+ return this;
+ }
+
+ /** Returns the builder for the settings used for calls to createIndex. */
+ public UnaryCallSettings.Builder createIndexSettings() {
+ return getStubSettingsBuilder().createIndexSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to createIndex. */
+ public OperationCallSettings.Builder
+ createIndexOperationSettings() {
+ return getStubSettingsBuilder().createIndexOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getIndex. */
+ public UnaryCallSettings.Builder getIndexSettings() {
+ return getStubSettingsBuilder().getIndexSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listIndexes. */
+ public PagedCallSettings.Builder<
+ ListIndexesRequest, ListIndexesResponse, ListIndexesPagedResponse>
+ listIndexesSettings() {
+ return getStubSettingsBuilder().listIndexesSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateIndex. */
+ public UnaryCallSettings.Builder updateIndexSettings() {
+ return getStubSettingsBuilder().updateIndexSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateIndex. */
+ public OperationCallSettings.Builder
+ updateIndexOperationSettings() {
+ return getStubSettingsBuilder().updateIndexOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteIndex. */
+ public UnaryCallSettings.Builder deleteIndexSettings() {
+ return getStubSettingsBuilder().deleteIndexSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteIndex. */
+ public OperationCallSettings.Builder
+ deleteIndexOperationSettings() {
+ return getStubSettingsBuilder().deleteIndexOperationSettings();
+ }
+
+ @Override
+ public IndexServiceSettings build() throws IOException {
+ return new IndexServiceSettings(this);
+ }
+ }
+}
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceClient.java
index 6a883b0ae..975e9827e 100644
--- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceClient.java
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceClient.java
@@ -33,6 +33,7 @@
import com.google.longrunning.Operation;
import com.google.longrunning.OperationsClient;
import com.google.protobuf.Empty;
+import com.google.protobuf.FieldMask;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -2612,6 +2613,1091 @@ public final void cancelBatchPredictionJob(CancelBatchPredictionJobRequest reque
return stub.cancelBatchPredictionJobCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * ModelDeploymentMonitoringJob modelDeploymentMonitoringJob =
+ * ModelDeploymentMonitoringJob.newBuilder().build();
+ * ModelDeploymentMonitoringJob response =
+ * jobServiceClient.createModelDeploymentMonitoringJob(parent, modelDeploymentMonitoringJob);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the ModelDeploymentMonitoringJob. Format:
+ * `projects/{project}/locations/{location}`
+ * @param modelDeploymentMonitoringJob Required. The ModelDeploymentMonitoringJob to create
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ModelDeploymentMonitoringJob createModelDeploymentMonitoringJob(
+ LocationName parent, ModelDeploymentMonitoringJob modelDeploymentMonitoringJob) {
+ CreateModelDeploymentMonitoringJobRequest request =
+ CreateModelDeploymentMonitoringJobRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setModelDeploymentMonitoringJob(modelDeploymentMonitoringJob)
+ .build();
+ return createModelDeploymentMonitoringJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * ModelDeploymentMonitoringJob modelDeploymentMonitoringJob =
+ * ModelDeploymentMonitoringJob.newBuilder().build();
+ * ModelDeploymentMonitoringJob response =
+ * jobServiceClient.createModelDeploymentMonitoringJob(parent, modelDeploymentMonitoringJob);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the ModelDeploymentMonitoringJob. Format:
+ * `projects/{project}/locations/{location}`
+ * @param modelDeploymentMonitoringJob Required. The ModelDeploymentMonitoringJob to create
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ModelDeploymentMonitoringJob createModelDeploymentMonitoringJob(
+ String parent, ModelDeploymentMonitoringJob modelDeploymentMonitoringJob) {
+ CreateModelDeploymentMonitoringJobRequest request =
+ CreateModelDeploymentMonitoringJobRequest.newBuilder()
+ .setParent(parent)
+ .setModelDeploymentMonitoringJob(modelDeploymentMonitoringJob)
+ .build();
+ return createModelDeploymentMonitoringJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * CreateModelDeploymentMonitoringJobRequest request =
+ * CreateModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build())
+ * .build();
+ * ModelDeploymentMonitoringJob response =
+ * jobServiceClient.createModelDeploymentMonitoringJob(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ModelDeploymentMonitoringJob createModelDeploymentMonitoringJob(
+ CreateModelDeploymentMonitoringJobRequest request) {
+ return createModelDeploymentMonitoringJobCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * CreateModelDeploymentMonitoringJobRequest request =
+ * CreateModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * jobServiceClient.createModelDeploymentMonitoringJobCallable().futureCall(request);
+ * // Do something.
+ * ModelDeploymentMonitoringJob response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ CreateModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob>
+ createModelDeploymentMonitoringJobCallable() {
+ return stub.createModelDeploymentMonitoringJobCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Model Monitoring Statistics generated within a given time window.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * ModelDeploymentMonitoringJobName modelDeploymentMonitoringJob =
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]");
+ * String deployedModelId = "deployedModelId-1817547906";
+ * for (ModelMonitoringStatsAnomalies element :
+ * jobServiceClient
+ * .searchModelDeploymentMonitoringStatsAnomalies(
+ * modelDeploymentMonitoringJob, deployedModelId)
+ * .iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param modelDeploymentMonitoringJob Required. ModelDeploymentMonitoring Job resource name.
+ * Format:
+ * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}
+ * @param deployedModelId Required. The DeployedModel ID of the
+ * [google.cloud.aiplatform.master.ModelDeploymentMonitoringObjectiveConfig.deployed_model_id].
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse
+ searchModelDeploymentMonitoringStatsAnomalies(
+ ModelDeploymentMonitoringJobName modelDeploymentMonitoringJob, String deployedModelId) {
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest request =
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder()
+ .setModelDeploymentMonitoringJob(
+ modelDeploymentMonitoringJob == null
+ ? null
+ : modelDeploymentMonitoringJob.toString())
+ .setDeployedModelId(deployedModelId)
+ .build();
+ return searchModelDeploymentMonitoringStatsAnomalies(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Model Monitoring Statistics generated within a given time window.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * String modelDeploymentMonitoringJob =
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString();
+ * String deployedModelId = "deployedModelId-1817547906";
+ * for (ModelMonitoringStatsAnomalies element :
+ * jobServiceClient
+ * .searchModelDeploymentMonitoringStatsAnomalies(
+ * modelDeploymentMonitoringJob, deployedModelId)
+ * .iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param modelDeploymentMonitoringJob Required. ModelDeploymentMonitoring Job resource name.
+ * Format:
+ * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}
+ * @param deployedModelId Required. The DeployedModel ID of the
+ * [google.cloud.aiplatform.master.ModelDeploymentMonitoringObjectiveConfig.deployed_model_id].
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse
+ searchModelDeploymentMonitoringStatsAnomalies(
+ String modelDeploymentMonitoringJob, String deployedModelId) {
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest request =
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder()
+ .setModelDeploymentMonitoringJob(modelDeploymentMonitoringJob)
+ .setDeployedModelId(deployedModelId)
+ .build();
+ return searchModelDeploymentMonitoringStatsAnomalies(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Model Monitoring Statistics generated within a given time window.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * SearchModelDeploymentMonitoringStatsAnomaliesRequest request =
+ * SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder()
+ * .setModelDeploymentMonitoringJob(
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString())
+ * .setDeployedModelId("deployedModelId-1817547906")
+ * .setFeatureDisplayName("featureDisplayName-1741181545")
+ * .addAllObjectives(
+ * new ArrayList<
+ * SearchModelDeploymentMonitoringStatsAnomaliesRequest
+ * .StatsAnomaliesObjective>())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setStartTime(Timestamp.newBuilder().build())
+ * .setEndTime(Timestamp.newBuilder().build())
+ * .build();
+ * for (ModelMonitoringStatsAnomalies element :
+ * jobServiceClient.searchModelDeploymentMonitoringStatsAnomalies(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse
+ searchModelDeploymentMonitoringStatsAnomalies(
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest request) {
+ return searchModelDeploymentMonitoringStatsAnomaliesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Model Monitoring Statistics generated within a given time window.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * SearchModelDeploymentMonitoringStatsAnomaliesRequest request =
+ * SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder()
+ * .setModelDeploymentMonitoringJob(
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString())
+ * .setDeployedModelId("deployedModelId-1817547906")
+ * .setFeatureDisplayName("featureDisplayName-1741181545")
+ * .addAllObjectives(
+ * new ArrayList<
+ * SearchModelDeploymentMonitoringStatsAnomaliesRequest
+ * .StatsAnomaliesObjective>())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setStartTime(Timestamp.newBuilder().build())
+ * .setEndTime(Timestamp.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * jobServiceClient
+ * .searchModelDeploymentMonitoringStatsAnomaliesPagedCallable()
+ * .futureCall(request);
+ * // Do something.
+ * for (ModelMonitoringStatsAnomalies element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest,
+ SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse>
+ searchModelDeploymentMonitoringStatsAnomaliesPagedCallable() {
+ return stub.searchModelDeploymentMonitoringStatsAnomaliesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches Model Monitoring Statistics generated within a given time window.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * SearchModelDeploymentMonitoringStatsAnomaliesRequest request =
+ * SearchModelDeploymentMonitoringStatsAnomaliesRequest.newBuilder()
+ * .setModelDeploymentMonitoringJob(
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString())
+ * .setDeployedModelId("deployedModelId-1817547906")
+ * .setFeatureDisplayName("featureDisplayName-1741181545")
+ * .addAllObjectives(
+ * new ArrayList<
+ * SearchModelDeploymentMonitoringStatsAnomaliesRequest
+ * .StatsAnomaliesObjective>())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setStartTime(Timestamp.newBuilder().build())
+ * .setEndTime(Timestamp.newBuilder().build())
+ * .build();
+ * while (true) {
+ * SearchModelDeploymentMonitoringStatsAnomaliesResponse response =
+ * jobServiceClient.searchModelDeploymentMonitoringStatsAnomaliesCallable().call(request);
+ * for (ModelMonitoringStatsAnomalies element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest,
+ SearchModelDeploymentMonitoringStatsAnomaliesResponse>
+ searchModelDeploymentMonitoringStatsAnomaliesCallable() {
+ return stub.searchModelDeploymentMonitoringStatsAnomaliesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * ModelDeploymentMonitoringJobName name =
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]");
+ * ModelDeploymentMonitoringJob response =
+ * jobServiceClient.getModelDeploymentMonitoringJob(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the ModelDeploymentMonitoringJob. Format:
+ * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ModelDeploymentMonitoringJob getModelDeploymentMonitoringJob(
+ ModelDeploymentMonitoringJobName name) {
+ GetModelDeploymentMonitoringJobRequest request =
+ GetModelDeploymentMonitoringJobRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getModelDeploymentMonitoringJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * String name =
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString();
+ * ModelDeploymentMonitoringJob response =
+ * jobServiceClient.getModelDeploymentMonitoringJob(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the ModelDeploymentMonitoringJob. Format:
+ * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ModelDeploymentMonitoringJob getModelDeploymentMonitoringJob(String name) {
+ GetModelDeploymentMonitoringJobRequest request =
+ GetModelDeploymentMonitoringJobRequest.newBuilder().setName(name).build();
+ return getModelDeploymentMonitoringJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * GetModelDeploymentMonitoringJobRequest request =
+ * GetModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setName(
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString())
+ * .build();
+ * ModelDeploymentMonitoringJob response =
+ * jobServiceClient.getModelDeploymentMonitoringJob(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ModelDeploymentMonitoringJob getModelDeploymentMonitoringJob(
+ GetModelDeploymentMonitoringJobRequest request) {
+ return getModelDeploymentMonitoringJobCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * GetModelDeploymentMonitoringJobRequest request =
+ * GetModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setName(
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * jobServiceClient.getModelDeploymentMonitoringJobCallable().futureCall(request);
+ * // Do something.
+ * ModelDeploymentMonitoringJob response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ getModelDeploymentMonitoringJobCallable() {
+ return stub.getModelDeploymentMonitoringJobCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists ModelDeploymentMonitoringJobs in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (ModelDeploymentMonitoringJob element :
+ * jobServiceClient.listModelDeploymentMonitoringJobs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the ModelDeploymentMonitoringJob. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListModelDeploymentMonitoringJobsPagedResponse listModelDeploymentMonitoringJobs(
+ LocationName parent) {
+ ListModelDeploymentMonitoringJobsRequest request =
+ ListModelDeploymentMonitoringJobsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listModelDeploymentMonitoringJobs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists ModelDeploymentMonitoringJobs in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (ModelDeploymentMonitoringJob element :
+ * jobServiceClient.listModelDeploymentMonitoringJobs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the ModelDeploymentMonitoringJob. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListModelDeploymentMonitoringJobsPagedResponse listModelDeploymentMonitoringJobs(
+ String parent) {
+ ListModelDeploymentMonitoringJobsRequest request =
+ ListModelDeploymentMonitoringJobsRequest.newBuilder().setParent(parent).build();
+ return listModelDeploymentMonitoringJobs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists ModelDeploymentMonitoringJobs in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * ListModelDeploymentMonitoringJobsRequest request =
+ * ListModelDeploymentMonitoringJobsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * for (ModelDeploymentMonitoringJob element :
+ * jobServiceClient.listModelDeploymentMonitoringJobs(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListModelDeploymentMonitoringJobsPagedResponse listModelDeploymentMonitoringJobs(
+ ListModelDeploymentMonitoringJobsRequest request) {
+ return listModelDeploymentMonitoringJobsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists ModelDeploymentMonitoringJobs in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * ListModelDeploymentMonitoringJobsRequest request =
+ * ListModelDeploymentMonitoringJobsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * jobServiceClient.listModelDeploymentMonitoringJobsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (ModelDeploymentMonitoringJob element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListModelDeploymentMonitoringJobsRequest, ListModelDeploymentMonitoringJobsPagedResponse>
+ listModelDeploymentMonitoringJobsPagedCallable() {
+ return stub.listModelDeploymentMonitoringJobsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists ModelDeploymentMonitoringJobs in a Location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * ListModelDeploymentMonitoringJobsRequest request =
+ * ListModelDeploymentMonitoringJobsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * while (true) {
+ * ListModelDeploymentMonitoringJobsResponse response =
+ * jobServiceClient.listModelDeploymentMonitoringJobsCallable().call(request);
+ * for (ModelDeploymentMonitoringJob element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListModelDeploymentMonitoringJobsRequest, ListModelDeploymentMonitoringJobsResponse>
+ listModelDeploymentMonitoringJobsCallable() {
+ return stub.listModelDeploymentMonitoringJobsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * ModelDeploymentMonitoringJob modelDeploymentMonitoringJob =
+ * ModelDeploymentMonitoringJob.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * ModelDeploymentMonitoringJob response =
+ * jobServiceClient
+ * .updateModelDeploymentMonitoringJobAsync(modelDeploymentMonitoringJob, updateMask)
+ * .get();
+ * }
+ * }
+ *
+ * @param modelDeploymentMonitoringJob Required. The model monitoring configuration which replaces
+ * the resource on the server.
+ * @param updateMask Required. The update mask applies to the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture<
+ ModelDeploymentMonitoringJob, UpdateModelDeploymentMonitoringJobOperationMetadata>
+ updateModelDeploymentMonitoringJobAsync(
+ ModelDeploymentMonitoringJob modelDeploymentMonitoringJob, FieldMask updateMask) {
+ UpdateModelDeploymentMonitoringJobRequest request =
+ UpdateModelDeploymentMonitoringJobRequest.newBuilder()
+ .setModelDeploymentMonitoringJob(modelDeploymentMonitoringJob)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateModelDeploymentMonitoringJobAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * UpdateModelDeploymentMonitoringJobRequest request =
+ * UpdateModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ModelDeploymentMonitoringJob response =
+ * jobServiceClient.updateModelDeploymentMonitoringJobAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture<
+ ModelDeploymentMonitoringJob, UpdateModelDeploymentMonitoringJobOperationMetadata>
+ updateModelDeploymentMonitoringJobAsync(UpdateModelDeploymentMonitoringJobRequest request) {
+ return updateModelDeploymentMonitoringJobOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * UpdateModelDeploymentMonitoringJobRequest request =
+ * UpdateModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture<
+ * ModelDeploymentMonitoringJob, UpdateModelDeploymentMonitoringJobOperationMetadata>
+ * future =
+ * jobServiceClient
+ * .updateModelDeploymentMonitoringJobOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * ModelDeploymentMonitoringJob response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ UpdateModelDeploymentMonitoringJobRequest,
+ ModelDeploymentMonitoringJob,
+ UpdateModelDeploymentMonitoringJobOperationMetadata>
+ updateModelDeploymentMonitoringJobOperationCallable() {
+ return stub.updateModelDeploymentMonitoringJobOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * UpdateModelDeploymentMonitoringJobRequest request =
+ * UpdateModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setModelDeploymentMonitoringJob(ModelDeploymentMonitoringJob.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * jobServiceClient.updateModelDeploymentMonitoringJobCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ updateModelDeploymentMonitoringJobCallable() {
+ return stub.updateModelDeploymentMonitoringJobCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * ModelDeploymentMonitoringJobName name =
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]");
+ * jobServiceClient.deleteModelDeploymentMonitoringJobAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the model monitoring job to delete. Format:
+ * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ deleteModelDeploymentMonitoringJobAsync(ModelDeploymentMonitoringJobName name) {
+ DeleteModelDeploymentMonitoringJobRequest request =
+ DeleteModelDeploymentMonitoringJobRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return deleteModelDeploymentMonitoringJobAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * String name =
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString();
+ * jobServiceClient.deleteModelDeploymentMonitoringJobAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the model monitoring job to delete. Format:
+ * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ deleteModelDeploymentMonitoringJobAsync(String name) {
+ DeleteModelDeploymentMonitoringJobRequest request =
+ DeleteModelDeploymentMonitoringJobRequest.newBuilder().setName(name).build();
+ return deleteModelDeploymentMonitoringJobAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * DeleteModelDeploymentMonitoringJobRequest request =
+ * DeleteModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setName(
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString())
+ * .build();
+ * jobServiceClient.deleteModelDeploymentMonitoringJobAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ deleteModelDeploymentMonitoringJobAsync(DeleteModelDeploymentMonitoringJobRequest request) {
+ return deleteModelDeploymentMonitoringJobOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * DeleteModelDeploymentMonitoringJobRequest request =
+ * DeleteModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setName(
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString())
+ * .build();
+ * OperationFuture future =
+ * jobServiceClient
+ * .deleteModelDeploymentMonitoringJobOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ DeleteModelDeploymentMonitoringJobRequest, Empty, DeleteOperationMetadata>
+ deleteModelDeploymentMonitoringJobOperationCallable() {
+ return stub.deleteModelDeploymentMonitoringJobOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ModelDeploymentMonitoringJob.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * DeleteModelDeploymentMonitoringJobRequest request =
+ * DeleteModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setName(
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * jobServiceClient.deleteModelDeploymentMonitoringJobCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ deleteModelDeploymentMonitoringJobCallable() {
+ return stub.deleteModelDeploymentMonitoringJobCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to
+ * cancel the job. Will mark
+ * [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state]
+ * to 'PAUSED'.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * ModelDeploymentMonitoringJobName name =
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]");
+ * jobServiceClient.pauseModelDeploymentMonitoringJob(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the ModelDeploymentMonitoringJob to pause. Format:
+ * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void pauseModelDeploymentMonitoringJob(ModelDeploymentMonitoringJobName name) {
+ PauseModelDeploymentMonitoringJobRequest request =
+ PauseModelDeploymentMonitoringJobRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ pauseModelDeploymentMonitoringJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to
+ * cancel the job. Will mark
+ * [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state]
+ * to 'PAUSED'.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * String name =
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString();
+ * jobServiceClient.pauseModelDeploymentMonitoringJob(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the ModelDeploymentMonitoringJob to pause. Format:
+ * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void pauseModelDeploymentMonitoringJob(String name) {
+ PauseModelDeploymentMonitoringJobRequest request =
+ PauseModelDeploymentMonitoringJobRequest.newBuilder().setName(name).build();
+ pauseModelDeploymentMonitoringJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to
+ * cancel the job. Will mark
+ * [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state]
+ * to 'PAUSED'.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * PauseModelDeploymentMonitoringJobRequest request =
+ * PauseModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setName(
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString())
+ * .build();
+ * jobServiceClient.pauseModelDeploymentMonitoringJob(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void pauseModelDeploymentMonitoringJob(
+ PauseModelDeploymentMonitoringJobRequest request) {
+ pauseModelDeploymentMonitoringJobCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to
+ * cancel the job. Will mark
+ * [ModelDeploymentMonitoringJob.state][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.state]
+ * to 'PAUSED'.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * PauseModelDeploymentMonitoringJobRequest request =
+ * PauseModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setName(
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * jobServiceClient.pauseModelDeploymentMonitoringJobCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ pauseModelDeploymentMonitoringJobCallable() {
+ return stub.pauseModelDeploymentMonitoringJobCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A
+ * deleted ModelDeploymentMonitoringJob can't be resumed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * ModelDeploymentMonitoringJobName name =
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]");
+ * jobServiceClient.resumeModelDeploymentMonitoringJob(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the ModelDeploymentMonitoringJob to resume. Format:
+ * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void resumeModelDeploymentMonitoringJob(ModelDeploymentMonitoringJobName name) {
+ ResumeModelDeploymentMonitoringJobRequest request =
+ ResumeModelDeploymentMonitoringJobRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ resumeModelDeploymentMonitoringJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A
+ * deleted ModelDeploymentMonitoringJob can't be resumed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * String name =
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString();
+ * jobServiceClient.resumeModelDeploymentMonitoringJob(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the ModelDeploymentMonitoringJob to resume. Format:
+ * `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void resumeModelDeploymentMonitoringJob(String name) {
+ ResumeModelDeploymentMonitoringJobRequest request =
+ ResumeModelDeploymentMonitoringJobRequest.newBuilder().setName(name).build();
+ resumeModelDeploymentMonitoringJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A
+ * deleted ModelDeploymentMonitoringJob can't be resumed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * ResumeModelDeploymentMonitoringJobRequest request =
+ * ResumeModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setName(
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString())
+ * .build();
+ * jobServiceClient.resumeModelDeploymentMonitoringJob(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void resumeModelDeploymentMonitoringJob(
+ ResumeModelDeploymentMonitoringJobRequest request) {
+ resumeModelDeploymentMonitoringJobCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A
+ * deleted ModelDeploymentMonitoringJob can't be resumed.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+ * ResumeModelDeploymentMonitoringJobRequest request =
+ * ResumeModelDeploymentMonitoringJobRequest.newBuilder()
+ * .setName(
+ * ModelDeploymentMonitoringJobName.of(
+ * "[PROJECT]", "[LOCATION]", "[MODEL_DEPLOYMENT_MONITORING_JOB]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * jobServiceClient.resumeModelDeploymentMonitoringJobCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ resumeModelDeploymentMonitoringJobCallable() {
+ return stub.resumeModelDeploymentMonitoringJobCallable();
+ }
+
@Override
public final void close() {
stub.close();
@@ -2986,4 +4072,204 @@ protected ListBatchPredictionJobsFixedSizeCollection createCollection(
return new ListBatchPredictionJobsFixedSizeCollection(pages, collectionSize);
}
}
+
+ public static class SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse
+ extends AbstractPagedListResponse<
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest,
+ SearchModelDeploymentMonitoringStatsAnomaliesResponse,
+ ModelMonitoringStatsAnomalies,
+ SearchModelDeploymentMonitoringStatsAnomaliesPage,
+ SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext<
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest,
+ SearchModelDeploymentMonitoringStatsAnomaliesResponse,
+ ModelMonitoringStatsAnomalies>
+ context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ SearchModelDeploymentMonitoringStatsAnomaliesPage.createEmptyPage()
+ .createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse(
+ SearchModelDeploymentMonitoringStatsAnomaliesPage page) {
+ super(
+ page,
+ SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class SearchModelDeploymentMonitoringStatsAnomaliesPage
+ extends AbstractPage<
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest,
+ SearchModelDeploymentMonitoringStatsAnomaliesResponse,
+ ModelMonitoringStatsAnomalies,
+ SearchModelDeploymentMonitoringStatsAnomaliesPage> {
+
+ private SearchModelDeploymentMonitoringStatsAnomaliesPage(
+ PageContext<
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest,
+ SearchModelDeploymentMonitoringStatsAnomaliesResponse,
+ ModelMonitoringStatsAnomalies>
+ context,
+ SearchModelDeploymentMonitoringStatsAnomaliesResponse response) {
+ super(context, response);
+ }
+
+ private static SearchModelDeploymentMonitoringStatsAnomaliesPage createEmptyPage() {
+ return new SearchModelDeploymentMonitoringStatsAnomaliesPage(null, null);
+ }
+
+ @Override
+ protected SearchModelDeploymentMonitoringStatsAnomaliesPage createPage(
+ PageContext<
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest,
+ SearchModelDeploymentMonitoringStatsAnomaliesResponse,
+ ModelMonitoringStatsAnomalies>
+ context,
+ SearchModelDeploymentMonitoringStatsAnomaliesResponse response) {
+ return new SearchModelDeploymentMonitoringStatsAnomaliesPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext<
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest,
+ SearchModelDeploymentMonitoringStatsAnomaliesResponse,
+ ModelMonitoringStatsAnomalies>
+ context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest,
+ SearchModelDeploymentMonitoringStatsAnomaliesResponse,
+ ModelMonitoringStatsAnomalies,
+ SearchModelDeploymentMonitoringStatsAnomaliesPage,
+ SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection> {
+
+ private SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection(
+ List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection
+ createEmptyCollection() {
+ return new SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new SearchModelDeploymentMonitoringStatsAnomaliesFixedSizeCollection(
+ pages, collectionSize);
+ }
+ }
+
+ public static class ListModelDeploymentMonitoringJobsPagedResponse
+ extends AbstractPagedListResponse<
+ ListModelDeploymentMonitoringJobsRequest,
+ ListModelDeploymentMonitoringJobsResponse,
+ ModelDeploymentMonitoringJob,
+ ListModelDeploymentMonitoringJobsPage,
+ ListModelDeploymentMonitoringJobsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext<
+ ListModelDeploymentMonitoringJobsRequest,
+ ListModelDeploymentMonitoringJobsResponse,
+ ModelDeploymentMonitoringJob>
+ context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListModelDeploymentMonitoringJobsPage.createEmptyPage()
+ .createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListModelDeploymentMonitoringJobsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListModelDeploymentMonitoringJobsPagedResponse(
+ ListModelDeploymentMonitoringJobsPage page) {
+ super(page, ListModelDeploymentMonitoringJobsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListModelDeploymentMonitoringJobsPage
+ extends AbstractPage<
+ ListModelDeploymentMonitoringJobsRequest,
+ ListModelDeploymentMonitoringJobsResponse,
+ ModelDeploymentMonitoringJob,
+ ListModelDeploymentMonitoringJobsPage> {
+
+ private ListModelDeploymentMonitoringJobsPage(
+ PageContext<
+ ListModelDeploymentMonitoringJobsRequest,
+ ListModelDeploymentMonitoringJobsResponse,
+ ModelDeploymentMonitoringJob>
+ context,
+ ListModelDeploymentMonitoringJobsResponse response) {
+ super(context, response);
+ }
+
+ private static ListModelDeploymentMonitoringJobsPage createEmptyPage() {
+ return new ListModelDeploymentMonitoringJobsPage(null, null);
+ }
+
+ @Override
+ protected ListModelDeploymentMonitoringJobsPage createPage(
+ PageContext<
+ ListModelDeploymentMonitoringJobsRequest,
+ ListModelDeploymentMonitoringJobsResponse,
+ ModelDeploymentMonitoringJob>
+ context,
+ ListModelDeploymentMonitoringJobsResponse response) {
+ return new ListModelDeploymentMonitoringJobsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext<
+ ListModelDeploymentMonitoringJobsRequest,
+ ListModelDeploymentMonitoringJobsResponse,
+ ModelDeploymentMonitoringJob>
+ context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListModelDeploymentMonitoringJobsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListModelDeploymentMonitoringJobsRequest,
+ ListModelDeploymentMonitoringJobsResponse,
+ ModelDeploymentMonitoringJob,
+ ListModelDeploymentMonitoringJobsPage,
+ ListModelDeploymentMonitoringJobsFixedSizeCollection> {
+
+ private ListModelDeploymentMonitoringJobsFixedSizeCollection(
+ List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListModelDeploymentMonitoringJobsFixedSizeCollection createEmptyCollection() {
+ return new ListModelDeploymentMonitoringJobsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListModelDeploymentMonitoringJobsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListModelDeploymentMonitoringJobsFixedSizeCollection(pages, collectionSize);
+ }
+ }
}
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceSettings.java
index 9359789cf..52e83b447 100644
--- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceSettings.java
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceSettings.java
@@ -20,6 +20,8 @@
import static com.google.cloud.aiplatform.v1.JobServiceClient.ListCustomJobsPagedResponse;
import static com.google.cloud.aiplatform.v1.JobServiceClient.ListDataLabelingJobsPagedResponse;
import static com.google.cloud.aiplatform.v1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse;
+import static com.google.cloud.aiplatform.v1.JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse;
+import static com.google.cloud.aiplatform.v1.JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
@@ -224,6 +226,86 @@ public UnaryCallSettings cancelDataLabeling
return ((JobServiceStubSettings) getStubSettings()).cancelBatchPredictionJobSettings();
}
+ /** Returns the object with the settings used for calls to createModelDeploymentMonitoringJob. */
+ public UnaryCallSettings
+ createModelDeploymentMonitoringJobSettings() {
+ return ((JobServiceStubSettings) getStubSettings())
+ .createModelDeploymentMonitoringJobSettings();
+ }
+
+ /**
+ * Returns the object with the settings used for calls to
+ * searchModelDeploymentMonitoringStatsAnomalies.
+ */
+ public PagedCallSettings<
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest,
+ SearchModelDeploymentMonitoringStatsAnomaliesResponse,
+ SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse>
+ searchModelDeploymentMonitoringStatsAnomaliesSettings() {
+ return ((JobServiceStubSettings) getStubSettings())
+ .searchModelDeploymentMonitoringStatsAnomaliesSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getModelDeploymentMonitoringJob. */
+ public UnaryCallSettings
+ getModelDeploymentMonitoringJobSettings() {
+ return ((JobServiceStubSettings) getStubSettings()).getModelDeploymentMonitoringJobSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listModelDeploymentMonitoringJobs. */
+ public PagedCallSettings<
+ ListModelDeploymentMonitoringJobsRequest,
+ ListModelDeploymentMonitoringJobsResponse,
+ ListModelDeploymentMonitoringJobsPagedResponse>
+ listModelDeploymentMonitoringJobsSettings() {
+ return ((JobServiceStubSettings) getStubSettings()).listModelDeploymentMonitoringJobsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateModelDeploymentMonitoringJob. */
+ public UnaryCallSettings
+ updateModelDeploymentMonitoringJobSettings() {
+ return ((JobServiceStubSettings) getStubSettings())
+ .updateModelDeploymentMonitoringJobSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateModelDeploymentMonitoringJob. */
+ public OperationCallSettings<
+ UpdateModelDeploymentMonitoringJobRequest,
+ ModelDeploymentMonitoringJob,
+ UpdateModelDeploymentMonitoringJobOperationMetadata>
+ updateModelDeploymentMonitoringJobOperationSettings() {
+ return ((JobServiceStubSettings) getStubSettings())
+ .updateModelDeploymentMonitoringJobOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteModelDeploymentMonitoringJob. */
+ public UnaryCallSettings
+ deleteModelDeploymentMonitoringJobSettings() {
+ return ((JobServiceStubSettings) getStubSettings())
+ .deleteModelDeploymentMonitoringJobSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteModelDeploymentMonitoringJob. */
+ public OperationCallSettings<
+ DeleteModelDeploymentMonitoringJobRequest, Empty, DeleteOperationMetadata>
+ deleteModelDeploymentMonitoringJobOperationSettings() {
+ return ((JobServiceStubSettings) getStubSettings())
+ .deleteModelDeploymentMonitoringJobOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to pauseModelDeploymentMonitoringJob. */
+ public UnaryCallSettings
+ pauseModelDeploymentMonitoringJobSettings() {
+ return ((JobServiceStubSettings) getStubSettings()).pauseModelDeploymentMonitoringJobSettings();
+ }
+
+ /** Returns the object with the settings used for calls to resumeModelDeploymentMonitoringJob. */
+ public UnaryCallSettings
+ resumeModelDeploymentMonitoringJobSettings() {
+ return ((JobServiceStubSettings) getStubSettings())
+ .resumeModelDeploymentMonitoringJobSettings();
+ }
+
public static final JobServiceSettings create(JobServiceStubSettings stub) throws IOException {
return new JobServiceSettings.Builder(stub.toBuilder()).build();
}
@@ -473,6 +555,93 @@ public UnaryCallSettings.Builder cancelCustomJobS
return getStubSettingsBuilder().cancelBatchPredictionJobSettings();
}
+ /**
+ * Returns the builder for the settings used for calls to createModelDeploymentMonitoringJob.
+ */
+ public UnaryCallSettings.Builder<
+ CreateModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob>
+ createModelDeploymentMonitoringJobSettings() {
+ return getStubSettingsBuilder().createModelDeploymentMonitoringJobSettings();
+ }
+
+ /**
+ * Returns the builder for the settings used for calls to
+ * searchModelDeploymentMonitoringStatsAnomalies.
+ */
+ public PagedCallSettings.Builder<
+ SearchModelDeploymentMonitoringStatsAnomaliesRequest,
+ SearchModelDeploymentMonitoringStatsAnomaliesResponse,
+ SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse>
+ searchModelDeploymentMonitoringStatsAnomaliesSettings() {
+ return getStubSettingsBuilder().searchModelDeploymentMonitoringStatsAnomaliesSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getModelDeploymentMonitoringJob. */
+ public UnaryCallSettings.Builder<
+ GetModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob>
+ getModelDeploymentMonitoringJobSettings() {
+ return getStubSettingsBuilder().getModelDeploymentMonitoringJobSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listModelDeploymentMonitoringJobs. */
+ public PagedCallSettings.Builder<
+ ListModelDeploymentMonitoringJobsRequest,
+ ListModelDeploymentMonitoringJobsResponse,
+ ListModelDeploymentMonitoringJobsPagedResponse>
+ listModelDeploymentMonitoringJobsSettings() {
+ return getStubSettingsBuilder().listModelDeploymentMonitoringJobsSettings();
+ }
+
+ /**
+ * Returns the builder for the settings used for calls to updateModelDeploymentMonitoringJob.
+ */
+ public UnaryCallSettings.Builder
+ updateModelDeploymentMonitoringJobSettings() {
+ return getStubSettingsBuilder().updateModelDeploymentMonitoringJobSettings();
+ }
+
+ /**
+ * Returns the builder for the settings used for calls to updateModelDeploymentMonitoringJob.
+ */
+ public OperationCallSettings.Builder<
+ UpdateModelDeploymentMonitoringJobRequest,
+ ModelDeploymentMonitoringJob,
+ UpdateModelDeploymentMonitoringJobOperationMetadata>
+ updateModelDeploymentMonitoringJobOperationSettings() {
+ return getStubSettingsBuilder().updateModelDeploymentMonitoringJobOperationSettings();
+ }
+
+ /**
+ * Returns the builder for the settings used for calls to deleteModelDeploymentMonitoringJob.
+ */
+ public UnaryCallSettings.Builder
+ deleteModelDeploymentMonitoringJobSettings() {
+ return getStubSettingsBuilder().deleteModelDeploymentMonitoringJobSettings();
+ }
+
+ /**
+ * Returns the builder for the settings used for calls to deleteModelDeploymentMonitoringJob.
+ */
+ public OperationCallSettings.Builder<
+ DeleteModelDeploymentMonitoringJobRequest, Empty, DeleteOperationMetadata>
+ deleteModelDeploymentMonitoringJobOperationSettings() {
+ return getStubSettingsBuilder().deleteModelDeploymentMonitoringJobOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to pauseModelDeploymentMonitoringJob. */
+ public UnaryCallSettings.Builder
+ pauseModelDeploymentMonitoringJobSettings() {
+ return getStubSettingsBuilder().pauseModelDeploymentMonitoringJobSettings();
+ }
+
+ /**
+ * Returns the builder for the settings used for calls to resumeModelDeploymentMonitoringJob.
+ */
+ public UnaryCallSettings.Builder
+ resumeModelDeploymentMonitoringJobSettings() {
+ return getStubSettingsBuilder().resumeModelDeploymentMonitoringJobSettings();
+ }
+
@Override
public JobServiceSettings build() throws IOException {
return new JobServiceSettings(this);
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java
index 72af930d0..2af484a08 100644
--- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java
@@ -16,6 +16,7 @@
package com.google.cloud.aiplatform.v1;
+import com.google.api.HttpBody;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.UnaryCallable;
@@ -280,6 +281,310 @@ public final UnaryCallable predictCallable() {
return stub.predictCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Perform an online prediction with arbitrary http payload.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+ * HttpBody httpBody = HttpBody.newBuilder().build();
+ * HttpBody response = predictionServiceClient.rawPredict(endpoint, httpBody);
+ * }
+ * }
+ *
+ * @param endpoint Required. The name of the Endpoint requested to serve the prediction. Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ * @param httpBody The prediction input. Supports HTTP headers and arbitrary data payload.
+ * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an upper limit on
+ * the number of instances it supports per request. When this limit it is exceeded for an
+ * AutoML model, the [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
+ * method returns an error. When this limit is exceeded for a custom-trained model, the
+ * behavior varies depending on the model.
+ *
You can specify the schema for each instance in the
+ * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+ * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This schema applies when
+ * you deploy the `Model` as a `DeployedModel` to an
+ * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict` method.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final HttpBody rawPredict(EndpointName endpoint, HttpBody httpBody) {
+ RawPredictRequest request =
+ RawPredictRequest.newBuilder()
+ .setEndpoint(endpoint == null ? null : endpoint.toString())
+ .setHttpBody(httpBody)
+ .build();
+ return rawPredict(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Perform an online prediction with arbitrary http payload.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * String endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString();
+ * HttpBody httpBody = HttpBody.newBuilder().build();
+ * HttpBody response = predictionServiceClient.rawPredict(endpoint, httpBody);
+ * }
+ * }
+ *
+ * @param endpoint Required. The name of the Endpoint requested to serve the prediction. Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ * @param httpBody The prediction input. Supports HTTP headers and arbitrary data payload.
+ * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an upper limit on
+ * the number of instances it supports per request. When this limit it is exceeded for an
+ * AutoML model, the [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
+ * method returns an error. When this limit is exceeded for a custom-trained model, the
+ * behavior varies depending on the model.
+ *
You can specify the schema for each instance in the
+ * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
+ * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This schema applies when
+ * you deploy the `Model` as a `DeployedModel` to an
+ * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict` method.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final HttpBody rawPredict(String endpoint, HttpBody httpBody) {
+ RawPredictRequest request =
+ RawPredictRequest.newBuilder().setEndpoint(endpoint).setHttpBody(httpBody).build();
+ return rawPredict(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Perform an online prediction with arbitrary http payload.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * RawPredictRequest request =
+ * RawPredictRequest.newBuilder()
+ * .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+ * .setHttpBody(HttpBody.newBuilder().build())
+ * .build();
+ * HttpBody response = predictionServiceClient.rawPredict(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final HttpBody rawPredict(RawPredictRequest request) {
+ return rawPredictCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Perform an online prediction with arbitrary http payload.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * RawPredictRequest request =
+ * RawPredictRequest.newBuilder()
+ * .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+ * .setHttpBody(HttpBody.newBuilder().build())
+ * .build();
+ * ApiFuture future = predictionServiceClient.rawPredictCallable().futureCall(request);
+ * // Do something.
+ * HttpBody response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable rawPredictCallable() {
+ return stub.rawPredictCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Perform an online explanation.
+ *
+ * If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is
+ * specified, the corresponding DeployModel must have
+ * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If
+ * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not
+ * specified, all DeployedModels must have
+ * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. Only
+ * deployed AutoML tabular Models have explanation_spec.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * EndpointName endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
+ * List instances = new ArrayList<>();
+ * Value parameters = Value.newBuilder().build();
+ * String deployedModelId = "deployedModelId-1817547906";
+ * ExplainResponse response =
+ * predictionServiceClient.explain(endpoint, instances, parameters, deployedModelId);
+ * }
+ * }
+ *
+ * @param endpoint Required. The name of the Endpoint requested to serve the explanation. Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ * @param instances Required. The instances that are the input to the explanation call. A
+ * DeployedModel may have an upper limit on the number of instances it supports per request,
+ * and when it is exceeded the explanation call errors in case of AutoML Models, or, in case
+ * of customer created Models, the behaviour is as documented by that Model. The schema of any
+ * single instance may be specified via Endpoint's DeployedModels'
+ * [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+ * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+ * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+ * @param parameters The parameters that govern the prediction. The schema of the parameters may
+ * be specified via Endpoint's DeployedModels' [Model's
+ * ][google.cloud.aiplatform.v1.DeployedModel.model]
+ * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+ * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+ * @param deployedModelId If specified, this ExplainRequest will be served by the chosen
+ * DeployedModel, overriding
+ * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ExplainResponse explain(
+ EndpointName endpoint, List instances, Value parameters, String deployedModelId) {
+ ExplainRequest request =
+ ExplainRequest.newBuilder()
+ .setEndpoint(endpoint == null ? null : endpoint.toString())
+ .addAllInstances(instances)
+ .setParameters(parameters)
+ .setDeployedModelId(deployedModelId)
+ .build();
+ return explain(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Perform an online explanation.
+ *
+ * If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is
+ * specified, the corresponding DeployModel must have
+ * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If
+ * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not
+ * specified, all DeployedModels must have
+ * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. Only
+ * deployed AutoML tabular Models have explanation_spec.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * String endpoint = EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString();
+ * List instances = new ArrayList<>();
+ * Value parameters = Value.newBuilder().build();
+ * String deployedModelId = "deployedModelId-1817547906";
+ * ExplainResponse response =
+ * predictionServiceClient.explain(endpoint, instances, parameters, deployedModelId);
+ * }
+ * }
+ *
+ * @param endpoint Required. The name of the Endpoint requested to serve the explanation. Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ * @param instances Required. The instances that are the input to the explanation call. A
+ * DeployedModel may have an upper limit on the number of instances it supports per request,
+ * and when it is exceeded the explanation call errors in case of AutoML Models, or, in case
+ * of customer created Models, the behaviour is as documented by that Model. The schema of any
+ * single instance may be specified via Endpoint's DeployedModels'
+ * [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
+ * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+ * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
+ * @param parameters The parameters that govern the prediction. The schema of the parameters may
+ * be specified via Endpoint's DeployedModels' [Model's
+ * ][google.cloud.aiplatform.v1.DeployedModel.model]
+ * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
+ * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
+ * @param deployedModelId If specified, this ExplainRequest will be served by the chosen
+ * DeployedModel, overriding
+ * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ExplainResponse explain(
+ String endpoint, List instances, Value parameters, String deployedModelId) {
+ ExplainRequest request =
+ ExplainRequest.newBuilder()
+ .setEndpoint(endpoint)
+ .addAllInstances(instances)
+ .setParameters(parameters)
+ .setDeployedModelId(deployedModelId)
+ .build();
+ return explain(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Perform an online explanation.
+ *
+ * If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is
+ * specified, the corresponding DeployModel must have
+ * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If
+ * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not
+ * specified, all DeployedModels must have
+ * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. Only
+ * deployed AutoML tabular Models have explanation_spec.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * ExplainRequest request =
+ * ExplainRequest.newBuilder()
+ * .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+ * .addAllInstances(new ArrayList())
+ * .setParameters(Value.newBuilder().build())
+ * .setExplanationSpecOverride(ExplanationSpecOverride.newBuilder().build())
+ * .setDeployedModelId("deployedModelId-1817547906")
+ * .build();
+ * ExplainResponse response = predictionServiceClient.explain(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ExplainResponse explain(ExplainRequest request) {
+ return explainCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Perform an online explanation.
+ *
+ * If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is
+ * specified, the corresponding DeployModel must have
+ * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If
+ * [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not
+ * specified, all DeployedModels must have
+ * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. Only
+ * deployed AutoML tabular Models have explanation_spec.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * ExplainRequest request =
+ * ExplainRequest.newBuilder()
+ * .setEndpoint(EndpointName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT]").toString())
+ * .addAllInstances(new ArrayList())
+ * .setParameters(Value.newBuilder().build())
+ * .setExplanationSpecOverride(ExplanationSpecOverride.newBuilder().build())
+ * .setDeployedModelId("deployedModelId-1817547906")
+ * .build();
+ * ApiFuture future =
+ * predictionServiceClient.explainCallable().futureCall(request);
+ * // Do something.
+ * ExplainResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable explainCallable() {
+ return stub.explainCallable();
+ }
+
@Override
public final void close() {
stub.close();
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceSettings.java
index ae1d1c469..ad5438a6c 100644
--- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceSettings.java
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceSettings.java
@@ -16,6 +16,7 @@
package com.google.cloud.aiplatform.v1;
+import com.google.api.HttpBody;
import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GoogleCredentialsProvider;
@@ -71,6 +72,16 @@ public UnaryCallSettings predictSettings() {
return ((PredictionServiceStubSettings) getStubSettings()).predictSettings();
}
+ /** Returns the object with the settings used for calls to rawPredict. */
+ public UnaryCallSettings rawPredictSettings() {
+ return ((PredictionServiceStubSettings) getStubSettings()).rawPredictSettings();
+ }
+
+ /** Returns the object with the settings used for calls to explain. */
+ public UnaryCallSettings explainSettings() {
+ return ((PredictionServiceStubSettings) getStubSettings()).explainSettings();
+ }
+
public static final PredictionServiceSettings create(PredictionServiceStubSettings stub)
throws IOException {
return new PredictionServiceSettings.Builder(stub.toBuilder()).build();
@@ -173,6 +184,16 @@ public UnaryCallSettings.Builder predictSetting
return getStubSettingsBuilder().predictSettings();
}
+ /** Returns the builder for the settings used for calls to rawPredict. */
+ public UnaryCallSettings.Builder rawPredictSettings() {
+ return getStubSettingsBuilder().rawPredictSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to explain. */
+ public UnaryCallSettings.Builder explainSettings() {
+ return getStubSettingsBuilder().explainSettings();
+ }
+
@Override
public PredictionServiceSettings build() throws IOException {
return new PredictionServiceSettings(this);
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json
index 3df6d4d02..6171a2348 100644
--- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json
@@ -74,6 +74,60 @@
}
}
},
+ "IndexEndpointService": {
+ "clients": {
+ "grpc": {
+ "libraryClient": "IndexEndpointServiceClient",
+ "rpcs": {
+ "CreateIndexEndpoint": {
+ "methods": ["createIndexEndpointAsync", "createIndexEndpointAsync", "createIndexEndpointAsync", "createIndexEndpointOperationCallable", "createIndexEndpointCallable"]
+ },
+ "DeleteIndexEndpoint": {
+ "methods": ["deleteIndexEndpointAsync", "deleteIndexEndpointAsync", "deleteIndexEndpointAsync", "deleteIndexEndpointOperationCallable", "deleteIndexEndpointCallable"]
+ },
+ "DeployIndex": {
+ "methods": ["deployIndexAsync", "deployIndexAsync", "deployIndexAsync", "deployIndexOperationCallable", "deployIndexCallable"]
+ },
+ "GetIndexEndpoint": {
+ "methods": ["getIndexEndpoint", "getIndexEndpoint", "getIndexEndpoint", "getIndexEndpointCallable"]
+ },
+ "ListIndexEndpoints": {
+ "methods": ["listIndexEndpoints", "listIndexEndpoints", "listIndexEndpoints", "listIndexEndpointsPagedCallable", "listIndexEndpointsCallable"]
+ },
+ "UndeployIndex": {
+ "methods": ["undeployIndexAsync", "undeployIndexAsync", "undeployIndexAsync", "undeployIndexOperationCallable", "undeployIndexCallable"]
+ },
+ "UpdateIndexEndpoint": {
+ "methods": ["updateIndexEndpoint", "updateIndexEndpoint", "updateIndexEndpointCallable"]
+ }
+ }
+ }
+ }
+ },
+ "IndexService": {
+ "clients": {
+ "grpc": {
+ "libraryClient": "IndexServiceClient",
+ "rpcs": {
+ "CreateIndex": {
+ "methods": ["createIndexAsync", "createIndexAsync", "createIndexAsync", "createIndexOperationCallable", "createIndexCallable"]
+ },
+ "DeleteIndex": {
+ "methods": ["deleteIndexAsync", "deleteIndexAsync", "deleteIndexAsync", "deleteIndexOperationCallable", "deleteIndexCallable"]
+ },
+ "GetIndex": {
+ "methods": ["getIndex", "getIndex", "getIndex", "getIndexCallable"]
+ },
+ "ListIndexes": {
+ "methods": ["listIndexes", "listIndexes", "listIndexes", "listIndexesPagedCallable", "listIndexesCallable"]
+ },
+ "UpdateIndex": {
+ "methods": ["updateIndexAsync", "updateIndexAsync", "updateIndexOperationCallable", "updateIndexCallable"]
+ }
+ }
+ }
+ }
+ },
"JobService": {
"clients": {
"grpc": {
@@ -103,6 +157,9 @@
"CreateHyperparameterTuningJob": {
"methods": ["createHyperparameterTuningJob", "createHyperparameterTuningJob", "createHyperparameterTuningJob", "createHyperparameterTuningJobCallable"]
},
+ "CreateModelDeploymentMonitoringJob": {
+ "methods": ["createModelDeploymentMonitoringJob", "createModelDeploymentMonitoringJob", "createModelDeploymentMonitoringJob", "createModelDeploymentMonitoringJobCallable"]
+ },
"DeleteBatchPredictionJob": {
"methods": ["deleteBatchPredictionJobAsync", "deleteBatchPredictionJobAsync", "deleteBatchPredictionJobAsync", "deleteBatchPredictionJobOperationCallable", "deleteBatchPredictionJobCallable"]
},
@@ -115,6 +172,9 @@
"DeleteHyperparameterTuningJob": {
"methods": ["deleteHyperparameterTuningJobAsync", "deleteHyperparameterTuningJobAsync", "deleteHyperparameterTuningJobAsync", "deleteHyperparameterTuningJobOperationCallable", "deleteHyperparameterTuningJobCallable"]
},
+ "DeleteModelDeploymentMonitoringJob": {
+ "methods": ["deleteModelDeploymentMonitoringJobAsync", "deleteModelDeploymentMonitoringJobAsync", "deleteModelDeploymentMonitoringJobAsync", "deleteModelDeploymentMonitoringJobOperationCallable", "deleteModelDeploymentMonitoringJobCallable"]
+ },
"GetBatchPredictionJob": {
"methods": ["getBatchPredictionJob", "getBatchPredictionJob", "getBatchPredictionJob", "getBatchPredictionJobCallable"]
},
@@ -127,6 +187,9 @@
"GetHyperparameterTuningJob": {
"methods": ["getHyperparameterTuningJob", "getHyperparameterTuningJob", "getHyperparameterTuningJob", "getHyperparameterTuningJobCallable"]
},
+ "GetModelDeploymentMonitoringJob": {
+ "methods": ["getModelDeploymentMonitoringJob", "getModelDeploymentMonitoringJob", "getModelDeploymentMonitoringJob", "getModelDeploymentMonitoringJobCallable"]
+ },
"ListBatchPredictionJobs": {
"methods": ["listBatchPredictionJobs", "listBatchPredictionJobs", "listBatchPredictionJobs", "listBatchPredictionJobsPagedCallable", "listBatchPredictionJobsCallable"]
},
@@ -138,6 +201,21 @@
},
"ListHyperparameterTuningJobs": {
"methods": ["listHyperparameterTuningJobs", "listHyperparameterTuningJobs", "listHyperparameterTuningJobs", "listHyperparameterTuningJobsPagedCallable", "listHyperparameterTuningJobsCallable"]
+ },
+ "ListModelDeploymentMonitoringJobs": {
+ "methods": ["listModelDeploymentMonitoringJobs", "listModelDeploymentMonitoringJobs", "listModelDeploymentMonitoringJobs", "listModelDeploymentMonitoringJobsPagedCallable", "listModelDeploymentMonitoringJobsCallable"]
+ },
+ "PauseModelDeploymentMonitoringJob": {
+ "methods": ["pauseModelDeploymentMonitoringJob", "pauseModelDeploymentMonitoringJob", "pauseModelDeploymentMonitoringJob", "pauseModelDeploymentMonitoringJobCallable"]
+ },
+ "ResumeModelDeploymentMonitoringJob": {
+ "methods": ["resumeModelDeploymentMonitoringJob", "resumeModelDeploymentMonitoringJob", "resumeModelDeploymentMonitoringJob", "resumeModelDeploymentMonitoringJobCallable"]
+ },
+ "SearchModelDeploymentMonitoringStatsAnomalies": {
+ "methods": ["searchModelDeploymentMonitoringStatsAnomalies", "searchModelDeploymentMonitoringStatsAnomalies", "searchModelDeploymentMonitoringStatsAnomalies", "searchModelDeploymentMonitoringStatsAnomaliesPagedCallable", "searchModelDeploymentMonitoringStatsAnomaliesCallable"]
+ },
+ "UpdateModelDeploymentMonitoringJob": {
+ "methods": ["updateModelDeploymentMonitoringJobAsync", "updateModelDeploymentMonitoringJobAsync", "updateModelDeploymentMonitoringJobOperationCallable", "updateModelDeploymentMonitoringJobCallable"]
}
}
}
@@ -241,8 +319,14 @@
"grpc": {
"libraryClient": "PredictionServiceClient",
"rpcs": {
+ "Explain": {
+ "methods": ["explain", "explain", "explain", "explainCallable"]
+ },
"Predict": {
"methods": ["predict", "predict", "predict", "predictCallable"]
+ },
+ "RawPredict": {
+ "methods": ["rawPredict", "rawPredict", "rawPredict", "rawPredictCallable"]
}
}
}
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java
index 465d2254f..484eee4d4 100644
--- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/package-info.java
@@ -19,6 +19,9 @@
*
* ======================= DatasetServiceClient =======================
*
+ *
Service Description: The service that handles the CRUD of Vertex AI Dataset and its child
+ * resources.
+ *
*
Sample for DatasetServiceClient:
*
*
{@code
@@ -30,6 +33,8 @@
*
* ======================= EndpointServiceClient =======================
*
+ *
Service Description: A service for managing Vertex AI's Endpoints.
+ *
*
Sample for EndpointServiceClient:
*
*
{@code
@@ -39,6 +44,33 @@
* }
* }
*
+ * ======================= IndexEndpointServiceClient =======================
+ *
+ *
Service Description: A service for managing Vertex AI's IndexEndpoints.
+ *
+ *
Sample for IndexEndpointServiceClient:
+ *
+ *
{@code
+ * try (IndexEndpointServiceClient indexEndpointServiceClient =
+ * IndexEndpointServiceClient.create()) {
+ * IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]");
+ * IndexEndpoint response = indexEndpointServiceClient.getIndexEndpoint(name);
+ * }
+ * }
+ *
+ * ======================= IndexServiceClient =======================
+ *
+ *
Service Description: A service for creating and managing Vertex AI's Index resources.
+ *
+ *
Sample for IndexServiceClient:
+ *
+ *
{@code
+ * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+ * IndexName name = IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]");
+ * Index response = indexServiceClient.getIndex(name);
+ * }
+ * }
+ *
* ======================= JobServiceClient =======================
*
*
Service Description: A service for creating and managing Vertex AI's jobs.
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStubSettings.java
index 72dfa6df6..5c53cb5c5 100644
--- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStubSettings.java
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStubSettings.java
@@ -516,8 +516,7 @@ public static class Builder extends StubSettings.Builder> definitions =
ImmutableMap.builder();
- definitions.put(
- "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}
@@ -526,14 +525,8 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder();
RetrySettings settings = null;
- settings =
- RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(5000L))
- .setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(5000L))
- .setTotalTimeout(Duration.ofMillis(5000L))
- .build();
- definitions.put("no_retry_0_params", settings);
+ settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
+ definitions.put("no_retry_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}
@@ -622,61 +615,61 @@ private static Builder createDefault() {
private static Builder initDefaults(Builder builder) {
builder
.createDatasetSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.getDatasetSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.updateDatasetSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.listDatasetsSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.deleteDatasetSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.importDataSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.exportDataSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.listDataItemsSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.getAnnotationSpecSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.listAnnotationsSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.createDatasetOperationSettings()
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Dataset.class))
@@ -700,8 +693,8 @@ private static Builder initDefaults(Builder builder) {
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
@@ -723,8 +716,8 @@ private static Builder initDefaults(Builder builder) {
.importDataOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(ImportDataResponse.class))
@@ -747,8 +740,8 @@ private static Builder initDefaults(Builder builder) {
.exportDataOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(ExportDataResponse.class))
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/EndpointServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/EndpointServiceStubSettings.java
index 0fe214442..c4c4d3979 100644
--- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/EndpointServiceStubSettings.java
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/EndpointServiceStubSettings.java
@@ -365,8 +365,7 @@ public static class Builder extends StubSettings.Builder> definitions =
ImmutableMap.builder();
- definitions.put(
- "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}
@@ -375,14 +374,8 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder();
RetrySettings settings = null;
- settings =
- RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(5000L))
- .setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(5000L))
- .setTotalTimeout(Duration.ofMillis(5000L))
- .build();
- definitions.put("no_retry_1_params", settings);
+ settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
+ definitions.put("no_retry_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}
@@ -459,46 +452,46 @@ private static Builder createDefault() {
private static Builder initDefaults(Builder builder) {
builder
.createEndpointSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.getEndpointSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.listEndpointsSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.updateEndpointSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.deleteEndpointSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.deployModelSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.undeployModelSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
.createEndpointOperationSettings()
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Endpoint.class))
@@ -522,8 +515,8 @@ private static Builder initDefaults(Builder builder) {
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
@@ -545,8 +538,8 @@ private static Builder initDefaults(Builder builder) {
.deployModelOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(DeployModelResponse.class))
@@ -570,8 +563,8 @@ private static Builder initDefaults(Builder builder) {
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(UndeployModelResponse.class))
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcIndexEndpointServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcIndexEndpointServiceCallableFactory.java
new file mode 100644
index 000000000..b172cf7c8
--- /dev/null
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcIndexEndpointServiceCallableFactory.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.aiplatform.v1.stub;
+
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the IndexEndpointService service API.
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcIndexEndpointServiceCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ GrpcCallSettings grpcCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ GrpcCallSettings grpcCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ GrpcCallSettings grpcCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBatchingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ GrpcCallSettings grpcCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ return GrpcCallableFactory.createOperationCallable(
+ grpcCallSettings, callSettings, clientContext, operationsStub);
+ }
+
+ @Override
+ public
+ BidiStreamingCallable createBidiStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBidiStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createServerStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ClientStreamingCallable createClientStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createClientStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcIndexEndpointServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcIndexEndpointServiceStub.java
new file mode 100644
index 000000000..657365c67
--- /dev/null
+++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcIndexEndpointServiceStub.java
@@ -0,0 +1,446 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.aiplatform.v1.stub;
+
+import static com.google.cloud.aiplatform.v1.IndexEndpointServiceClient.ListIndexEndpointsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.aiplatform.v1.CreateIndexEndpointOperationMetadata;
+import com.google.cloud.aiplatform.v1.CreateIndexEndpointRequest;
+import com.google.cloud.aiplatform.v1.DeleteIndexEndpointRequest;
+import com.google.cloud.aiplatform.v1.DeleteOperationMetadata;
+import com.google.cloud.aiplatform.v1.DeployIndexOperationMetadata;
+import com.google.cloud.aiplatform.v1.DeployIndexRequest;
+import com.google.cloud.aiplatform.v1.DeployIndexResponse;
+import com.google.cloud.aiplatform.v1.GetIndexEndpointRequest;
+import com.google.cloud.aiplatform.v1.IndexEndpoint;
+import com.google.cloud.aiplatform.v1.ListIndexEndpointsRequest;
+import com.google.cloud.aiplatform.v1.ListIndexEndpointsResponse;
+import com.google.cloud.aiplatform.v1.UndeployIndexOperationMetadata;
+import com.google.cloud.aiplatform.v1.UndeployIndexRequest;
+import com.google.cloud.aiplatform.v1.UndeployIndexResponse;
+import com.google.cloud.aiplatform.v1.UpdateIndexEndpointRequest;
+import com.google.common.collect.ImmutableMap;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.GrpcOperationsStub;
+import com.google.protobuf.Empty;
+import io.grpc.MethodDescriptor;
+import io.grpc.protobuf.ProtoUtils;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC stub implementation for the IndexEndpointService service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcIndexEndpointServiceStub extends IndexEndpointServiceStub {
+ private static final MethodDescriptor
+ createIndexEndpointMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.aiplatform.v1.IndexEndpointService/CreateIndexEndpoint")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CreateIndexEndpointRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ getIndexEndpointMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.aiplatform.v1.IndexEndpointService/GetIndexEndpoint")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetIndexEndpointRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(IndexEndpoint.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ listIndexEndpointsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.aiplatform.v1.IndexEndpointService/ListIndexEndpoints")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListIndexEndpointsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListIndexEndpointsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ updateIndexEndpointMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.aiplatform.v1.IndexEndpointService/UpdateIndexEndpoint")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(UpdateIndexEndpointRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(IndexEndpoint.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ deleteIndexEndpointMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.aiplatform.v1.IndexEndpointService/DeleteIndexEndpoint")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(DeleteIndexEndpointRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor deployIndexMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.aiplatform.v1.IndexEndpointService/DeployIndex")
+ .setRequestMarshaller(ProtoUtils.marshaller(DeployIndexRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ undeployIndexMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.aiplatform.v1.IndexEndpointService/UndeployIndex")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(UndeployIndexRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private final UnaryCallable createIndexEndpointCallable;
+ private final OperationCallable<
+ CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointOperationMetadata>
+ createIndexEndpointOperationCallable;
+ private final UnaryCallable getIndexEndpointCallable;
+ private final UnaryCallable
+ listIndexEndpointsCallable;
+ private final UnaryCallable
+ listIndexEndpointsPagedCallable;
+ private final UnaryCallable
+ updateIndexEndpointCallable;
+ private final UnaryCallable deleteIndexEndpointCallable;
+ private final OperationCallable
+ deleteIndexEndpointOperationCallable;
+ private final UnaryCallable deployIndexCallable;
+ private final OperationCallable<
+ DeployIndexRequest, DeployIndexResponse, DeployIndexOperationMetadata>
+ deployIndexOperationCallable;
+ private final UnaryCallable undeployIndexCallable;
+ private final OperationCallable<
+ UndeployIndexRequest, UndeployIndexResponse, UndeployIndexOperationMetadata>
+ undeployIndexOperationCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final GrpcOperationsStub operationsStub;
+ private final GrpcStubCallableFactory callableFactory;
+
+ public static final GrpcIndexEndpointServiceStub create(IndexEndpointServiceStubSettings settings)
+ throws IOException {
+ return new GrpcIndexEndpointServiceStub(settings, ClientContext.create(settings));
+ }
+
+ public static final GrpcIndexEndpointServiceStub create(ClientContext clientContext)
+ throws IOException {
+ return new GrpcIndexEndpointServiceStub(
+ IndexEndpointServiceStubSettings.newBuilder().build(), clientContext);
+ }
+
+ public static final GrpcIndexEndpointServiceStub create(
+ ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException {
+ return new GrpcIndexEndpointServiceStub(
+ IndexEndpointServiceStubSettings.newBuilder().build(), clientContext, callableFactory);
+ }
+
+ /**
+ * Constructs an instance of GrpcIndexEndpointServiceStub, 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.
+ */
+ protected GrpcIndexEndpointServiceStub(
+ IndexEndpointServiceStubSettings settings, ClientContext clientContext) throws IOException {
+ this(settings, clientContext, new GrpcIndexEndpointServiceCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of GrpcIndexEndpointServiceStub, 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.
+ */
+ protected GrpcIndexEndpointServiceStub(
+ IndexEndpointServiceStubSettings settings,
+ ClientContext clientContext,
+ GrpcStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
+
+ GrpcCallSettings createIndexEndpointTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(createIndexEndpointMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings getIndexEndpointTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getIndexEndpointMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ listIndexEndpointsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listIndexEndpointsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ updateIndexEndpointTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(updateIndexEndpointMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put(
+ "index_endpoint.name",
+ String.valueOf(request.getIndexEndpoint().getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings deleteIndexEndpointTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteIndexEndpointMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings deployIndexTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deployIndexMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("index_endpoint", String.valueOf(request.getIndexEndpoint()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings undeployIndexTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(undeployIndexMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("index_endpoint", String.valueOf(request.getIndexEndpoint()));
+ return params.build();
+ })
+ .build();
+
+ this.createIndexEndpointCallable =
+ callableFactory.createUnaryCallable(
+ createIndexEndpointTransportSettings,
+ settings.createIndexEndpointSettings(),
+ clientContext);
+ this.createIndexEndpointOperationCallable =
+ callableFactory.createOperationCallable(
+ createIndexEndpointTransportSettings,
+ settings.createIndexEndpointOperationSettings(),
+ clientContext,
+ operationsStub);
+ this.getIndexEndpointCallable =
+ callableFactory.createUnaryCallable(
+ getIndexEndpointTransportSettings, settings.getIndexEndpointSettings(), clientContext);
+ this.listIndexEndpointsCallable =
+ callableFactory.createUnaryCallable(
+ listIndexEndpointsTransportSettings,
+ settings.listIndexEndpointsSettings(),
+ clientContext);
+ this.listIndexEndpointsPagedCallable =
+ callableFactory.createPagedCallable(
+ listIndexEndpointsTransportSettings,
+ settings.listIndexEndpointsSettings(),
+ clientContext);
+ this.updateIndexEndpointCallable =
+ callableFactory.createUnaryCallable(
+ updateIndexEndpointTransportSettings,
+ settings.updateIndexEndpointSettings(),
+ clientContext);
+ this.deleteIndexEndpointCallable =
+ callableFactory.createUnaryCallable(
+ deleteIndexEndpointTransportSettings,
+ settings.deleteIndexEndpointSettings(),
+ clientContext);
+ this.deleteIndexEndpointOperationCallable =
+ callableFactory.createOperationCallable(
+ deleteIndexEndpointTransportSettings,
+ settings.deleteIndexEndpointOperationSettings(),
+ clientContext,
+ operationsStub);
+ this.deployIndexCallable =
+ callableFactory.createUnaryCallable(
+ deployIndexTransportSettings, settings.deployIndexSettings(), clientContext);
+ this.deployIndexOperationCallable =
+ callableFactory.createOperationCallable(
+ deployIndexTransportSettings,
+ settings.deployIndexOperationSettings(),
+ clientContext,
+ operationsStub);
+ this.undeployIndexCallable =
+ callableFactory.createUnaryCallable(
+ undeployIndexTransportSettings, settings.undeployIndexSettings(), clientContext);
+ this.undeployIndexOperationCallable =
+ callableFactory.createOperationCallable(
+ undeployIndexTransportSettings,
+ settings.undeployIndexOperationSettings(),
+ clientContext,
+ operationsStub);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ public GrpcOperationsStub getOperationsStub() {
+ return operationsStub;
+ }
+
+ @Override
+ public UnaryCallable createIndexEndpointCallable() {
+ return createIndexEndpointCallable;
+ }
+
+ @Override
+ public OperationCallable<
+ CreateIndexEndpointRequest, IndexEndpoint, CreateIndexEndpointOperationMetadata>
+ createIndexEndpointOperationCallable() {
+ return createIndexEndpointOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable