diff --git a/java-aiplatform/README.md b/java-aiplatform/README.md
index 96d7810dae54..b73297eb3715 100644
--- a/java-aiplatform/README.md
+++ b/java-aiplatform/README.md
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
com.google.cloudlibraries-bom
- 26.15.0
+ 26.16.0pomimport
@@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-aiplatform.svg
-[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.18.0
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-aiplatform/3.19.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/MetadataServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/MetadataServiceClient.java
index cc78c62b85be..f33001668c0d 100644
--- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/MetadataServiceClient.java
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/MetadataServiceClient.java
@@ -1272,7 +1272,6 @@ public final UnaryCallable listArti
* Artifact to be updated. Format:
* `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
* @param updateMask Optional. A FieldMask indicating which fields should be updated.
- * Functionality of this field is not yet supported.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Artifact updateArtifact(Artifact artifact, FieldMask updateMask) {
@@ -2110,7 +2109,6 @@ public final UnaryCallable listContex
* Context to be updated. Format:
* `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
* @param updateMask Optional. A FieldMask indicating which fields should be updated.
- * Functionality of this field is not yet supported.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Context updateContext(Context context, FieldMask updateMask) {
@@ -3537,7 +3535,6 @@ public final ListExecutionsPagedResponse listExecutions(ListExecutionsRequest re
* Execution to be updated. Format:
* `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
* @param updateMask Optional. A FieldMask indicating which fields should be updated.
- * Functionality of this field is not yet supported.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Execution updateExecution(Execution execution, FieldMask updateMask) {
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelGardenServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelGardenServiceClient.java
new file mode 100644
index 000000000000..f1cc23b7675a
--- /dev/null
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelGardenServiceClient.java
@@ -0,0 +1,762 @@
+/*
+ * Copyright 2022 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.gax.core.BackgroundResource;
+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.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.aiplatform.v1.stub.ModelGardenServiceStub;
+import com.google.cloud.aiplatform.v1.stub.ModelGardenServiceStubSettings;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: The interface of Model Garden Service.
+ *
+ *
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
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * PublisherModelName name = PublisherModelName.of("[PUBLISHER]", "[MODEL]");
+ * PublisherModel response = modelGardenServiceClient.getPublisherModel(name);
+ * }
+ * }
+ *
+ *
Note: close() needs to be called on the ModelGardenServiceClient 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 ModelGardenServiceSettings to
+ * create(). For example:
+ *
+ *
To customize credentials:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ModelGardenServiceSettings modelGardenServiceSettings =
+ * ModelGardenServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ModelGardenServiceClient modelGardenServiceClient =
+ * ModelGardenServiceClient.create(modelGardenServiceSettings);
+ * }
+ *
+ *
To customize the endpoint:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ModelGardenServiceSettings modelGardenServiceSettings =
+ * ModelGardenServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ModelGardenServiceClient modelGardenServiceClient =
+ * ModelGardenServiceClient.create(modelGardenServiceSettings);
+ * }
+ *
+ *
Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class ModelGardenServiceClient implements BackgroundResource {
+ private final ModelGardenServiceSettings settings;
+ private final ModelGardenServiceStub stub;
+
+ /** Constructs an instance of ModelGardenServiceClient with default settings. */
+ public static final ModelGardenServiceClient create() throws IOException {
+ return create(ModelGardenServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ModelGardenServiceClient, 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 ModelGardenServiceClient create(ModelGardenServiceSettings settings)
+ throws IOException {
+ return new ModelGardenServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ModelGardenServiceClient, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(ModelGardenServiceSettings).
+ */
+ public static final ModelGardenServiceClient create(ModelGardenServiceStub stub) {
+ return new ModelGardenServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ModelGardenServiceClient, 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 ModelGardenServiceClient(ModelGardenServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((ModelGardenServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected ModelGardenServiceClient(ModelGardenServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final ModelGardenServiceSettings getSettings() {
+ return settings;
+ }
+
+ public ModelGardenServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Model Garden publisher model.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * PublisherModelName name = PublisherModelName.of("[PUBLISHER]", "[MODEL]");
+ * PublisherModel response = modelGardenServiceClient.getPublisherModel(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the PublisherModel resource. Format:
+ * `publishers/{publisher}/models/{publisher_model}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PublisherModel getPublisherModel(PublisherModelName name) {
+ GetPublisherModelRequest request =
+ GetPublisherModelRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getPublisherModel(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Model Garden publisher model.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * String name = PublisherModelName.of("[PUBLISHER]", "[MODEL]").toString();
+ * PublisherModel response = modelGardenServiceClient.getPublisherModel(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the PublisherModel resource. Format:
+ * `publishers/{publisher}/models/{publisher_model}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PublisherModel getPublisherModel(String name) {
+ GetPublisherModelRequest request = GetPublisherModelRequest.newBuilder().setName(name).build();
+ return getPublisherModel(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Model Garden publisher model.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * GetPublisherModelRequest request =
+ * GetPublisherModelRequest.newBuilder()
+ * .setName(PublisherModelName.of("[PUBLISHER]", "[MODEL]").toString())
+ * .setLanguageCode("languageCode-2092349083")
+ * .setView(PublisherModelView.forNumber(0))
+ * .build();
+ * PublisherModel response = modelGardenServiceClient.getPublisherModel(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 PublisherModel getPublisherModel(GetPublisherModelRequest request) {
+ return getPublisherModelCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Model Garden publisher model.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * GetPublisherModelRequest request =
+ * GetPublisherModelRequest.newBuilder()
+ * .setName(PublisherModelName.of("[PUBLISHER]", "[MODEL]").toString())
+ * .setLanguageCode("languageCode-2092349083")
+ * .setView(PublisherModelView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * modelGardenServiceClient.getPublisherModelCallable().futureCall(request);
+ * // Do something.
+ * PublisherModel response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getPublisherModelCallable() {
+ return stub.getPublisherModelCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : modelGardenServiceClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * modelGardenServiceClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listLocationsPagedCallable() {
+ return stub.listLocationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * modelGardenServiceClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listLocationsCallable() {
+ return stub.listLocationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = modelGardenServiceClient.getLocation(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 Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future =
+ * modelGardenServiceClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getLocationCallable() {
+ return stub.getLocationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replacesany existing policy.
+ *
+ *
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = modelGardenServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replacesany existing policy.
+ *
+ *
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * modelGardenServiceClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable setIamPolicyCallable() {
+ return stub.setIamPolicyCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists
+ * and does not have a policy set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = modelGardenServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists
+ * and does not have a policy set.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * modelGardenServiceClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getIamPolicyCallable() {
+ return stub.getIamPolicyCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist,
+ * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
+ *
+ *
Note: This operation is designed to be used for buildingpermission-aware UIs and
+ * command-line tools, not for authorizationchecking. This operation may "fail open" without
+ * warning.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = modelGardenServiceClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist,
+ * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
+ *
+ *
Note: This operation is designed to be used for buildingpermission-aware UIs and
+ * command-line tools, not for authorizationchecking. This operation may "fail open" without
+ * warning.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * modelGardenServiceClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ testIamPermissionsCallable() {
+ return stub.testIamPermissionsCallable();
+ }
+
+ @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 ListLocationsPagedResponse
+ extends AbstractPagedListResponse<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListLocationsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListLocationsPagedResponse(ListLocationsPage page) {
+ super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListLocationsPage
+ extends AbstractPage<
+ ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
+
+ private ListLocationsPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ super(context, response);
+ }
+
+ private static ListLocationsPage createEmptyPage() {
+ return new ListLocationsPage(null, null);
+ }
+
+ @Override
+ protected ListLocationsPage createPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ return new ListLocationsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListLocationsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ private ListLocationsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListLocationsFixedSizeCollection createEmptyCollection() {
+ return new ListLocationsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListLocationsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListLocationsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+}
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelGardenServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelGardenServiceSettings.java
new file mode 100644
index 000000000000..b3d48db16835
--- /dev/null
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelGardenServiceSettings.java
@@ -0,0 +1,255 @@
+/*
+ * Copyright 2022 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.ModelGardenServiceClient.ListLocationsPagedResponse;
+
+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.PagedCallSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.cloud.aiplatform.v1.stub.ModelGardenServiceStubSettings;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
+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 ModelGardenServiceClient}.
+ *
+ *
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 getPublisherModel to 30 seconds:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ModelGardenServiceSettings.Builder modelGardenServiceSettingsBuilder =
+ * ModelGardenServiceSettings.newBuilder();
+ * modelGardenServiceSettingsBuilder
+ * .getPublisherModelSettings()
+ * .setRetrySettings(
+ * modelGardenServiceSettingsBuilder
+ * .getPublisherModelSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ModelGardenServiceSettings modelGardenServiceSettings =
+ * modelGardenServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ModelGardenServiceSettings extends ClientSettings {
+
+ /** Returns the object with the settings used for calls to getPublisherModel. */
+ public UnaryCallSettings getPublisherModelSettings() {
+ return ((ModelGardenServiceStubSettings) getStubSettings()).getPublisherModelSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return ((ModelGardenServiceStubSettings) getStubSettings()).listLocationsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return ((ModelGardenServiceStubSettings) getStubSettings()).getLocationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return ((ModelGardenServiceStubSettings) getStubSettings()).setIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return ((ModelGardenServiceStubSettings) getStubSettings()).getIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return ((ModelGardenServiceStubSettings) getStubSettings()).testIamPermissionsSettings();
+ }
+
+ public static final ModelGardenServiceSettings create(ModelGardenServiceStubSettings stub)
+ throws IOException {
+ return new ModelGardenServiceSettings.Builder(stub.toBuilder()).build();
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return ModelGardenServiceStubSettings.defaultExecutorProviderBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ public static String getDefaultEndpoint() {
+ return ModelGardenServiceStubSettings.getDefaultEndpoint();
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return ModelGardenServiceStubSettings.getDefaultServiceScopes();
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return ModelGardenServiceStubSettings.defaultCredentialsProviderBuilder();
+ }
+
+ /** Returns a builder for the default ChannelProvider for this service. */
+ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
+ return ModelGardenServiceStubSettings.defaultGrpcTransportProviderBuilder();
+ }
+
+ public static TransportChannelProvider defaultTransportChannelProvider() {
+ return ModelGardenServiceStubSettings.defaultTransportChannelProvider();
+ }
+
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return ModelGardenServiceStubSettings.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 ModelGardenServiceSettings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+ }
+
+ /** Builder for ModelGardenServiceSettings. */
+ public static class Builder extends ClientSettings.Builder {
+
+ protected Builder() throws IOException {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(ModelGardenServiceStubSettings.newBuilder(clientContext));
+ }
+
+ protected Builder(ModelGardenServiceSettings settings) {
+ super(settings.getStubSettings().toBuilder());
+ }
+
+ protected Builder(ModelGardenServiceStubSettings.Builder stubSettings) {
+ super(stubSettings);
+ }
+
+ private static Builder createDefault() {
+ return new Builder(ModelGardenServiceStubSettings.newBuilder());
+ }
+
+ public ModelGardenServiceStubSettings.Builder getStubSettingsBuilder() {
+ return ((ModelGardenServiceStubSettings.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 getPublisherModel. */
+ public UnaryCallSettings.Builder
+ getPublisherModelSettings() {
+ return getStubSettingsBuilder().getPublisherModelSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return getStubSettingsBuilder().listLocationsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getStubSettingsBuilder().getLocationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings.Builder setIamPolicySettings() {
+ return getStubSettingsBuilder().setIamPolicySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings.Builder getIamPolicySettings() {
+ return getStubSettingsBuilder().getIamPolicySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings.Builder
+ testIamPermissionsSettings() {
+ return getStubSettingsBuilder().testIamPermissionsSettings();
+ }
+
+ @Override
+ public ModelGardenServiceSettings build() throws IOException {
+ return new ModelGardenServiceSettings(this);
+ }
+ }
+}
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java
index e5ebbfe956e5..a346af82e28f 100644
--- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java
@@ -544,8 +544,7 @@ public final UnaryCallable rawPredictCallable() {
* [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.
+ * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated.
*
*
Sample code:
*
@@ -607,8 +606,7 @@ public final ExplainResponse explain(
* [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.
+ * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated.
*
*
Sample code:
*
@@ -671,8 +669,7 @@ public final ExplainResponse explain(
* [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.
+ * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated.
*
*
Sample code:
*
@@ -714,8 +711,7 @@ public final ExplainResponse explain(ExplainRequest request) {
* [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.
+ * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated.
*
*
Sample code:
*
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/VizierServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/VizierServiceClient.java
index 039b097cbd80..fea0d73bf0f9 100644
--- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/VizierServiceClient.java
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/VizierServiceClient.java
@@ -812,7 +812,7 @@ public final UnaryCallable lookupStudyCallable() {
* Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier.
* Returns a long-running operation associated with the generation of Trial suggestions. When this
* long-running operation succeeds, it will contain a
- * [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse].
+ * [SuggestTrialsResponse][google.cloud.aiplatform.v1.SuggestTrialsResponse].
*
*
Sample code:
*
@@ -846,7 +846,7 @@ public final OperationFuture sugge
* Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier.
* Returns a long-running operation associated with the generation of Trial suggestions. When this
* long-running operation succeeds, it will contain a
- * [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse].
+ * [SuggestTrialsResponse][google.cloud.aiplatform.v1.SuggestTrialsResponse].
*
*
Sample code:
*
@@ -880,7 +880,7 @@ public final OperationFuture sugge
* Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier.
* Returns a long-running operation associated with the generation of Trial suggestions. When this
* long-running operation succeeds, it will contain a
- * [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse].
+ * [SuggestTrialsResponse][google.cloud.aiplatform.v1.SuggestTrialsResponse].
*
*
Service Description: The interface of Model Garden Service.
+ *
+ *
Sample for ModelGardenServiceClient:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * PublisherModelName name = PublisherModelName.of("[PUBLISHER]", "[MODEL]");
+ * PublisherModel response = modelGardenServiceClient.getPublisherModel(name);
+ * }
+ * }
Service Description: A service for creating and managing Vertex AI's pipelines. This includes
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelGardenServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelGardenServiceCallableFactory.java
new file mode 100644
index 000000000000..9a910f79f726
--- /dev/null
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelGardenServiceCallableFactory.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2022 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 ModelGardenService service API.
+ *
+ *
This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcModelGardenServiceCallableFactory 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/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelGardenServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelGardenServiceStub.java
new file mode 100644
index 000000000000..fe2f55693a24
--- /dev/null
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelGardenServiceStub.java
@@ -0,0 +1,332 @@
+/*
+ * Copyright 2022 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.ModelGardenServiceClient.ListLocationsPagedResponse;
+
+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.UnaryCallable;
+import com.google.cloud.aiplatform.v1.GetPublisherModelRequest;
+import com.google.cloud.aiplatform.v1.PublisherModel;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.common.collect.ImmutableMap;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
+import com.google.longrunning.stub.GrpcOperationsStub;
+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 ModelGardenService service API.
+ *
+ *
This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcModelGardenServiceStub extends ModelGardenServiceStub {
+ private static final MethodDescriptor
+ getPublisherModelMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.aiplatform.v1.ModelGardenService/GetPublisherModel")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetPublisherModelRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(PublisherModel.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ listLocationsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/ListLocations")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor getLocationMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/GetLocation")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor setIamPolicyMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy")
+ .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor getIamPolicyMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ testIamPermissionsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance()))
+ .build();
+
+ private final UnaryCallable getPublisherModelCallable;
+ private final UnaryCallable listLocationsCallable;
+ private final UnaryCallable
+ listLocationsPagedCallable;
+ private final UnaryCallable getLocationCallable;
+ private final UnaryCallable setIamPolicyCallable;
+ private final UnaryCallable getIamPolicyCallable;
+ private final UnaryCallable
+ testIamPermissionsCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final GrpcOperationsStub operationsStub;
+ private final GrpcStubCallableFactory callableFactory;
+
+ public static final GrpcModelGardenServiceStub create(ModelGardenServiceStubSettings settings)
+ throws IOException {
+ return new GrpcModelGardenServiceStub(settings, ClientContext.create(settings));
+ }
+
+ public static final GrpcModelGardenServiceStub create(ClientContext clientContext)
+ throws IOException {
+ return new GrpcModelGardenServiceStub(
+ ModelGardenServiceStubSettings.newBuilder().build(), clientContext);
+ }
+
+ public static final GrpcModelGardenServiceStub create(
+ ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException {
+ return new GrpcModelGardenServiceStub(
+ ModelGardenServiceStubSettings.newBuilder().build(), clientContext, callableFactory);
+ }
+
+ /**
+ * Constructs an instance of GrpcModelGardenServiceStub, 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 GrpcModelGardenServiceStub(
+ ModelGardenServiceStubSettings settings, ClientContext clientContext) throws IOException {
+ this(settings, clientContext, new GrpcModelGardenServiceCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of GrpcModelGardenServiceStub, 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 GrpcModelGardenServiceStub(
+ ModelGardenServiceStubSettings settings,
+ ClientContext clientContext,
+ GrpcStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
+
+ GrpcCallSettings getPublisherModelTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getPublisherModelMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings listLocationsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listLocationsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings getLocationTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getLocationMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings setIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(setIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings getIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ testIamPermissionsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(testIamPermissionsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
+ })
+ .build();
+
+ this.getPublisherModelCallable =
+ callableFactory.createUnaryCallable(
+ getPublisherModelTransportSettings,
+ settings.getPublisherModelSettings(),
+ clientContext);
+ this.listLocationsCallable =
+ callableFactory.createUnaryCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.listLocationsPagedCallable =
+ callableFactory.createPagedCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.getLocationCallable =
+ callableFactory.createUnaryCallable(
+ getLocationTransportSettings, settings.getLocationSettings(), clientContext);
+ this.setIamPolicyCallable =
+ callableFactory.createUnaryCallable(
+ setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);
+ this.getIamPolicyCallable =
+ callableFactory.createUnaryCallable(
+ getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);
+ this.testIamPermissionsCallable =
+ callableFactory.createUnaryCallable(
+ testIamPermissionsTransportSettings,
+ settings.testIamPermissionsSettings(),
+ clientContext);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ public GrpcOperationsStub getOperationsStub() {
+ return operationsStub;
+ }
+
+ @Override
+ public UnaryCallable getPublisherModelCallable() {
+ return getPublisherModelCallable;
+ }
+
+ @Override
+ public UnaryCallable listLocationsCallable() {
+ return listLocationsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ return listLocationsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getLocationCallable() {
+ return getLocationCallable;
+ }
+
+ @Override
+ public UnaryCallable setIamPolicyCallable() {
+ return setIamPolicyCallable;
+ }
+
+ @Override
+ public UnaryCallable getIamPolicyCallable() {
+ return getIamPolicyCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ testIamPermissionsCallable() {
+ return testIamPermissionsCallable;
+ }
+
+ @Override
+ public final void close() {
+ try {
+ backgroundResources.close();
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new IllegalStateException("Failed to close resource", e);
+ }
+ }
+
+ @Override
+ public void shutdown() {
+ backgroundResources.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return backgroundResources.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return backgroundResources.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ backgroundResources.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return backgroundResources.awaitTermination(duration, unit);
+ }
+}
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelGardenServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelGardenServiceStub.java
new file mode 100644
index 000000000000..736bb5b7ae81
--- /dev/null
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelGardenServiceStub.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2022 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.ModelGardenServiceClient.ListLocationsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.aiplatform.v1.GetPublisherModelRequest;
+import com.google.cloud.aiplatform.v1.PublisherModel;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the ModelGardenService service API.
+ *
+ *
This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class ModelGardenServiceStub implements BackgroundResource {
+
+ public UnaryCallable getPublisherModelCallable() {
+ throw new UnsupportedOperationException("Not implemented: getPublisherModelCallable()");
+ }
+
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
+ }
+
+ public UnaryCallable listLocationsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsCallable()");
+ }
+
+ public UnaryCallable getLocationCallable() {
+ throw new UnsupportedOperationException("Not implemented: getLocationCallable()");
+ }
+
+ public UnaryCallable setIamPolicyCallable() {
+ throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()");
+ }
+
+ public UnaryCallable getIamPolicyCallable() {
+ throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()");
+ }
+
+ public UnaryCallable
+ testIamPermissionsCallable() {
+ throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
+ }
+
+ @Override
+ public abstract void close();
+}
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelGardenServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelGardenServiceStubSettings.java
new file mode 100644
index 000000000000..eb04a3fba678
--- /dev/null
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelGardenServiceStubSettings.java
@@ -0,0 +1,465 @@
+/*
+ * Copyright 2022 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.ModelGardenServiceClient.ListLocationsPagedResponse;
+
+import com.google.api.core.ApiFunction;
+import com.google.api.core.ApiFuture;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.GaxProperties;
+import com.google.api.gax.core.GoogleCredentialsProvider;
+import com.google.api.gax.core.InstantiatingExecutorProvider;
+import com.google.api.gax.grpc.GaxGrpcProperties;
+import com.google.api.gax.grpc.GrpcTransportChannel;
+import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.retrying.RetrySettings;
+import com.google.api.gax.rpc.ApiCallContext;
+import com.google.api.gax.rpc.ApiClientHeaderProvider;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.PagedListDescriptor;
+import com.google.api.gax.rpc.PagedListResponseFactory;
+import com.google.api.gax.rpc.StatusCode;
+import com.google.api.gax.rpc.StubSettings;
+import com.google.api.gax.rpc.TransportChannelProvider;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.aiplatform.v1.GetPublisherModelRequest;
+import com.google.cloud.aiplatform.v1.PublisherModel;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Lists;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
+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 ModelGardenServiceStub}.
+ *
+ *
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 getPublisherModel to 30 seconds:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ModelGardenServiceStubSettings.Builder modelGardenServiceSettingsBuilder =
+ * ModelGardenServiceStubSettings.newBuilder();
+ * modelGardenServiceSettingsBuilder
+ * .getPublisherModelSettings()
+ * .setRetrySettings(
+ * modelGardenServiceSettingsBuilder
+ * .getPublisherModelSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ModelGardenServiceStubSettings modelGardenServiceSettings =
+ * modelGardenServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ModelGardenServiceStubSettings extends StubSettings {
+ /** The default scopes of the service. */
+ private static final ImmutableList DEFAULT_SERVICE_SCOPES =
+ ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
+
+ private final UnaryCallSettings
+ getPublisherModelSettings;
+ private final PagedCallSettings<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings getLocationSettings;
+ private final UnaryCallSettings setIamPolicySettings;
+ private final UnaryCallSettings getIamPolicySettings;
+ private final UnaryCallSettings
+ testIamPermissionsSettings;
+
+ private static final PagedListDescriptor
+ LIST_LOCATIONS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) {
+ return ListLocationsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) {
+ return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListLocationsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListLocationsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListLocationsResponse payload) {
+ return payload.getLocationsList() == null
+ ? ImmutableList.of()
+ : payload.getLocationsList();
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ LIST_LOCATIONS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListLocationsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context);
+ return ListLocationsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ /** Returns the object with the settings used for calls to getPublisherModel. */
+ public UnaryCallSettings getPublisherModelSettings() {
+ return getPublisherModelSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return listLocationsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return getLocationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return setIamPolicySettings;
+ }
+
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return getIamPolicySettings;
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return testIamPermissionsSettings;
+ }
+
+ public ModelGardenServiceStub createStub() throws IOException {
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(GrpcTransportChannel.getGrpcTransportName())) {
+ return GrpcModelGardenServiceStub.create(this);
+ }
+ throw new UnsupportedOperationException(
+ String.format(
+ "Transport not supported: %s", getTransportChannelProvider().getTransportName()));
+ }
+
+ /** Returns a builder for the default ExecutorProvider for this service. */
+ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
+ return InstantiatingExecutorProvider.newBuilder();
+ }
+
+ /** Returns the default service endpoint. */
+ public static String getDefaultEndpoint() {
+ return "aiplatform.googleapis.com:443";
+ }
+
+ /** Returns the default mTLS service endpoint. */
+ public static String getDefaultMtlsEndpoint() {
+ return "aiplatform.mtls.googleapis.com:443";
+ }
+
+ /** Returns the default service scopes. */
+ public static List getDefaultServiceScopes() {
+ return DEFAULT_SERVICE_SCOPES;
+ }
+
+ /** Returns a builder for the default credentials for this service. */
+ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
+ return GoogleCredentialsProvider.newBuilder()
+ .setScopesToApply(DEFAULT_SERVICE_SCOPES)
+ .setUseJwtAccessWithScope(true);
+ }
+
+ /** Returns a builder for the default ChannelProvider for this service. */
+ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
+ return InstantiatingGrpcChannelProvider.newBuilder()
+ .setMaxInboundMessageSize(Integer.MAX_VALUE);
+ }
+
+ public static TransportChannelProvider defaultTransportChannelProvider() {
+ return defaultGrpcTransportProviderBuilder().build();
+ }
+
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(ModelGardenServiceStubSettings.class))
+ .setTransportToken(
+ GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
+ }
+
+ /** 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 ModelGardenServiceStubSettings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+
+ getPublisherModelSettings = settingsBuilder.getPublisherModelSettings().build();
+ listLocationsSettings = settingsBuilder.listLocationsSettings().build();
+ getLocationSettings = settingsBuilder.getLocationSettings().build();
+ setIamPolicySettings = settingsBuilder.setIamPolicySettings().build();
+ getIamPolicySettings = settingsBuilder.getIamPolicySettings().build();
+ testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
+ }
+
+ /** Builder for ModelGardenServiceStubSettings. */
+ public static class Builder
+ extends StubSettings.Builder {
+ private final ImmutableList> unaryMethodSettingsBuilders;
+ private final UnaryCallSettings.Builder
+ getPublisherModelSettings;
+ private final PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings.Builder getLocationSettings;
+ private final UnaryCallSettings.Builder setIamPolicySettings;
+ private final UnaryCallSettings.Builder getIamPolicySettings;
+ private final UnaryCallSettings.Builder
+ testIamPermissionsSettings;
+ private static final ImmutableMap>
+ RETRYABLE_CODE_DEFINITIONS;
+
+ static {
+ ImmutableMap.Builder> definitions =
+ ImmutableMap.builder();
+ definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ RETRYABLE_CODE_DEFINITIONS = definitions.build();
+ }
+
+ private static final ImmutableMap RETRY_PARAM_DEFINITIONS;
+
+ static {
+ ImmutableMap.Builder definitions = ImmutableMap.builder();
+ RetrySettings settings = null;
+ settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
+ definitions.put("no_retry_params", settings);
+ RETRY_PARAM_DEFINITIONS = definitions.build();
+ }
+
+ protected Builder() {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(clientContext);
+
+ getPublisherModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT);
+ getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(
+ getPublisherModelSettings,
+ listLocationsSettings,
+ getLocationSettings,
+ setIamPolicySettings,
+ getIamPolicySettings,
+ testIamPermissionsSettings);
+ initDefaults(this);
+ }
+
+ protected Builder(ModelGardenServiceStubSettings settings) {
+ super(settings);
+
+ getPublisherModelSettings = settings.getPublisherModelSettings.toBuilder();
+ listLocationsSettings = settings.listLocationsSettings.toBuilder();
+ getLocationSettings = settings.getLocationSettings.toBuilder();
+ setIamPolicySettings = settings.setIamPolicySettings.toBuilder();
+ getIamPolicySettings = settings.getIamPolicySettings.toBuilder();
+ testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(
+ getPublisherModelSettings,
+ listLocationsSettings,
+ getLocationSettings,
+ setIamPolicySettings,
+ getIamPolicySettings,
+ testIamPermissionsSettings);
+ }
+
+ private static Builder createDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultTransportChannelProvider());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
+ private static Builder initDefaults(Builder builder) {
+ builder
+ .getPublisherModelSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .listLocationsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getLocationSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .setIamPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getIamPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .testIamPermissionsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ return builder;
+ }
+
+ /**
+ * 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(unaryMethodSettingsBuilders, settingsUpdater);
+ return this;
+ }
+
+ public ImmutableList> unaryMethodSettingsBuilders() {
+ return unaryMethodSettingsBuilders;
+ }
+
+ /** Returns the builder for the settings used for calls to getPublisherModel. */
+ public UnaryCallSettings.Builder
+ getPublisherModelSettings() {
+ return getPublisherModelSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return listLocationsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getLocationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings.Builder setIamPolicySettings() {
+ return setIamPolicySettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings.Builder getIamPolicySettings() {
+ return getIamPolicySettings;
+ }
+
+ /** Returns the builder for the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings.Builder
+ testIamPermissionsSettings() {
+ return testIamPermissionsSettings;
+ }
+
+ @Override
+ public ModelGardenServiceStubSettings build() throws IOException {
+ return new ModelGardenServiceStubSettings(this);
+ }
+ }
+}
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MetadataServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MetadataServiceClient.java
index b166e47949de..6c64de1506d9 100644
--- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MetadataServiceClient.java
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/MetadataServiceClient.java
@@ -1274,7 +1274,6 @@ public final UnaryCallable listArti
* the Artifact to be updated. Format:
* `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
* @param updateMask Optional. A FieldMask indicating which fields should be updated.
- * Functionality of this field is not yet supported.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Artifact updateArtifact(Artifact artifact, FieldMask updateMask) {
@@ -2112,7 +2111,6 @@ public final UnaryCallable listContex
* Context to be updated. Format:
* `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
* @param updateMask Optional. A FieldMask indicating which fields should be updated.
- * Functionality of this field is not yet supported.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Context updateContext(Context context, FieldMask updateMask) {
@@ -3539,7 +3537,6 @@ public final ListExecutionsPagedResponse listExecutions(ListExecutionsRequest re
* the Execution to be updated. Format:
* `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
* @param updateMask Optional. A FieldMask indicating which fields should be updated.
- * Functionality of this field is not yet supported.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Execution updateExecution(Execution execution, FieldMask updateMask) {
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java
index 45aedba47ace..f1fb4533f58b 100644
--- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/PredictionServiceClient.java
@@ -553,7 +553,6 @@ public final UnaryCallable rawPredictCallable() {
* If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is not
* specified, all DeployedModels must have
* [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
- * Only deployed AutoML tabular Models have explanation_spec.
*
*
Sample code:
*
@@ -616,7 +615,6 @@ public final ExplainResponse explain(
* If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is not
* specified, all DeployedModels must have
* [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
- * Only deployed AutoML tabular Models have explanation_spec.
*
*
Sample code:
*
@@ -680,7 +678,6 @@ public final ExplainResponse explain(
* If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is not
* specified, all DeployedModels must have
* [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
- * Only deployed AutoML tabular Models have explanation_spec.
*
*
Sample code:
*
@@ -723,7 +720,6 @@ public final ExplainResponse explain(ExplainRequest request) {
* If [deployed_model_id][google.cloud.aiplatform.v1beta1.ExplainRequest.deployed_model_id] is not
* specified, all DeployedModels must have
* [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] populated.
- * Only deployed AutoML tabular Models have explanation_spec.
*
*
Sample code:
*
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VizierServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VizierServiceClient.java
index 6ac5fbd6ac01..19eb5d4c6607 100644
--- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VizierServiceClient.java
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/VizierServiceClient.java
@@ -814,7 +814,7 @@ public final UnaryCallable lookupStudyCallable() {
* Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier.
* Returns a long-running operation associated with the generation of Trial suggestions. When this
* long-running operation succeeds, it will contain a
- * [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse].
+ * [SuggestTrialsResponse][google.cloud.aiplatform.v1beta1.SuggestTrialsResponse].
*
*
Sample code:
*
@@ -848,7 +848,7 @@ public final OperationFuture sugge
* Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier.
* Returns a long-running operation associated with the generation of Trial suggestions. When this
* long-running operation succeeds, it will contain a
- * [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse].
+ * [SuggestTrialsResponse][google.cloud.aiplatform.v1beta1.SuggestTrialsResponse].
*
*
Sample code:
*
@@ -882,7 +882,7 @@ public final OperationFuture sugge
* Adds one or more Trials to a Study, with parameter values suggested by Vertex AI Vizier.
* Returns a long-running operation associated with the generation of Trial suggestions. When this
* long-running operation succeeds, it will contain a
- * [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse].
+ * [SuggestTrialsResponse][google.cloud.aiplatform.v1beta1.SuggestTrialsResponse].
*
*
Sample code:
*
diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelGardenService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelGardenService.java
new file mode 100644
index 000000000000..56aa4b265846
--- /dev/null
+++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelGardenService.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2022 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.BetaApi;
+import com.google.api.gax.grpc.testing.MockGrpcService;
+import com.google.protobuf.AbstractMessage;
+import io.grpc.ServerServiceDefinition;
+import java.util.List;
+import javax.annotation.Generated;
+
+@BetaApi
+@Generated("by gapic-generator-java")
+public class MockModelGardenService implements MockGrpcService {
+ private final MockModelGardenServiceImpl serviceImpl;
+
+ public MockModelGardenService() {
+ serviceImpl = new MockModelGardenServiceImpl();
+ }
+
+ @Override
+ public List getRequests() {
+ return serviceImpl.getRequests();
+ }
+
+ @Override
+ public void addResponse(AbstractMessage response) {
+ serviceImpl.addResponse(response);
+ }
+
+ @Override
+ public void addException(Exception exception) {
+ serviceImpl.addException(exception);
+ }
+
+ @Override
+ public ServerServiceDefinition getServiceDefinition() {
+ return serviceImpl.bindService();
+ }
+
+ @Override
+ public void reset() {
+ serviceImpl.reset();
+ }
+}
diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelGardenServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelGardenServiceImpl.java
new file mode 100644
index 000000000000..c664b5accbeb
--- /dev/null
+++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelGardenServiceImpl.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2022 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.BetaApi;
+import com.google.cloud.aiplatform.v1.ModelGardenServiceGrpc.ModelGardenServiceImplBase;
+import com.google.protobuf.AbstractMessage;
+import io.grpc.stub.StreamObserver;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Queue;
+import javax.annotation.Generated;
+
+@BetaApi
+@Generated("by gapic-generator-java")
+public class MockModelGardenServiceImpl extends ModelGardenServiceImplBase {
+ private List requests;
+ private Queue