From 49fb069d61270657145130470d3546ea3a33490d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 26 Jul 2022 19:26:29 +0000 Subject: [PATCH] feat: add DeploymentResourcePool in aiplatform v1beta1 deployment_resource_pool.proto (#998) - [ ] Regenerate this pull request now. feat: add DeploymentResourcePoolService in aiplatform v1beta1 deployment_resource_pool_service.proto feat: add SHARED_RESOURCES to DeploymentResourcesType in aiplatform v1beta1 model.proto PiperOrigin-RevId: 463147866 Source-Link: https://github.com/googleapis/googleapis/commit/627646187513c840b8481a0b4f6249eba04a418f Source-Link: https://github.com/googleapis/googleapis-gen/commit/57665f4b491d7c0f1e466e430701dbae0472f64e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTc2NjVmNGI0OTFkN2MwZjFlNDY2ZTQzMDcwMWRiYWUwNDcyZjY0ZSJ9 chore(bazel): update protobuf to v3.21.3 chore(bazel): update gax-java to 2.18.4 PiperOrigin-RevId: 463115700 Source-Link: https://github.com/googleapis/googleapis/commit/52130a9c3c289e6bc4ab1784bdde6081abdf3dd9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6a4d9d9bb3afb20b0f5fa4f5d9f6740b1d0eb19a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmE0ZDlkOWJiM2FmYjIwYjBmNWZhNGY1ZDlmNjc0MGIxZDBlYjE5YSJ9 --- .../DeploymentResourcePoolServiceClient.java | 1580 +++++++++++++++ ...DeploymentResourcePoolServiceSettings.java | 358 ++++ .../aiplatform/v1beta1/gapic_metadata.json | 39 + .../aiplatform/v1beta1/package-info.java | 18 + .../DeploymentResourcePoolServiceStub.java | 147 ++ ...oymentResourcePoolServiceStubSettings.java | 868 ++++++++ ...entResourcePoolServiceCallableFactory.java | 115 ++ ...GrpcDeploymentResourcePoolServiceStub.java | 566 ++++++ ...ploymentResourcePoolServiceClientTest.java | 816 ++++++++ .../MockDeploymentResourcePoolService.java | 59 + ...MockDeploymentResourcePoolServiceImpl.java | 169 ++ .../DeploymentResourcePoolServiceGrpc.java | 885 ++++++++ .../com/google/cloud/aiplatform/v1/Model.java | 9 +- ...ploymentResourcePoolOperationMetadata.java | 782 ++++++++ ...esourcePoolOperationMetadataOrBuilder.java | 61 + .../CreateDeploymentResourcePoolRequest.java | 1200 +++++++++++ ...eploymentResourcePoolRequestOrBuilder.java | 131 ++ .../DeleteDeploymentResourcePoolRequest.java | 684 +++++++ ...eploymentResourcePoolRequestOrBuilder.java | 58 + .../v1beta1/DeploymentResourcePool.java | 1256 ++++++++++++ .../v1beta1/DeploymentResourcePoolName.java | 240 +++ .../DeploymentResourcePoolOrBuilder.java | 133 ++ .../v1beta1/DeploymentResourcePoolProto.java | 96 + .../DeploymentResourcePoolServiceProto.java | 275 +++ .../cloud/aiplatform/v1beta1/Endpoint.java | 8 +- .../aiplatform/v1beta1/EndpointOrBuilder.java | 2 +- .../aiplatform/v1beta1/EndpointProto.java | 8 +- .../GetDeploymentResourcePoolRequest.java | 679 +++++++ ...eploymentResourcePoolRequestOrBuilder.java | 58 + .../ListDeploymentResourcePoolsRequest.java | 974 +++++++++ ...ploymentResourcePoolsRequestOrBuilder.java | 103 + .../ListDeploymentResourcePoolsResponse.java | 1235 ++++++++++++ ...loymentResourcePoolsResponseOrBuilder.java | 116 ++ .../cloud/aiplatform/v1beta1/Model.java | 33 +- .../cloud/aiplatform/v1beta1/ModelProto.java | 49 +- .../cloud/aiplatform/v1beta1/ProjectName.java | 168 ++ .../v1beta1/QueryDeployedModelsRequest.java | 960 +++++++++ .../QueryDeployedModelsRequestOrBuilder.java | 101 + .../v1beta1/QueryDeployedModelsResponse.java | 1783 +++++++++++++++++ .../QueryDeployedModelsResponseOrBuilder.java | 182 ++ ...ploymentResourcePoolOperationMetadata.java | 782 ++++++++ ...esourcePoolOperationMetadataOrBuilder.java | 61 + .../v1beta1/deployment_resource_pool.proto | 50 + .../deployment_resource_pool_service.proto | 219 ++ .../cloud/aiplatform/v1beta1/endpoint.proto | 4 - .../cloud/aiplatform/v1beta1/model.proto | 4 + 46 files changed, 18075 insertions(+), 49 deletions(-) create mode 100644 google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceClient.java create mode 100644 google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceSettings.java create mode 100644 google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DeploymentResourcePoolServiceStub.java create mode 100644 google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DeploymentResourcePoolServiceStubSettings.java create mode 100644 google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDeploymentResourcePoolServiceCallableFactory.java create mode 100644 google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDeploymentResourcePoolServiceStub.java create mode 100644 google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceClientTest.java create mode 100644 google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDeploymentResourcePoolService.java create mode 100644 google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDeploymentResourcePoolServiceImpl.java create mode 100644 grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceGrpc.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolOperationMetadata.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolOperationMetadataOrBuilder.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolRequest.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolRequestOrBuilder.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteDeploymentResourcePoolRequest.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteDeploymentResourcePoolRequestOrBuilder.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePool.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolName.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolOrBuilder.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolProto.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceProto.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetDeploymentResourcePoolRequest.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetDeploymentResourcePoolRequestOrBuilder.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsRequest.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsRequestOrBuilder.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsResponse.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsResponseOrBuilder.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ProjectName.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsRequest.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsRequestOrBuilder.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsResponse.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsResponseOrBuilder.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateDeploymentResourcePoolOperationMetadata.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateDeploymentResourcePoolOperationMetadataOrBuilder.java create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto create mode 100644 proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceClient.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceClient.java new file mode 100644 index 000000000..bbc1b86b9 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceClient.java @@ -0,0 +1,1580 @@ +/* + * 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.v1beta1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.stub.DeploymentResourcePoolServiceStub; +import com.google.cloud.aiplatform.v1beta1.stub.DeploymentResourcePoolServiceStubSettings; +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 com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: A service that manages the DeploymentResourcePool resource. + * + *

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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+ *     DeploymentResourcePoolServiceClient.create()) {
+ *   DeploymentResourcePoolName name =
+ *       DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
+ *   DeploymentResourcePool response =
+ *       deploymentResourcePoolServiceClient.getDeploymentResourcePool(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the DeploymentResourcePoolServiceClient 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: + * + *

    + *
  1. 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. + *
  2. 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. + *
  3. 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 + * DeploymentResourcePoolServiceSettings to create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * DeploymentResourcePoolServiceSettings deploymentResourcePoolServiceSettings =
+ *     DeploymentResourcePoolServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+ *     DeploymentResourcePoolServiceClient.create(deploymentResourcePoolServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * DeploymentResourcePoolServiceSettings deploymentResourcePoolServiceSettings =
+ *     DeploymentResourcePoolServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+ *     DeploymentResourcePoolServiceClient.create(deploymentResourcePoolServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class DeploymentResourcePoolServiceClient implements BackgroundResource { + private final DeploymentResourcePoolServiceSettings settings; + private final DeploymentResourcePoolServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of DeploymentResourcePoolServiceClient with default settings. */ + public static final DeploymentResourcePoolServiceClient create() throws IOException { + return create(DeploymentResourcePoolServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DeploymentResourcePoolServiceClient, 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 DeploymentResourcePoolServiceClient create( + DeploymentResourcePoolServiceSettings settings) throws IOException { + return new DeploymentResourcePoolServiceClient(settings); + } + + /** + * Constructs an instance of DeploymentResourcePoolServiceClient, using the given stub for making + * calls. This is for advanced usage - prefer using create(DeploymentResourcePoolServiceSettings). + */ + public static final DeploymentResourcePoolServiceClient create( + DeploymentResourcePoolServiceStub stub) { + return new DeploymentResourcePoolServiceClient(stub); + } + + /** + * Constructs an instance of DeploymentResourcePoolServiceClient, 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 DeploymentResourcePoolServiceClient(DeploymentResourcePoolServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = + ((DeploymentResourcePoolServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected DeploymentResourcePoolServiceClient(DeploymentResourcePoolServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final DeploymentResourcePoolServiceSettings getSettings() { + return settings; + } + + public DeploymentResourcePoolServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   DeploymentResourcePool deploymentResourcePool = DeploymentResourcePool.newBuilder().build();
+   *   String deploymentResourcePoolId = "deploymentResourcePoolId1805697578";
+   *   DeploymentResourcePool response =
+   *       deploymentResourcePoolServiceClient
+   *           .createDeploymentResourcePoolAsync(
+   *               parent, deploymentResourcePool, deploymentResourcePoolId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent location resource where this DeploymentResourcePool will be + * created. Format: projects/{project}/locations/{location} + * @param deploymentResourcePool Required. The DeploymentResourcePool to create. + * @param deploymentResourcePoolId Required. The ID to use for the DeploymentResourcePool, which + * will become the final component of the DeploymentResourcePool's resource name. + *

The maximum length is 63 characters, and valid characters are + * `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolAsync( + LocationName parent, + DeploymentResourcePool deploymentResourcePool, + String deploymentResourcePoolId) { + CreateDeploymentResourcePoolRequest request = + CreateDeploymentResourcePoolRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDeploymentResourcePool(deploymentResourcePool) + .setDeploymentResourcePoolId(deploymentResourcePoolId) + .build(); + return createDeploymentResourcePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   DeploymentResourcePool deploymentResourcePool = DeploymentResourcePool.newBuilder().build();
+   *   String deploymentResourcePoolId = "deploymentResourcePoolId1805697578";
+   *   DeploymentResourcePool response =
+   *       deploymentResourcePoolServiceClient
+   *           .createDeploymentResourcePoolAsync(
+   *               parent, deploymentResourcePool, deploymentResourcePoolId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent location resource where this DeploymentResourcePool will be + * created. Format: projects/{project}/locations/{location} + * @param deploymentResourcePool Required. The DeploymentResourcePool to create. + * @param deploymentResourcePoolId Required. The ID to use for the DeploymentResourcePool, which + * will become the final component of the DeploymentResourcePool's resource name. + *

The maximum length is 63 characters, and valid characters are + * `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolAsync( + String parent, + DeploymentResourcePool deploymentResourcePool, + String deploymentResourcePoolId) { + CreateDeploymentResourcePoolRequest request = + CreateDeploymentResourcePoolRequest.newBuilder() + .setParent(parent) + .setDeploymentResourcePool(deploymentResourcePool) + .setDeploymentResourcePoolId(deploymentResourcePoolId) + .build(); + return createDeploymentResourcePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   CreateDeploymentResourcePoolRequest request =
+   *       CreateDeploymentResourcePoolRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDeploymentResourcePool(DeploymentResourcePool.newBuilder().build())
+   *           .setDeploymentResourcePoolId("deploymentResourcePoolId1805697578")
+   *           .build();
+   *   DeploymentResourcePool response =
+   *       deploymentResourcePoolServiceClient.createDeploymentResourcePoolAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture< + DeploymentResourcePool, CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolAsync(CreateDeploymentResourcePoolRequest request) { + return createDeploymentResourcePoolOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   CreateDeploymentResourcePoolRequest request =
+   *       CreateDeploymentResourcePoolRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDeploymentResourcePool(DeploymentResourcePool.newBuilder().build())
+   *           .setDeploymentResourcePoolId("deploymentResourcePoolId1805697578")
+   *           .build();
+   *   OperationFuture
+   *       future =
+   *           deploymentResourcePoolServiceClient
+   *               .createDeploymentResourcePoolOperationCallable()
+   *               .futureCall(request);
+   *   // Do something.
+   *   DeploymentResourcePool response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateDeploymentResourcePoolRequest, + DeploymentResourcePool, + CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolOperationCallable() { + return stub.createDeploymentResourcePoolOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   CreateDeploymentResourcePoolRequest request =
+   *       CreateDeploymentResourcePoolRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDeploymentResourcePool(DeploymentResourcePool.newBuilder().build())
+   *           .setDeploymentResourcePoolId("deploymentResourcePoolId1805697578")
+   *           .build();
+   *   ApiFuture future =
+   *       deploymentResourcePoolServiceClient
+   *           .createDeploymentResourcePoolCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createDeploymentResourcePoolCallable() { + return stub.createDeploymentResourcePoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   DeploymentResourcePoolName name =
+   *       DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
+   *   DeploymentResourcePool response =
+   *       deploymentResourcePoolServiceClient.getDeploymentResourcePool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DeploymentResourcePool to retrieve. Format: + * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeploymentResourcePool getDeploymentResourcePool(DeploymentResourcePoolName name) { + GetDeploymentResourcePoolRequest request = + GetDeploymentResourcePoolRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDeploymentResourcePool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   String name =
+   *       DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]")
+   *           .toString();
+   *   DeploymentResourcePool response =
+   *       deploymentResourcePoolServiceClient.getDeploymentResourcePool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DeploymentResourcePool to retrieve. Format: + * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DeploymentResourcePool getDeploymentResourcePool(String name) { + GetDeploymentResourcePoolRequest request = + GetDeploymentResourcePoolRequest.newBuilder().setName(name).build(); + return getDeploymentResourcePool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   GetDeploymentResourcePoolRequest request =
+   *       GetDeploymentResourcePoolRequest.newBuilder()
+   *           .setName(
+   *               DeploymentResourcePoolName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]")
+   *                   .toString())
+   *           .build();
+   *   DeploymentResourcePool response =
+   *       deploymentResourcePoolServiceClient.getDeploymentResourcePool(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 DeploymentResourcePool getDeploymentResourcePool( + GetDeploymentResourcePoolRequest request) { + return getDeploymentResourcePoolCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   GetDeploymentResourcePoolRequest request =
+   *       GetDeploymentResourcePoolRequest.newBuilder()
+   *           .setName(
+   *               DeploymentResourcePoolName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       deploymentResourcePoolServiceClient
+   *           .getDeploymentResourcePoolCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   DeploymentResourcePool response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getDeploymentResourcePoolCallable() { + return stub.getDeploymentResourcePoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DeploymentResourcePools in a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (DeploymentResourcePool element :
+   *       deploymentResourcePoolServiceClient.listDeploymentResourcePools(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent Location which owns this collection of + * DeploymentResourcePools. Format: projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeploymentResourcePoolsPagedResponse listDeploymentResourcePools( + ProjectName parent) { + ListDeploymentResourcePoolsRequest request = + ListDeploymentResourcePoolsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDeploymentResourcePools(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DeploymentResourcePools in a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   for (DeploymentResourcePool element :
+   *       deploymentResourcePoolServiceClient.listDeploymentResourcePools(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent Location which owns this collection of + * DeploymentResourcePools. Format: projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDeploymentResourcePoolsPagedResponse listDeploymentResourcePools(String parent) { + ListDeploymentResourcePoolsRequest request = + ListDeploymentResourcePoolsRequest.newBuilder().setParent(parent).build(); + return listDeploymentResourcePools(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DeploymentResourcePools in a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   ListDeploymentResourcePoolsRequest request =
+   *       ListDeploymentResourcePoolsRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (DeploymentResourcePool element :
+   *       deploymentResourcePoolServiceClient.listDeploymentResourcePools(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 ListDeploymentResourcePoolsPagedResponse listDeploymentResourcePools( + ListDeploymentResourcePoolsRequest request) { + return listDeploymentResourcePoolsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DeploymentResourcePools in a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   ListDeploymentResourcePoolsRequest request =
+   *       ListDeploymentResourcePoolsRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       deploymentResourcePoolServiceClient
+   *           .listDeploymentResourcePoolsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (DeploymentResourcePool element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListDeploymentResourcePoolsRequest, ListDeploymentResourcePoolsPagedResponse> + listDeploymentResourcePoolsPagedCallable() { + return stub.listDeploymentResourcePoolsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DeploymentResourcePools in a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   ListDeploymentResourcePoolsRequest request =
+   *       ListDeploymentResourcePoolsRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListDeploymentResourcePoolsResponse response =
+   *         deploymentResourcePoolServiceClient.listDeploymentResourcePoolsCallable().call(request);
+   *     for (DeploymentResourcePool element : response.getDeploymentResourcePoolsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListDeploymentResourcePoolsRequest, ListDeploymentResourcePoolsResponse> + listDeploymentResourcePoolsCallable() { + return stub.listDeploymentResourcePoolsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   DeploymentResourcePoolName name =
+   *       DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
+   *   deploymentResourcePoolServiceClient.deleteDeploymentResourcePoolAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the DeploymentResourcePool to delete. Format: + * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDeploymentResourcePoolAsync( + DeploymentResourcePoolName name) { + DeleteDeploymentResourcePoolRequest request = + DeleteDeploymentResourcePoolRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteDeploymentResourcePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   String name =
+   *       DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]")
+   *           .toString();
+   *   deploymentResourcePoolServiceClient.deleteDeploymentResourcePoolAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the DeploymentResourcePool to delete. Format: + * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDeploymentResourcePoolAsync( + String name) { + DeleteDeploymentResourcePoolRequest request = + DeleteDeploymentResourcePoolRequest.newBuilder().setName(name).build(); + return deleteDeploymentResourcePoolAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   DeleteDeploymentResourcePoolRequest request =
+   *       DeleteDeploymentResourcePoolRequest.newBuilder()
+   *           .setName(
+   *               DeploymentResourcePoolName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]")
+   *                   .toString())
+   *           .build();
+   *   deploymentResourcePoolServiceClient.deleteDeploymentResourcePoolAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDeploymentResourcePoolAsync( + DeleteDeploymentResourcePoolRequest request) { + return deleteDeploymentResourcePoolOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   DeleteDeploymentResourcePoolRequest request =
+   *       DeleteDeploymentResourcePoolRequest.newBuilder()
+   *           .setName(
+   *               DeploymentResourcePoolName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       deploymentResourcePoolServiceClient
+   *           .deleteDeploymentResourcePoolOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + DeleteDeploymentResourcePoolRequest, Empty, DeleteOperationMetadata> + deleteDeploymentResourcePoolOperationCallable() { + return stub.deleteDeploymentResourcePoolOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   DeleteDeploymentResourcePoolRequest request =
+   *       DeleteDeploymentResourcePoolRequest.newBuilder()
+   *           .setName(
+   *               DeploymentResourcePoolName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       deploymentResourcePoolServiceClient
+   *           .deleteDeploymentResourcePoolCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteDeploymentResourcePoolCallable() { + return stub.deleteDeploymentResourcePoolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DeployedModels that have been deployed on this DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   String deploymentResourcePool = "deploymentResourcePool-1928845137";
+   *   for (DeployedModel element :
+   *       deploymentResourcePoolServiceClient
+   *           .queryDeployedModels(deploymentResourcePool)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param deploymentResourcePool Required. The name of the target DeploymentResourcePool to query. + * Format: + * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final QueryDeployedModelsPagedResponse queryDeployedModels(String deploymentResourcePool) { + QueryDeployedModelsRequest request = + QueryDeployedModelsRequest.newBuilder() + .setDeploymentResourcePool(deploymentResourcePool) + .build(); + return queryDeployedModels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DeployedModels that have been deployed on this DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   QueryDeployedModelsRequest request =
+   *       QueryDeployedModelsRequest.newBuilder()
+   *           .setDeploymentResourcePool("deploymentResourcePool-1928845137")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (DeployedModel element :
+   *       deploymentResourcePoolServiceClient.queryDeployedModels(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 QueryDeployedModelsPagedResponse queryDeployedModels( + QueryDeployedModelsRequest request) { + return queryDeployedModelsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DeployedModels that have been deployed on this DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   QueryDeployedModelsRequest request =
+   *       QueryDeployedModelsRequest.newBuilder()
+   *           .setDeploymentResourcePool("deploymentResourcePool-1928845137")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       deploymentResourcePoolServiceClient
+   *           .queryDeployedModelsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (DeployedModel element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + queryDeployedModelsPagedCallable() { + return stub.queryDeployedModelsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List DeployedModels that have been deployed on this DeploymentResourcePool. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   QueryDeployedModelsRequest request =
+   *       QueryDeployedModelsRequest.newBuilder()
+   *           .setDeploymentResourcePool("deploymentResourcePool-1928845137")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     QueryDeployedModelsResponse response =
+   *         deploymentResourcePoolServiceClient.queryDeployedModelsCallable().call(request);
+   *     for (DeployedModel element : response.getDeployedModelsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + queryDeployedModelsCallable() { + return stub.queryDeployedModelsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element :
+   *       deploymentResourcePoolServiceClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       deploymentResourcePoolServiceClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         deploymentResourcePoolServiceClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = deploymentResourcePoolServiceClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       deploymentResourcePoolServiceClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = deploymentResourcePoolServiceClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       deploymentResourcePoolServiceClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = deploymentResourcePoolServiceClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       deploymentResourcePoolServiceClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response =
+   *       deploymentResourcePoolServiceClient.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 for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+   *     DeploymentResourcePoolServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       deploymentResourcePoolServiceClient.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 ListDeploymentResourcePoolsPagedResponse + extends AbstractPagedListResponse< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + DeploymentResourcePool, + ListDeploymentResourcePoolsPage, + ListDeploymentResourcePoolsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + DeploymentResourcePool> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDeploymentResourcePoolsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDeploymentResourcePoolsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDeploymentResourcePoolsPagedResponse(ListDeploymentResourcePoolsPage page) { + super(page, ListDeploymentResourcePoolsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDeploymentResourcePoolsPage + extends AbstractPage< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + DeploymentResourcePool, + ListDeploymentResourcePoolsPage> { + + private ListDeploymentResourcePoolsPage( + PageContext< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + DeploymentResourcePool> + context, + ListDeploymentResourcePoolsResponse response) { + super(context, response); + } + + private static ListDeploymentResourcePoolsPage createEmptyPage() { + return new ListDeploymentResourcePoolsPage(null, null); + } + + @Override + protected ListDeploymentResourcePoolsPage createPage( + PageContext< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + DeploymentResourcePool> + context, + ListDeploymentResourcePoolsResponse response) { + return new ListDeploymentResourcePoolsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + DeploymentResourcePool> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDeploymentResourcePoolsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + DeploymentResourcePool, + ListDeploymentResourcePoolsPage, + ListDeploymentResourcePoolsFixedSizeCollection> { + + private ListDeploymentResourcePoolsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDeploymentResourcePoolsFixedSizeCollection createEmptyCollection() { + return new ListDeploymentResourcePoolsFixedSizeCollection(null, 0); + } + + @Override + protected ListDeploymentResourcePoolsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDeploymentResourcePoolsFixedSizeCollection(pages, collectionSize); + } + } + + public static class QueryDeployedModelsPagedResponse + extends AbstractPagedListResponse< + QueryDeployedModelsRequest, + QueryDeployedModelsResponse, + DeployedModel, + QueryDeployedModelsPage, + QueryDeployedModelsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + QueryDeployedModelsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new QueryDeployedModelsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private QueryDeployedModelsPagedResponse(QueryDeployedModelsPage page) { + super(page, QueryDeployedModelsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class QueryDeployedModelsPage + extends AbstractPage< + QueryDeployedModelsRequest, + QueryDeployedModelsResponse, + DeployedModel, + QueryDeployedModelsPage> { + + private QueryDeployedModelsPage( + PageContext context, + QueryDeployedModelsResponse response) { + super(context, response); + } + + private static QueryDeployedModelsPage createEmptyPage() { + return new QueryDeployedModelsPage(null, null); + } + + @Override + protected QueryDeployedModelsPage createPage( + PageContext context, + QueryDeployedModelsResponse response) { + return new QueryDeployedModelsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class QueryDeployedModelsFixedSizeCollection + extends AbstractFixedSizeCollection< + QueryDeployedModelsRequest, + QueryDeployedModelsResponse, + DeployedModel, + QueryDeployedModelsPage, + QueryDeployedModelsFixedSizeCollection> { + + private QueryDeployedModelsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static QueryDeployedModelsFixedSizeCollection createEmptyCollection() { + return new QueryDeployedModelsFixedSizeCollection(null, 0); + } + + @Override + protected QueryDeployedModelsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new QueryDeployedModelsFixedSizeCollection(pages, collectionSize); + } + } + + 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/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceSettings.java new file mode 100644 index 000000000..dd6ed54a3 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceSettings.java @@ -0,0 +1,358 @@ +/* + * 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.v1beta1; + +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.ListDeploymentResourcePoolsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.QueryDeployedModelsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1beta1.stub.DeploymentResourcePoolServiceStubSettings; +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 com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DeploymentResourcePoolServiceClient}. + * + *

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 getDeploymentResourcePool to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * DeploymentResourcePoolServiceSettings.Builder deploymentResourcePoolServiceSettingsBuilder =
+ *     DeploymentResourcePoolServiceSettings.newBuilder();
+ * deploymentResourcePoolServiceSettingsBuilder
+ *     .getDeploymentResourcePoolSettings()
+ *     .setRetrySettings(
+ *         deploymentResourcePoolServiceSettingsBuilder
+ *             .getDeploymentResourcePoolSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DeploymentResourcePoolServiceSettings deploymentResourcePoolServiceSettings =
+ *     deploymentResourcePoolServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DeploymentResourcePoolServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to createDeploymentResourcePool. */ + public UnaryCallSettings + createDeploymentResourcePoolSettings() { + return ((DeploymentResourcePoolServiceStubSettings) getStubSettings()) + .createDeploymentResourcePoolSettings(); + } + + /** Returns the object with the settings used for calls to createDeploymentResourcePool. */ + public OperationCallSettings< + CreateDeploymentResourcePoolRequest, + DeploymentResourcePool, + CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolOperationSettings() { + return ((DeploymentResourcePoolServiceStubSettings) getStubSettings()) + .createDeploymentResourcePoolOperationSettings(); + } + + /** Returns the object with the settings used for calls to getDeploymentResourcePool. */ + public UnaryCallSettings + getDeploymentResourcePoolSettings() { + return ((DeploymentResourcePoolServiceStubSettings) getStubSettings()) + .getDeploymentResourcePoolSettings(); + } + + /** Returns the object with the settings used for calls to listDeploymentResourcePools. */ + public PagedCallSettings< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + ListDeploymentResourcePoolsPagedResponse> + listDeploymentResourcePoolsSettings() { + return ((DeploymentResourcePoolServiceStubSettings) getStubSettings()) + .listDeploymentResourcePoolsSettings(); + } + + /** Returns the object with the settings used for calls to deleteDeploymentResourcePool. */ + public UnaryCallSettings + deleteDeploymentResourcePoolSettings() { + return ((DeploymentResourcePoolServiceStubSettings) getStubSettings()) + .deleteDeploymentResourcePoolSettings(); + } + + /** Returns the object with the settings used for calls to deleteDeploymentResourcePool. */ + public OperationCallSettings + deleteDeploymentResourcePoolOperationSettings() { + return ((DeploymentResourcePoolServiceStubSettings) getStubSettings()) + .deleteDeploymentResourcePoolOperationSettings(); + } + + /** Returns the object with the settings used for calls to queryDeployedModels. */ + public PagedCallSettings< + QueryDeployedModelsRequest, QueryDeployedModelsResponse, QueryDeployedModelsPagedResponse> + queryDeployedModelsSettings() { + return ((DeploymentResourcePoolServiceStubSettings) getStubSettings()) + .queryDeployedModelsSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((DeploymentResourcePoolServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((DeploymentResourcePoolServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((DeploymentResourcePoolServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((DeploymentResourcePoolServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((DeploymentResourcePoolServiceStubSettings) getStubSettings()) + .testIamPermissionsSettings(); + } + + public static final DeploymentResourcePoolServiceSettings create( + DeploymentResourcePoolServiceStubSettings stub) throws IOException { + return new DeploymentResourcePoolServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DeploymentResourcePoolServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DeploymentResourcePoolServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DeploymentResourcePoolServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DeploymentResourcePoolServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DeploymentResourcePoolServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DeploymentResourcePoolServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DeploymentResourcePoolServiceStubSettings.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 DeploymentResourcePoolServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DeploymentResourcePoolServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DeploymentResourcePoolServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(DeploymentResourcePoolServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DeploymentResourcePoolServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DeploymentResourcePoolServiceStubSettings.newBuilder()); + } + + public DeploymentResourcePoolServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DeploymentResourcePoolServiceStubSettings.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 createDeploymentResourcePool. */ + public UnaryCallSettings.Builder + createDeploymentResourcePoolSettings() { + return getStubSettingsBuilder().createDeploymentResourcePoolSettings(); + } + + /** Returns the builder for the settings used for calls to createDeploymentResourcePool. */ + public OperationCallSettings.Builder< + CreateDeploymentResourcePoolRequest, + DeploymentResourcePool, + CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolOperationSettings() { + return getStubSettingsBuilder().createDeploymentResourcePoolOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getDeploymentResourcePool. */ + public UnaryCallSettings.Builder + getDeploymentResourcePoolSettings() { + return getStubSettingsBuilder().getDeploymentResourcePoolSettings(); + } + + /** Returns the builder for the settings used for calls to listDeploymentResourcePools. */ + public PagedCallSettings.Builder< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + ListDeploymentResourcePoolsPagedResponse> + listDeploymentResourcePoolsSettings() { + return getStubSettingsBuilder().listDeploymentResourcePoolsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDeploymentResourcePool. */ + public UnaryCallSettings.Builder + deleteDeploymentResourcePoolSettings() { + return getStubSettingsBuilder().deleteDeploymentResourcePoolSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDeploymentResourcePool. */ + public OperationCallSettings.Builder< + DeleteDeploymentResourcePoolRequest, Empty, DeleteOperationMetadata> + deleteDeploymentResourcePoolOperationSettings() { + return getStubSettingsBuilder().deleteDeploymentResourcePoolOperationSettings(); + } + + /** Returns the builder for the settings used for calls to queryDeployedModels. */ + public PagedCallSettings.Builder< + QueryDeployedModelsRequest, + QueryDeployedModelsResponse, + QueryDeployedModelsPagedResponse> + queryDeployedModelsSettings() { + return getStubSettingsBuilder().queryDeployedModelsSettings(); + } + + /** 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 DeploymentResourcePoolServiceSettings build() throws IOException { + return new DeploymentResourcePoolServiceSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json index 92d1913cf..a50c2f33b 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json @@ -62,6 +62,45 @@ } } }, + "DeploymentResourcePoolService": { + "clients": { + "grpc": { + "libraryClient": "DeploymentResourcePoolServiceClient", + "rpcs": { + "CreateDeploymentResourcePool": { + "methods": ["createDeploymentResourcePoolAsync", "createDeploymentResourcePoolAsync", "createDeploymentResourcePoolAsync", "createDeploymentResourcePoolOperationCallable", "createDeploymentResourcePoolCallable"] + }, + "DeleteDeploymentResourcePool": { + "methods": ["deleteDeploymentResourcePoolAsync", "deleteDeploymentResourcePoolAsync", "deleteDeploymentResourcePoolAsync", "deleteDeploymentResourcePoolOperationCallable", "deleteDeploymentResourcePoolCallable"] + }, + "GetDeploymentResourcePool": { + "methods": ["getDeploymentResourcePool", "getDeploymentResourcePool", "getDeploymentResourcePool", "getDeploymentResourcePoolCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListDeploymentResourcePools": { + "methods": ["listDeploymentResourcePools", "listDeploymentResourcePools", "listDeploymentResourcePools", "listDeploymentResourcePoolsPagedCallable", "listDeploymentResourcePoolsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "QueryDeployedModels": { + "methods": ["queryDeployedModels", "queryDeployedModels", "queryDeployedModelsPagedCallable", "queryDeployedModelsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + } + } + } + } + }, "EndpointService": { "clients": { "grpc": { diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java index 63c457bab..4f3bed271 100644 --- a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java @@ -35,6 +35,24 @@ * } * } * + *

======================= DeploymentResourcePoolServiceClient ======================= + * + *

Service Description: A service that manages the DeploymentResourcePool resource. + * + *

Sample for DeploymentResourcePoolServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DeploymentResourcePoolServiceClient deploymentResourcePoolServiceClient =
+ *     DeploymentResourcePoolServiceClient.create()) {
+ *   DeploymentResourcePoolName name =
+ *       DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]");
+ *   DeploymentResourcePool response =
+ *       deploymentResourcePoolServiceClient.getDeploymentResourcePool(name);
+ * }
+ * }
+ * *

======================= EndpointServiceClient ======================= * *

Service Description: A service for managing Vertex AI's Endpoints. diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DeploymentResourcePoolServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DeploymentResourcePoolServiceStub.java new file mode 100644 index 000000000..c0f9acaf8 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DeploymentResourcePoolServiceStub.java @@ -0,0 +1,147 @@ +/* + * 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.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.ListDeploymentResourcePoolsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.QueryDeployedModelsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool; +import com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest; +import com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest; +import com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse; +import com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest; +import com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse; +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 com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the DeploymentResourcePoolService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class DeploymentResourcePoolServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable< + CreateDeploymentResourcePoolRequest, + DeploymentResourcePool, + CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createDeploymentResourcePoolOperationCallable()"); + } + + public UnaryCallable + createDeploymentResourcePoolCallable() { + throw new UnsupportedOperationException( + "Not implemented: createDeploymentResourcePoolCallable()"); + } + + public UnaryCallable + getDeploymentResourcePoolCallable() { + throw new UnsupportedOperationException("Not implemented: getDeploymentResourcePoolCallable()"); + } + + public UnaryCallable + listDeploymentResourcePoolsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listDeploymentResourcePoolsPagedCallable()"); + } + + public UnaryCallable + listDeploymentResourcePoolsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listDeploymentResourcePoolsCallable()"); + } + + public OperationCallable + deleteDeploymentResourcePoolOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteDeploymentResourcePoolOperationCallable()"); + } + + public UnaryCallable + deleteDeploymentResourcePoolCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteDeploymentResourcePoolCallable()"); + } + + public UnaryCallable + queryDeployedModelsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: queryDeployedModelsPagedCallable()"); + } + + public UnaryCallable + queryDeployedModelsCallable() { + throw new UnsupportedOperationException("Not implemented: queryDeployedModelsCallable()"); + } + + 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/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DeploymentResourcePoolServiceStubSettings.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DeploymentResourcePoolServiceStubSettings.java new file mode 100644 index 000000000..fdaa96aaa --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DeploymentResourcePoolServiceStubSettings.java @@ -0,0 +1,868 @@ +/* + * 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.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.ListDeploymentResourcePoolsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.QueryDeployedModelsPagedResponse; + +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.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +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.OperationCallSettings; +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.v1beta1.CreateDeploymentResourcePoolOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.DeployedModel; +import com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool; +import com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest; +import com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest; +import com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse; +import com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest; +import com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse; +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 com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DeploymentResourcePoolServiceStub}. + * + *

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 getDeploymentResourcePool to 30 seconds: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * DeploymentResourcePoolServiceStubSettings.Builder deploymentResourcePoolServiceSettingsBuilder =
+ *     DeploymentResourcePoolServiceStubSettings.newBuilder();
+ * deploymentResourcePoolServiceSettingsBuilder
+ *     .getDeploymentResourcePoolSettings()
+ *     .setRetrySettings(
+ *         deploymentResourcePoolServiceSettingsBuilder
+ *             .getDeploymentResourcePoolSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DeploymentResourcePoolServiceStubSettings deploymentResourcePoolServiceSettings =
+ *     deploymentResourcePoolServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DeploymentResourcePoolServiceStubSettings + 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 + createDeploymentResourcePoolSettings; + private final OperationCallSettings< + CreateDeploymentResourcePoolRequest, + DeploymentResourcePool, + CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolOperationSettings; + private final UnaryCallSettings + getDeploymentResourcePoolSettings; + private final PagedCallSettings< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + ListDeploymentResourcePoolsPagedResponse> + listDeploymentResourcePoolsSettings; + private final UnaryCallSettings + deleteDeploymentResourcePoolSettings; + private final OperationCallSettings< + DeleteDeploymentResourcePoolRequest, Empty, DeleteOperationMetadata> + deleteDeploymentResourcePoolOperationSettings; + private final PagedCallSettings< + QueryDeployedModelsRequest, QueryDeployedModelsResponse, QueryDeployedModelsPagedResponse> + queryDeployedModelsSettings; + 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< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + DeploymentResourcePool> + LIST_DEPLOYMENT_RESOURCE_POOLS_PAGE_STR_DESC = + new PagedListDescriptor< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + DeploymentResourcePool>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDeploymentResourcePoolsRequest injectToken( + ListDeploymentResourcePoolsRequest payload, String token) { + return ListDeploymentResourcePoolsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListDeploymentResourcePoolsRequest injectPageSize( + ListDeploymentResourcePoolsRequest payload, int pageSize) { + return ListDeploymentResourcePoolsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListDeploymentResourcePoolsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDeploymentResourcePoolsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListDeploymentResourcePoolsResponse payload) { + return payload.getDeploymentResourcePoolsList() == null + ? ImmutableList.of() + : payload.getDeploymentResourcePoolsList(); + } + }; + + private static final PagedListDescriptor< + QueryDeployedModelsRequest, QueryDeployedModelsResponse, DeployedModel> + QUERY_DEPLOYED_MODELS_PAGE_STR_DESC = + new PagedListDescriptor< + QueryDeployedModelsRequest, QueryDeployedModelsResponse, DeployedModel>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public QueryDeployedModelsRequest injectToken( + QueryDeployedModelsRequest payload, String token) { + return QueryDeployedModelsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public QueryDeployedModelsRequest injectPageSize( + QueryDeployedModelsRequest payload, int pageSize) { + return QueryDeployedModelsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(QueryDeployedModelsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(QueryDeployedModelsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(QueryDeployedModelsResponse payload) { + return payload.getDeployedModelsList() == null + ? ImmutableList.of() + : payload.getDeployedModelsList(); + } + }; + + 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< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + ListDeploymentResourcePoolsPagedResponse> + LIST_DEPLOYMENT_RESOURCE_POOLS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + ListDeploymentResourcePoolsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListDeploymentResourcePoolsRequest, ListDeploymentResourcePoolsResponse> + callable, + ListDeploymentResourcePoolsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + DeploymentResourcePool> + pageContext = + PageContext.create( + callable, LIST_DEPLOYMENT_RESOURCE_POOLS_PAGE_STR_DESC, request, context); + return ListDeploymentResourcePoolsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + QueryDeployedModelsRequest, QueryDeployedModelsResponse, QueryDeployedModelsPagedResponse> + QUERY_DEPLOYED_MODELS_PAGE_STR_FACT = + new PagedListResponseFactory< + QueryDeployedModelsRequest, + QueryDeployedModelsResponse, + QueryDeployedModelsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + QueryDeployedModelsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, QUERY_DEPLOYED_MODELS_PAGE_STR_DESC, request, context); + return QueryDeployedModelsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + 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 createDeploymentResourcePool. */ + public UnaryCallSettings + createDeploymentResourcePoolSettings() { + return createDeploymentResourcePoolSettings; + } + + /** Returns the object with the settings used for calls to createDeploymentResourcePool. */ + public OperationCallSettings< + CreateDeploymentResourcePoolRequest, + DeploymentResourcePool, + CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolOperationSettings() { + return createDeploymentResourcePoolOperationSettings; + } + + /** Returns the object with the settings used for calls to getDeploymentResourcePool. */ + public UnaryCallSettings + getDeploymentResourcePoolSettings() { + return getDeploymentResourcePoolSettings; + } + + /** Returns the object with the settings used for calls to listDeploymentResourcePools. */ + public PagedCallSettings< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + ListDeploymentResourcePoolsPagedResponse> + listDeploymentResourcePoolsSettings() { + return listDeploymentResourcePoolsSettings; + } + + /** Returns the object with the settings used for calls to deleteDeploymentResourcePool. */ + public UnaryCallSettings + deleteDeploymentResourcePoolSettings() { + return deleteDeploymentResourcePoolSettings; + } + + /** Returns the object with the settings used for calls to deleteDeploymentResourcePool. */ + public OperationCallSettings + deleteDeploymentResourcePoolOperationSettings() { + return deleteDeploymentResourcePoolOperationSettings; + } + + /** Returns the object with the settings used for calls to queryDeployedModels. */ + public PagedCallSettings< + QueryDeployedModelsRequest, QueryDeployedModelsResponse, QueryDeployedModelsPagedResponse> + queryDeployedModelsSettings() { + return queryDeployedModelsSettings; + } + + /** 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 DeploymentResourcePoolServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDeploymentResourcePoolServiceStub.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(DeploymentResourcePoolServiceStubSettings.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 DeploymentResourcePoolServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createDeploymentResourcePoolSettings = + settingsBuilder.createDeploymentResourcePoolSettings().build(); + createDeploymentResourcePoolOperationSettings = + settingsBuilder.createDeploymentResourcePoolOperationSettings().build(); + getDeploymentResourcePoolSettings = settingsBuilder.getDeploymentResourcePoolSettings().build(); + listDeploymentResourcePoolsSettings = + settingsBuilder.listDeploymentResourcePoolsSettings().build(); + deleteDeploymentResourcePoolSettings = + settingsBuilder.deleteDeploymentResourcePoolSettings().build(); + deleteDeploymentResourcePoolOperationSettings = + settingsBuilder.deleteDeploymentResourcePoolOperationSettings().build(); + queryDeployedModelsSettings = settingsBuilder.queryDeployedModelsSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for DeploymentResourcePoolServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createDeploymentResourcePoolSettings; + private final OperationCallSettings.Builder< + CreateDeploymentResourcePoolRequest, + DeploymentResourcePool, + CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolOperationSettings; + private final UnaryCallSettings.Builder< + GetDeploymentResourcePoolRequest, DeploymentResourcePool> + getDeploymentResourcePoolSettings; + private final PagedCallSettings.Builder< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + ListDeploymentResourcePoolsPagedResponse> + listDeploymentResourcePoolsSettings; + private final UnaryCallSettings.Builder + deleteDeploymentResourcePoolSettings; + private final OperationCallSettings.Builder< + DeleteDeploymentResourcePoolRequest, Empty, DeleteOperationMetadata> + deleteDeploymentResourcePoolOperationSettings; + private final PagedCallSettings.Builder< + QueryDeployedModelsRequest, + QueryDeployedModelsResponse, + QueryDeployedModelsPagedResponse> + queryDeployedModelsSettings; + 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); + + createDeploymentResourcePoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDeploymentResourcePoolOperationSettings = OperationCallSettings.newBuilder(); + getDeploymentResourcePoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDeploymentResourcePoolsSettings = + PagedCallSettings.newBuilder(LIST_DEPLOYMENT_RESOURCE_POOLS_PAGE_STR_FACT); + deleteDeploymentResourcePoolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDeploymentResourcePoolOperationSettings = OperationCallSettings.newBuilder(); + queryDeployedModelsSettings = + PagedCallSettings.newBuilder(QUERY_DEPLOYED_MODELS_PAGE_STR_FACT); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createDeploymentResourcePoolSettings, + getDeploymentResourcePoolSettings, + listDeploymentResourcePoolsSettings, + deleteDeploymentResourcePoolSettings, + queryDeployedModelsSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(DeploymentResourcePoolServiceStubSettings settings) { + super(settings); + + createDeploymentResourcePoolSettings = + settings.createDeploymentResourcePoolSettings.toBuilder(); + createDeploymentResourcePoolOperationSettings = + settings.createDeploymentResourcePoolOperationSettings.toBuilder(); + getDeploymentResourcePoolSettings = settings.getDeploymentResourcePoolSettings.toBuilder(); + listDeploymentResourcePoolsSettings = + settings.listDeploymentResourcePoolsSettings.toBuilder(); + deleteDeploymentResourcePoolSettings = + settings.deleteDeploymentResourcePoolSettings.toBuilder(); + deleteDeploymentResourcePoolOperationSettings = + settings.deleteDeploymentResourcePoolOperationSettings.toBuilder(); + queryDeployedModelsSettings = settings.queryDeployedModelsSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createDeploymentResourcePoolSettings, + getDeploymentResourcePoolSettings, + listDeploymentResourcePoolsSettings, + deleteDeploymentResourcePoolSettings, + queryDeployedModelsSettings, + 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 + .createDeploymentResourcePoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getDeploymentResourcePoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listDeploymentResourcePoolsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteDeploymentResourcePoolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .queryDeployedModelsSettings() + .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")); + + builder + .createDeploymentResourcePoolOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DeploymentResourcePool.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateDeploymentResourcePoolOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteDeploymentResourcePoolOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + 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 createDeploymentResourcePool. */ + public UnaryCallSettings.Builder + createDeploymentResourcePoolSettings() { + return createDeploymentResourcePoolSettings; + } + + /** Returns the builder for the settings used for calls to createDeploymentResourcePool. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateDeploymentResourcePoolRequest, + DeploymentResourcePool, + CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolOperationSettings() { + return createDeploymentResourcePoolOperationSettings; + } + + /** Returns the builder for the settings used for calls to getDeploymentResourcePool. */ + public UnaryCallSettings.Builder + getDeploymentResourcePoolSettings() { + return getDeploymentResourcePoolSettings; + } + + /** Returns the builder for the settings used for calls to listDeploymentResourcePools. */ + public PagedCallSettings.Builder< + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + ListDeploymentResourcePoolsPagedResponse> + listDeploymentResourcePoolsSettings() { + return listDeploymentResourcePoolsSettings; + } + + /** Returns the builder for the settings used for calls to deleteDeploymentResourcePool. */ + public UnaryCallSettings.Builder + deleteDeploymentResourcePoolSettings() { + return deleteDeploymentResourcePoolSettings; + } + + /** Returns the builder for the settings used for calls to deleteDeploymentResourcePool. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DeleteDeploymentResourcePoolRequest, Empty, DeleteOperationMetadata> + deleteDeploymentResourcePoolOperationSettings() { + return deleteDeploymentResourcePoolOperationSettings; + } + + /** Returns the builder for the settings used for calls to queryDeployedModels. */ + public PagedCallSettings.Builder< + QueryDeployedModelsRequest, + QueryDeployedModelsResponse, + QueryDeployedModelsPagedResponse> + queryDeployedModelsSettings() { + return queryDeployedModelsSettings; + } + + /** 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 DeploymentResourcePoolServiceStubSettings build() throws IOException { + return new DeploymentResourcePoolServiceStubSettings(this); + } + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDeploymentResourcePoolServiceCallableFactory.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDeploymentResourcePoolServiceCallableFactory.java new file mode 100644 index 000000000..ec7266063 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDeploymentResourcePoolServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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.v1beta1.stub; + +import com.google.api.core.BetaApi; +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 DeploymentResourcePoolService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDeploymentResourcePoolServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDeploymentResourcePoolServiceStub.java b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDeploymentResourcePoolServiceStub.java new file mode 100644 index 000000000..9d1435a99 --- /dev/null +++ b/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcDeploymentResourcePoolServiceStub.java @@ -0,0 +1,566 @@ +/* + * 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.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.ListDeploymentResourcePoolsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.QueryDeployedModelsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool; +import com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest; +import com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest; +import com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse; +import com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest; +import com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse; +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.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the DeploymentResourcePoolService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDeploymentResourcePoolServiceStub extends DeploymentResourcePoolServiceStub { + private static final MethodDescriptor + createDeploymentResourcePoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService/CreateDeploymentResourcePool") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDeploymentResourcePoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDeploymentResourcePoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService/GetDeploymentResourcePool") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDeploymentResourcePoolRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DeploymentResourcePool.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListDeploymentResourcePoolsRequest, ListDeploymentResourcePoolsResponse> + listDeploymentResourcePoolsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService/ListDeploymentResourcePools") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDeploymentResourcePoolsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDeploymentResourcePoolsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDeploymentResourcePoolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService/DeleteDeploymentResourcePool") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDeploymentResourcePoolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + queryDeployedModelsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService/QueryDeployedModels") + .setRequestMarshaller( + ProtoUtils.marshaller(QueryDeployedModelsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(QueryDeployedModelsResponse.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 + createDeploymentResourcePoolCallable; + private final OperationCallable< + CreateDeploymentResourcePoolRequest, + DeploymentResourcePool, + CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolOperationCallable; + private final UnaryCallable + getDeploymentResourcePoolCallable; + private final UnaryCallable< + ListDeploymentResourcePoolsRequest, ListDeploymentResourcePoolsResponse> + listDeploymentResourcePoolsCallable; + private final UnaryCallable< + ListDeploymentResourcePoolsRequest, ListDeploymentResourcePoolsPagedResponse> + listDeploymentResourcePoolsPagedCallable; + private final UnaryCallable + deleteDeploymentResourcePoolCallable; + private final OperationCallable< + DeleteDeploymentResourcePoolRequest, Empty, DeleteOperationMetadata> + deleteDeploymentResourcePoolOperationCallable; + private final UnaryCallable + queryDeployedModelsCallable; + private final UnaryCallable + queryDeployedModelsPagedCallable; + 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 GrpcDeploymentResourcePoolServiceStub create( + DeploymentResourcePoolServiceStubSettings settings) throws IOException { + return new GrpcDeploymentResourcePoolServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDeploymentResourcePoolServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDeploymentResourcePoolServiceStub( + DeploymentResourcePoolServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDeploymentResourcePoolServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDeploymentResourcePoolServiceStub( + DeploymentResourcePoolServiceStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcDeploymentResourcePoolServiceStub, 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 GrpcDeploymentResourcePoolServiceStub( + DeploymentResourcePoolServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcDeploymentResourcePoolServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDeploymentResourcePoolServiceStub, 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 GrpcDeploymentResourcePoolServiceStub( + DeploymentResourcePoolServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createDeploymentResourcePoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDeploymentResourcePoolMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + getDeploymentResourcePoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDeploymentResourcePoolMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listDeploymentResourcePoolsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listDeploymentResourcePoolsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings + deleteDeploymentResourcePoolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDeploymentResourcePoolMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + queryDeployedModelsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(queryDeployedModelsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "deployment_resource_pool", + String.valueOf(request.getDeploymentResourcePool())); + 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.createDeploymentResourcePoolCallable = + callableFactory.createUnaryCallable( + createDeploymentResourcePoolTransportSettings, + settings.createDeploymentResourcePoolSettings(), + clientContext); + this.createDeploymentResourcePoolOperationCallable = + callableFactory.createOperationCallable( + createDeploymentResourcePoolTransportSettings, + settings.createDeploymentResourcePoolOperationSettings(), + clientContext, + operationsStub); + this.getDeploymentResourcePoolCallable = + callableFactory.createUnaryCallable( + getDeploymentResourcePoolTransportSettings, + settings.getDeploymentResourcePoolSettings(), + clientContext); + this.listDeploymentResourcePoolsCallable = + callableFactory.createUnaryCallable( + listDeploymentResourcePoolsTransportSettings, + settings.listDeploymentResourcePoolsSettings(), + clientContext); + this.listDeploymentResourcePoolsPagedCallable = + callableFactory.createPagedCallable( + listDeploymentResourcePoolsTransportSettings, + settings.listDeploymentResourcePoolsSettings(), + clientContext); + this.deleteDeploymentResourcePoolCallable = + callableFactory.createUnaryCallable( + deleteDeploymentResourcePoolTransportSettings, + settings.deleteDeploymentResourcePoolSettings(), + clientContext); + this.deleteDeploymentResourcePoolOperationCallable = + callableFactory.createOperationCallable( + deleteDeploymentResourcePoolTransportSettings, + settings.deleteDeploymentResourcePoolOperationSettings(), + clientContext, + operationsStub); + this.queryDeployedModelsCallable = + callableFactory.createUnaryCallable( + queryDeployedModelsTransportSettings, + settings.queryDeployedModelsSettings(), + clientContext); + this.queryDeployedModelsPagedCallable = + callableFactory.createPagedCallable( + queryDeployedModelsTransportSettings, + settings.queryDeployedModelsSettings(), + 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 + createDeploymentResourcePoolCallable() { + return createDeploymentResourcePoolCallable; + } + + @Override + public OperationCallable< + CreateDeploymentResourcePoolRequest, + DeploymentResourcePool, + CreateDeploymentResourcePoolOperationMetadata> + createDeploymentResourcePoolOperationCallable() { + return createDeploymentResourcePoolOperationCallable; + } + + @Override + public UnaryCallable + getDeploymentResourcePoolCallable() { + return getDeploymentResourcePoolCallable; + } + + @Override + public UnaryCallable + listDeploymentResourcePoolsCallable() { + return listDeploymentResourcePoolsCallable; + } + + @Override + public UnaryCallable + listDeploymentResourcePoolsPagedCallable() { + return listDeploymentResourcePoolsPagedCallable; + } + + @Override + public UnaryCallable + deleteDeploymentResourcePoolCallable() { + return deleteDeploymentResourcePoolCallable; + } + + @Override + public OperationCallable + deleteDeploymentResourcePoolOperationCallable() { + return deleteDeploymentResourcePoolOperationCallable; + } + + @Override + public UnaryCallable + queryDeployedModelsCallable() { + return queryDeployedModelsCallable; + } + + @Override + public UnaryCallable + queryDeployedModelsPagedCallable() { + return queryDeployedModelsPagedCallable; + } + + @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/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceClientTest.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceClientTest.java new file mode 100644 index 000000000..bf01fef5d --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceClientTest.java @@ -0,0 +1,816 @@ +/* + * 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.v1beta1; + +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.ListDeploymentResourcePoolsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceClient.QueryDeployedModelsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +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.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +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.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class DeploymentResourcePoolServiceClientTest { + private static MockDeploymentResourcePoolService mockDeploymentResourcePoolService; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DeploymentResourcePoolServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockDeploymentResourcePoolService = new MockDeploymentResourcePoolService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockDeploymentResourcePoolService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DeploymentResourcePoolServiceSettings settings = + DeploymentResourcePoolServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DeploymentResourcePoolServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createDeploymentResourcePoolTest() throws Exception { + DeploymentResourcePool expectedResponse = + DeploymentResourcePool.newBuilder() + .setName( + DeploymentResourcePoolName.of( + "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]") + .toString()) + .setDedicatedResources(DedicatedResources.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDeploymentResourcePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeploymentResourcePoolService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DeploymentResourcePool deploymentResourcePool = DeploymentResourcePool.newBuilder().build(); + String deploymentResourcePoolId = "deploymentResourcePoolId1805697578"; + + DeploymentResourcePool actualResponse = + client + .createDeploymentResourcePoolAsync( + parent, deploymentResourcePool, deploymentResourcePoolId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeploymentResourcePoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDeploymentResourcePoolRequest actualRequest = + ((CreateDeploymentResourcePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(deploymentResourcePool, actualRequest.getDeploymentResourcePool()); + Assert.assertEquals(deploymentResourcePoolId, actualRequest.getDeploymentResourcePoolId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDeploymentResourcePoolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeploymentResourcePoolService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DeploymentResourcePool deploymentResourcePool = DeploymentResourcePool.newBuilder().build(); + String deploymentResourcePoolId = "deploymentResourcePoolId1805697578"; + client + .createDeploymentResourcePoolAsync( + parent, deploymentResourcePool, deploymentResourcePoolId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createDeploymentResourcePoolTest2() throws Exception { + DeploymentResourcePool expectedResponse = + DeploymentResourcePool.newBuilder() + .setName( + DeploymentResourcePoolName.of( + "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]") + .toString()) + .setDedicatedResources(DedicatedResources.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDeploymentResourcePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeploymentResourcePoolService.addResponse(resultOperation); + + String parent = "parent-995424086"; + DeploymentResourcePool deploymentResourcePool = DeploymentResourcePool.newBuilder().build(); + String deploymentResourcePoolId = "deploymentResourcePoolId1805697578"; + + DeploymentResourcePool actualResponse = + client + .createDeploymentResourcePoolAsync( + parent, deploymentResourcePool, deploymentResourcePoolId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeploymentResourcePoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDeploymentResourcePoolRequest actualRequest = + ((CreateDeploymentResourcePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(deploymentResourcePool, actualRequest.getDeploymentResourcePool()); + Assert.assertEquals(deploymentResourcePoolId, actualRequest.getDeploymentResourcePoolId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDeploymentResourcePoolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeploymentResourcePoolService.addException(exception); + + try { + String parent = "parent-995424086"; + DeploymentResourcePool deploymentResourcePool = DeploymentResourcePool.newBuilder().build(); + String deploymentResourcePoolId = "deploymentResourcePoolId1805697578"; + client + .createDeploymentResourcePoolAsync( + parent, deploymentResourcePool, deploymentResourcePoolId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getDeploymentResourcePoolTest() throws Exception { + DeploymentResourcePool expectedResponse = + DeploymentResourcePool.newBuilder() + .setName( + DeploymentResourcePoolName.of( + "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]") + .toString()) + .setDedicatedResources(DedicatedResources.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockDeploymentResourcePoolService.addResponse(expectedResponse); + + DeploymentResourcePoolName name = + DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]"); + + DeploymentResourcePool actualResponse = client.getDeploymentResourcePool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeploymentResourcePoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDeploymentResourcePoolRequest actualRequest = + ((GetDeploymentResourcePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDeploymentResourcePoolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeploymentResourcePoolService.addException(exception); + + try { + DeploymentResourcePoolName name = + DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]"); + client.getDeploymentResourcePool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDeploymentResourcePoolTest2() throws Exception { + DeploymentResourcePool expectedResponse = + DeploymentResourcePool.newBuilder() + .setName( + DeploymentResourcePoolName.of( + "[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]") + .toString()) + .setDedicatedResources(DedicatedResources.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockDeploymentResourcePoolService.addResponse(expectedResponse); + + String name = "name3373707"; + + DeploymentResourcePool actualResponse = client.getDeploymentResourcePool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeploymentResourcePoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDeploymentResourcePoolRequest actualRequest = + ((GetDeploymentResourcePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDeploymentResourcePoolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeploymentResourcePoolService.addException(exception); + + try { + String name = "name3373707"; + client.getDeploymentResourcePool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeploymentResourcePoolsTest() throws Exception { + DeploymentResourcePool responsesElement = DeploymentResourcePool.newBuilder().build(); + ListDeploymentResourcePoolsResponse expectedResponse = + ListDeploymentResourcePoolsResponse.newBuilder() + .setNextPageToken("") + .addAllDeploymentResourcePools(Arrays.asList(responsesElement)) + .build(); + mockDeploymentResourcePoolService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListDeploymentResourcePoolsPagedResponse pagedListResponse = + client.listDeploymentResourcePools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeploymentResourcePoolsList().get(0), resources.get(0)); + + List actualRequests = mockDeploymentResourcePoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeploymentResourcePoolsRequest actualRequest = + ((ListDeploymentResourcePoolsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeploymentResourcePoolsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeploymentResourcePoolService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listDeploymentResourcePools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDeploymentResourcePoolsTest2() throws Exception { + DeploymentResourcePool responsesElement = DeploymentResourcePool.newBuilder().build(); + ListDeploymentResourcePoolsResponse expectedResponse = + ListDeploymentResourcePoolsResponse.newBuilder() + .setNextPageToken("") + .addAllDeploymentResourcePools(Arrays.asList(responsesElement)) + .build(); + mockDeploymentResourcePoolService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDeploymentResourcePoolsPagedResponse pagedListResponse = + client.listDeploymentResourcePools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeploymentResourcePoolsList().get(0), resources.get(0)); + + List actualRequests = mockDeploymentResourcePoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDeploymentResourcePoolsRequest actualRequest = + ((ListDeploymentResourcePoolsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDeploymentResourcePoolsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeploymentResourcePoolService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDeploymentResourcePools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteDeploymentResourcePoolTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDeploymentResourcePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeploymentResourcePoolService.addResponse(resultOperation); + + DeploymentResourcePoolName name = + DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]"); + + client.deleteDeploymentResourcePoolAsync(name).get(); + + List actualRequests = mockDeploymentResourcePoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDeploymentResourcePoolRequest actualRequest = + ((DeleteDeploymentResourcePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDeploymentResourcePoolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeploymentResourcePoolService.addException(exception); + + try { + DeploymentResourcePoolName name = + DeploymentResourcePoolName.of("[PROJECT]", "[LOCATION]", "[DEPLOYMENT_RESOURCE_POOL]"); + client.deleteDeploymentResourcePoolAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteDeploymentResourcePoolTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDeploymentResourcePoolTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeploymentResourcePoolService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteDeploymentResourcePoolAsync(name).get(); + + List actualRequests = mockDeploymentResourcePoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDeploymentResourcePoolRequest actualRequest = + ((DeleteDeploymentResourcePoolRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDeploymentResourcePoolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeploymentResourcePoolService.addException(exception); + + try { + String name = "name3373707"; + client.deleteDeploymentResourcePoolAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void queryDeployedModelsTest() throws Exception { + DeployedModel responsesElement = DeployedModel.newBuilder().build(); + QueryDeployedModelsResponse expectedResponse = + QueryDeployedModelsResponse.newBuilder() + .setNextPageToken("") + .addAllDeployedModels(Arrays.asList(responsesElement)) + .build(); + mockDeploymentResourcePoolService.addResponse(expectedResponse); + + String deploymentResourcePool = "deploymentResourcePool-1928845137"; + + QueryDeployedModelsPagedResponse pagedListResponse = + client.queryDeployedModels(deploymentResourcePool); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDeployedModelsList().get(0), resources.get(0)); + + List actualRequests = mockDeploymentResourcePoolService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + QueryDeployedModelsRequest actualRequest = ((QueryDeployedModelsRequest) actualRequests.get(0)); + + Assert.assertEquals(deploymentResourcePool, actualRequest.getDeploymentResourcePool()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void queryDeployedModelsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeploymentResourcePoolService.addException(exception); + + try { + String deploymentResourcePool = "deploymentResourcePool-1928845137"; + client.queryDeployedModels(deploymentResourcePool); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDeploymentResourcePoolService.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDeploymentResourcePoolService.java new file mode 100644 index 000000000..6757a1906 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDeploymentResourcePoolService.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.v1beta1; + +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 MockDeploymentResourcePoolService implements MockGrpcService { + private final MockDeploymentResourcePoolServiceImpl serviceImpl; + + public MockDeploymentResourcePoolService() { + serviceImpl = new MockDeploymentResourcePoolServiceImpl(); + } + + @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/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDeploymentResourcePoolServiceImpl.java b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDeploymentResourcePoolServiceImpl.java new file mode 100644 index 000000000..22f2d4e17 --- /dev/null +++ b/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockDeploymentResourcePoolServiceImpl.java @@ -0,0 +1,169 @@ +/* + * 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.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceGrpc.DeploymentResourcePoolServiceImplBase; +import com.google.longrunning.Operation; +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 MockDeploymentResourcePoolServiceImpl extends DeploymentResourcePoolServiceImplBase { + private List requests; + private Queue responses; + + public MockDeploymentResourcePoolServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createDeploymentResourcePool( + CreateDeploymentResourcePoolRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateDeploymentResourcePool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDeploymentResourcePool( + GetDeploymentResourcePoolRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DeploymentResourcePool) { + requests.add(request); + responseObserver.onNext(((DeploymentResourcePool) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDeploymentResourcePool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DeploymentResourcePool.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDeploymentResourcePools( + ListDeploymentResourcePoolsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDeploymentResourcePoolsResponse) { + requests.add(request); + responseObserver.onNext(((ListDeploymentResourcePoolsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDeploymentResourcePools, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDeploymentResourcePoolsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDeploymentResourcePool( + DeleteDeploymentResourcePoolRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteDeploymentResourcePool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void queryDeployedModels( + QueryDeployedModelsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof QueryDeployedModelsResponse) { + requests.add(request); + responseObserver.onNext(((QueryDeployedModelsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method QueryDeployedModels, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + QueryDeployedModelsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceGrpc.java b/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceGrpc.java new file mode 100644 index 000000000..37f71abd1 --- /dev/null +++ b/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceGrpc.java @@ -0,0 +1,885 @@ +/* + * Copyright 2020 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.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * A service that manages the DeploymentResourcePool resource.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class DeploymentResourcePoolServiceGrpc { + + private DeploymentResourcePoolServiceGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.aiplatform.v1beta1.DeploymentResourcePoolService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest, + com.google.longrunning.Operation> + getCreateDeploymentResourcePoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDeploymentResourcePool", + requestType = com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest, + com.google.longrunning.Operation> + getCreateDeploymentResourcePoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest, + com.google.longrunning.Operation> + getCreateDeploymentResourcePoolMethod; + if ((getCreateDeploymentResourcePoolMethod = + DeploymentResourcePoolServiceGrpc.getCreateDeploymentResourcePoolMethod) + == null) { + synchronized (DeploymentResourcePoolServiceGrpc.class) { + if ((getCreateDeploymentResourcePoolMethod = + DeploymentResourcePoolServiceGrpc.getCreateDeploymentResourcePoolMethod) + == null) { + DeploymentResourcePoolServiceGrpc.getCreateDeploymentResourcePoolMethod = + getCreateDeploymentResourcePoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateDeploymentResourcePool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1 + .CreateDeploymentResourcePoolRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DeploymentResourcePoolServiceMethodDescriptorSupplier( + "CreateDeploymentResourcePool")) + .build(); + } + } + } + return getCreateDeploymentResourcePoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool> + getGetDeploymentResourcePoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDeploymentResourcePool", + requestType = com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool> + getGetDeploymentResourcePoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool> + getGetDeploymentResourcePoolMethod; + if ((getGetDeploymentResourcePoolMethod = + DeploymentResourcePoolServiceGrpc.getGetDeploymentResourcePoolMethod) + == null) { + synchronized (DeploymentResourcePoolServiceGrpc.class) { + if ((getGetDeploymentResourcePoolMethod = + DeploymentResourcePoolServiceGrpc.getGetDeploymentResourcePoolMethod) + == null) { + DeploymentResourcePoolServiceGrpc.getGetDeploymentResourcePoolMethod = + getGetDeploymentResourcePoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetDeploymentResourcePool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool + .getDefaultInstance())) + .setSchemaDescriptor( + new DeploymentResourcePoolServiceMethodDescriptorSupplier( + "GetDeploymentResourcePool")) + .build(); + } + } + } + return getGetDeploymentResourcePoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest, + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse> + getListDeploymentResourcePoolsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDeploymentResourcePools", + requestType = com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest, + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse> + getListDeploymentResourcePoolsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest, + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse> + getListDeploymentResourcePoolsMethod; + if ((getListDeploymentResourcePoolsMethod = + DeploymentResourcePoolServiceGrpc.getListDeploymentResourcePoolsMethod) + == null) { + synchronized (DeploymentResourcePoolServiceGrpc.class) { + if ((getListDeploymentResourcePoolsMethod = + DeploymentResourcePoolServiceGrpc.getListDeploymentResourcePoolsMethod) + == null) { + DeploymentResourcePoolServiceGrpc.getListDeploymentResourcePoolsMethod = + getListDeploymentResourcePoolsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListDeploymentResourcePools")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1 + .ListDeploymentResourcePoolsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new DeploymentResourcePoolServiceMethodDescriptorSupplier( + "ListDeploymentResourcePools")) + .build(); + } + } + } + return getListDeploymentResourcePoolsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest, + com.google.longrunning.Operation> + getDeleteDeploymentResourcePoolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDeploymentResourcePool", + requestType = com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest, + com.google.longrunning.Operation> + getDeleteDeploymentResourcePoolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest, + com.google.longrunning.Operation> + getDeleteDeploymentResourcePoolMethod; + if ((getDeleteDeploymentResourcePoolMethod = + DeploymentResourcePoolServiceGrpc.getDeleteDeploymentResourcePoolMethod) + == null) { + synchronized (DeploymentResourcePoolServiceGrpc.class) { + if ((getDeleteDeploymentResourcePoolMethod = + DeploymentResourcePoolServiceGrpc.getDeleteDeploymentResourcePoolMethod) + == null) { + DeploymentResourcePoolServiceGrpc.getDeleteDeploymentResourcePoolMethod = + getDeleteDeploymentResourcePoolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteDeploymentResourcePool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1 + .DeleteDeploymentResourcePoolRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DeploymentResourcePoolServiceMethodDescriptorSupplier( + "DeleteDeploymentResourcePool")) + .build(); + } + } + } + return getDeleteDeploymentResourcePoolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest, + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse> + getQueryDeployedModelsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "QueryDeployedModels", + requestType = com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest, + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse> + getQueryDeployedModelsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest, + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse> + getQueryDeployedModelsMethod; + if ((getQueryDeployedModelsMethod = + DeploymentResourcePoolServiceGrpc.getQueryDeployedModelsMethod) + == null) { + synchronized (DeploymentResourcePoolServiceGrpc.class) { + if ((getQueryDeployedModelsMethod = + DeploymentResourcePoolServiceGrpc.getQueryDeployedModelsMethod) + == null) { + DeploymentResourcePoolServiceGrpc.getQueryDeployedModelsMethod = + getQueryDeployedModelsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "QueryDeployedModels")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DeploymentResourcePoolServiceMethodDescriptorSupplier( + "QueryDeployedModels")) + .build(); + } + } + } + return getQueryDeployedModelsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DeploymentResourcePoolServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DeploymentResourcePoolServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeploymentResourcePoolServiceStub(channel, callOptions); + } + }; + return DeploymentResourcePoolServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DeploymentResourcePoolServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DeploymentResourcePoolServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeploymentResourcePoolServiceBlockingStub(channel, callOptions); + } + }; + return DeploymentResourcePoolServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DeploymentResourcePoolServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DeploymentResourcePoolServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeploymentResourcePoolServiceFutureStub(channel, callOptions); + } + }; + return DeploymentResourcePoolServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service that manages the DeploymentResourcePool resource.
+   * 
+ */ + public abstract static class DeploymentResourcePoolServiceImplBase + implements io.grpc.BindableService { + + /** + * + * + *
+     * Create a DeploymentResourcePool.
+     * 
+ */ + public void createDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDeploymentResourcePoolMethod(), responseObserver); + } + + /** + * + * + *
+     * Get a DeploymentResourcePool.
+     * 
+ */ + public void getDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDeploymentResourcePoolMethod(), responseObserver); + } + + /** + * + * + *
+     * List DeploymentResourcePools in a location.
+     * 
+ */ + public void listDeploymentResourcePools( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDeploymentResourcePoolsMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete a DeploymentResourcePool.
+     * 
+ */ + public void deleteDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDeploymentResourcePoolMethod(), responseObserver); + } + + /** + * + * + *
+     * List DeployedModels that have been deployed on this DeploymentResourcePool.
+     * 
+ */ + public void queryDeployedModels( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getQueryDeployedModelsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateDeploymentResourcePoolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest, + com.google.longrunning.Operation>( + this, METHODID_CREATE_DEPLOYMENT_RESOURCE_POOL))) + .addMethod( + getGetDeploymentResourcePoolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool>( + this, METHODID_GET_DEPLOYMENT_RESOURCE_POOL))) + .addMethod( + getListDeploymentResourcePoolsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest, + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse>( + this, METHODID_LIST_DEPLOYMENT_RESOURCE_POOLS))) + .addMethod( + getDeleteDeploymentResourcePoolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest, + com.google.longrunning.Operation>( + this, METHODID_DELETE_DEPLOYMENT_RESOURCE_POOL))) + .addMethod( + getQueryDeployedModelsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest, + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse>( + this, METHODID_QUERY_DEPLOYED_MODELS))) + .build(); + } + } + + /** + * + * + *
+   * A service that manages the DeploymentResourcePool resource.
+   * 
+ */ + public static final class DeploymentResourcePoolServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private DeploymentResourcePoolServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeploymentResourcePoolServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeploymentResourcePoolServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a DeploymentResourcePool.
+     * 
+ */ + public void createDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDeploymentResourcePoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get a DeploymentResourcePool.
+     * 
+ */ + public void getDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDeploymentResourcePoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List DeploymentResourcePools in a location.
+     * 
+ */ + public void listDeploymentResourcePools( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDeploymentResourcePoolsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete a DeploymentResourcePool.
+     * 
+ */ + public void deleteDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDeploymentResourcePoolMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List DeployedModels that have been deployed on this DeploymentResourcePool.
+     * 
+ */ + public void queryDeployedModels( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getQueryDeployedModelsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * A service that manages the DeploymentResourcePool resource.
+   * 
+ */ + public static final class DeploymentResourcePoolServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DeploymentResourcePoolServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeploymentResourcePoolServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeploymentResourcePoolServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a DeploymentResourcePool.
+     * 
+ */ + public com.google.longrunning.Operation createDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDeploymentResourcePoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a DeploymentResourcePool.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool getDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDeploymentResourcePoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List DeploymentResourcePools in a location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse + listDeploymentResourcePools( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDeploymentResourcePoolsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete a DeploymentResourcePool.
+     * 
+ */ + public com.google.longrunning.Operation deleteDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDeploymentResourcePoolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List DeployedModels that have been deployed on this DeploymentResourcePool.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse queryDeployedModels( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getQueryDeployedModelsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * A service that manages the DeploymentResourcePool resource.
+   * 
+ */ + public static final class DeploymentResourcePoolServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DeploymentResourcePoolServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DeploymentResourcePoolServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DeploymentResourcePoolServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a DeploymentResourcePool.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDeploymentResourcePoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get a DeploymentResourcePool.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool> + getDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDeploymentResourcePoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List DeploymentResourcePools in a location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse> + listDeploymentResourcePools( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDeploymentResourcePoolsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete a DeploymentResourcePool.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDeploymentResourcePoolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List DeployedModels that have been deployed on this DeploymentResourcePool.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse> + queryDeployedModels( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getQueryDeployedModelsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_DEPLOYMENT_RESOURCE_POOL = 0; + private static final int METHODID_GET_DEPLOYMENT_RESOURCE_POOL = 1; + private static final int METHODID_LIST_DEPLOYMENT_RESOURCE_POOLS = 2; + private static final int METHODID_DELETE_DEPLOYMENT_RESOURCE_POOL = 3; + private static final int METHODID_QUERY_DEPLOYED_MODELS = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final DeploymentResourcePoolServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(DeploymentResourcePoolServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_DEPLOYMENT_RESOURCE_POOL: + serviceImpl.createDeploymentResourcePool( + (com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DEPLOYMENT_RESOURCE_POOL: + serviceImpl.getDeploymentResourcePool( + (com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool>) + responseObserver); + break; + case METHODID_LIST_DEPLOYMENT_RESOURCE_POOLS: + serviceImpl.listDeploymentResourcePools( + (com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse>) + responseObserver); + break; + case METHODID_DELETE_DEPLOYMENT_RESOURCE_POOL: + serviceImpl.deleteDeploymentResourcePool( + (com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_QUERY_DEPLOYED_MODELS: + serviceImpl.queryDeployedModels( + (com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class DeploymentResourcePoolServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DeploymentResourcePoolServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DeploymentResourcePoolService"); + } + } + + private static final class DeploymentResourcePoolServiceFileDescriptorSupplier + extends DeploymentResourcePoolServiceBaseDescriptorSupplier { + DeploymentResourcePoolServiceFileDescriptorSupplier() {} + } + + private static final class DeploymentResourcePoolServiceMethodDescriptorSupplier + extends DeploymentResourcePoolServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DeploymentResourcePoolServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DeploymentResourcePoolServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor( + new DeploymentResourcePoolServiceFileDescriptorSupplier()) + .addMethod(getCreateDeploymentResourcePoolMethod()) + .addMethod(getGetDeploymentResourcePoolMethod()) + .addMethod(getListDeploymentResourcePoolsMethod()) + .addMethod(getDeleteDeploymentResourcePoolMethod()) + .addMethod(getQueryDeployedModelsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java index 30bc3c295..a122dacf2 100644 --- a/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java +++ b/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java @@ -1975,8 +1975,8 @@ public int getExportableContentsValue(int index) { * repeated .google.cloud.aiplatform.v1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of exportableContents at the given index. + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for exportableContents to set. * @return This builder for chaining. */ public Builder setExportableContentsValue(int index, int value) { @@ -7946,9 +7946,8 @@ public int getSupportedDeploymentResourcesTypesValue(int index) { * repeated .google.cloud.aiplatform.v1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of supportedDeploymentResourcesTypes at the given - * index. + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for supportedDeploymentResourcesTypes to set. * @return This builder for chaining. */ public Builder setSupportedDeploymentResourcesTypesValue(int index, int value) { diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolOperationMetadata.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolOperationMetadata.java new file mode 100644 index 000000000..dde04fab8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolOperationMetadata.java @@ -0,0 +1,782 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Runtime operation information for CreateDeploymentResourcePool method.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata} + */ +public final class CreateDeploymentResourcePoolOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata) + CreateDeploymentResourcePoolOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDeploymentResourcePoolOperationMetadata.newBuilder() to construct. + private CreateDeploymentResourcePoolOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDeploymentResourcePoolOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDeploymentResourcePoolOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateDeploymentResourcePoolOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder subBuilder = + null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + .Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata other = + (com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Runtime operation information for CreateDeploymentResourcePool method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata) + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + .class, + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + build() { + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + buildPartial() { + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata result = + new com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata( + this); + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.newBuilder( + genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata) + private static final com.google.cloud.aiplatform.v1beta1 + .CreateDeploymentResourcePoolOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDeploymentResourcePoolOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDeploymentResourcePoolOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolOperationMetadataOrBuilder.java new file mode 100644 index 000000000..630b91d77 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolOperationMetadataOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface CreateDeploymentResourcePoolOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolRequest.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolRequest.java new file mode 100644 index 000000000..7b1021c89 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolRequest.java @@ -0,0 +1,1200 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for CreateDeploymentResourcePool method.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest} + */ +public final class CreateDeploymentResourcePoolRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest) + CreateDeploymentResourcePoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDeploymentResourcePoolRequest.newBuilder() to construct. + private CreateDeploymentResourcePoolRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDeploymentResourcePoolRequest() { + parent_ = ""; + deploymentResourcePoolId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDeploymentResourcePoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateDeploymentResourcePoolRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder subBuilder = null; + if (deploymentResourcePool_ != null) { + subBuilder = deploymentResourcePool_.toBuilder(); + } + deploymentResourcePool_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deploymentResourcePool_); + deploymentResourcePool_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + deploymentResourcePoolId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest.class, + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent location resource where this DeploymentResourcePool will be
+   * created. Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent location resource where this DeploymentResourcePool will be
+   * created. Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOYMENT_RESOURCE_POOL_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool deploymentResourcePool_; + /** + * + * + *
+   * Required. The DeploymentResourcePool to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deploymentResourcePool field is set. + */ + @java.lang.Override + public boolean hasDeploymentResourcePool() { + return deploymentResourcePool_ != null; + } + /** + * + * + *
+   * Required. The DeploymentResourcePool to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deploymentResourcePool. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool getDeploymentResourcePool() { + return deploymentResourcePool_ == null + ? com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.getDefaultInstance() + : deploymentResourcePool_; + } + /** + * + * + *
+   * Required. The DeploymentResourcePool to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder + getDeploymentResourcePoolOrBuilder() { + return getDeploymentResourcePool(); + } + + public static final int DEPLOYMENT_RESOURCE_POOL_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object deploymentResourcePoolId_; + /** + * + * + *
+   * Required. The ID to use for the DeploymentResourcePool, which
+   * will become the final component of the DeploymentResourcePool's resource
+   * name.
+   * The maximum length is 63 characters, and valid characters
+   * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+   * 
+ * + * string deployment_resource_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deploymentResourcePoolId. + */ + @java.lang.Override + public java.lang.String getDeploymentResourcePoolId() { + java.lang.Object ref = deploymentResourcePoolId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deploymentResourcePoolId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The ID to use for the DeploymentResourcePool, which
+   * will become the final component of the DeploymentResourcePool's resource
+   * name.
+   * The maximum length is 63 characters, and valid characters
+   * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+   * 
+ * + * string deployment_resource_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deploymentResourcePoolId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeploymentResourcePoolIdBytes() { + java.lang.Object ref = deploymentResourcePoolId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deploymentResourcePoolId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (deploymentResourcePool_ != null) { + output.writeMessage(2, getDeploymentResourcePool()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deploymentResourcePoolId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deploymentResourcePoolId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (deploymentResourcePool_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeploymentResourcePool()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deploymentResourcePoolId_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deploymentResourcePoolId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest other = + (com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasDeploymentResourcePool() != other.hasDeploymentResourcePool()) return false; + if (hasDeploymentResourcePool()) { + if (!getDeploymentResourcePool().equals(other.getDeploymentResourcePool())) return false; + } + if (!getDeploymentResourcePoolId().equals(other.getDeploymentResourcePoolId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasDeploymentResourcePool()) { + hash = (37 * hash) + DEPLOYMENT_RESOURCE_POOL_FIELD_NUMBER; + hash = (53 * hash) + getDeploymentResourcePool().hashCode(); + } + hash = (37 * hash) + DEPLOYMENT_RESOURCE_POOL_ID_FIELD_NUMBER; + hash = (53 * hash) + getDeploymentResourcePoolId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for CreateDeploymentResourcePool method.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest) + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest.class, + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (deploymentResourcePoolBuilder_ == null) { + deploymentResourcePool_ = null; + } else { + deploymentResourcePool_ = null; + deploymentResourcePoolBuilder_ = null; + } + deploymentResourcePoolId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest build() { + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest result = + new com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest(this); + result.parent_ = parent_; + if (deploymentResourcePoolBuilder_ == null) { + result.deploymentResourcePool_ = deploymentResourcePool_; + } else { + result.deploymentResourcePool_ = deploymentResourcePoolBuilder_.build(); + } + result.deploymentResourcePoolId_ = deploymentResourcePoolId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasDeploymentResourcePool()) { + mergeDeploymentResourcePool(other.getDeploymentResourcePool()); + } + if (!other.getDeploymentResourcePoolId().isEmpty()) { + deploymentResourcePoolId_ = other.deploymentResourcePoolId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent location resource where this DeploymentResourcePool will be
+     * created. Format: projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent location resource where this DeploymentResourcePool will be
+     * created. Format: projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent location resource where this DeploymentResourcePool will be
+     * created. Format: projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location resource where this DeploymentResourcePool will be
+     * created. Format: projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent location resource where this DeploymentResourcePool will be
+     * created. Format: projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool deploymentResourcePool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder> + deploymentResourcePoolBuilder_; + /** + * + * + *
+     * Required. The DeploymentResourcePool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deploymentResourcePool field is set. + */ + public boolean hasDeploymentResourcePool() { + return deploymentResourcePoolBuilder_ != null || deploymentResourcePool_ != null; + } + /** + * + * + *
+     * Required. The DeploymentResourcePool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deploymentResourcePool. + */ + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool getDeploymentResourcePool() { + if (deploymentResourcePoolBuilder_ == null) { + return deploymentResourcePool_ == null + ? com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.getDefaultInstance() + : deploymentResourcePool_; + } else { + return deploymentResourcePoolBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The DeploymentResourcePool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool value) { + if (deploymentResourcePoolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deploymentResourcePool_ = value; + onChanged(); + } else { + deploymentResourcePoolBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The DeploymentResourcePool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder builderForValue) { + if (deploymentResourcePoolBuilder_ == null) { + deploymentResourcePool_ = builderForValue.build(); + onChanged(); + } else { + deploymentResourcePoolBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The DeploymentResourcePool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDeploymentResourcePool( + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool value) { + if (deploymentResourcePoolBuilder_ == null) { + if (deploymentResourcePool_ != null) { + deploymentResourcePool_ = + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.newBuilder( + deploymentResourcePool_) + .mergeFrom(value) + .buildPartial(); + } else { + deploymentResourcePool_ = value; + } + onChanged(); + } else { + deploymentResourcePoolBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The DeploymentResourcePool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDeploymentResourcePool() { + if (deploymentResourcePoolBuilder_ == null) { + deploymentResourcePool_ = null; + onChanged(); + } else { + deploymentResourcePool_ = null; + deploymentResourcePoolBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The DeploymentResourcePool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder + getDeploymentResourcePoolBuilder() { + + onChanged(); + return getDeploymentResourcePoolFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The DeploymentResourcePool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder + getDeploymentResourcePoolOrBuilder() { + if (deploymentResourcePoolBuilder_ != null) { + return deploymentResourcePoolBuilder_.getMessageOrBuilder(); + } else { + return deploymentResourcePool_ == null + ? com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.getDefaultInstance() + : deploymentResourcePool_; + } + } + /** + * + * + *
+     * Required. The DeploymentResourcePool to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder> + getDeploymentResourcePoolFieldBuilder() { + if (deploymentResourcePoolBuilder_ == null) { + deploymentResourcePoolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder>( + getDeploymentResourcePool(), getParentForChildren(), isClean()); + deploymentResourcePool_ = null; + } + return deploymentResourcePoolBuilder_; + } + + private java.lang.Object deploymentResourcePoolId_ = ""; + /** + * + * + *
+     * Required. The ID to use for the DeploymentResourcePool, which
+     * will become the final component of the DeploymentResourcePool's resource
+     * name.
+     * The maximum length is 63 characters, and valid characters
+     * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+     * 
+ * + * string deployment_resource_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deploymentResourcePoolId. + */ + public java.lang.String getDeploymentResourcePoolId() { + java.lang.Object ref = deploymentResourcePoolId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deploymentResourcePoolId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the DeploymentResourcePool, which
+     * will become the final component of the DeploymentResourcePool's resource
+     * name.
+     * The maximum length is 63 characters, and valid characters
+     * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+     * 
+ * + * string deployment_resource_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for deploymentResourcePoolId. + */ + public com.google.protobuf.ByteString getDeploymentResourcePoolIdBytes() { + java.lang.Object ref = deploymentResourcePoolId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deploymentResourcePoolId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The ID to use for the DeploymentResourcePool, which
+     * will become the final component of the DeploymentResourcePool's resource
+     * name.
+     * The maximum length is 63 characters, and valid characters
+     * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+     * 
+ * + * string deployment_resource_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The deploymentResourcePoolId to set. + * @return This builder for chaining. + */ + public Builder setDeploymentResourcePoolId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deploymentResourcePoolId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the DeploymentResourcePool, which
+     * will become the final component of the DeploymentResourcePool's resource
+     * name.
+     * The maximum length is 63 characters, and valid characters
+     * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+     * 
+ * + * string deployment_resource_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearDeploymentResourcePoolId() { + + deploymentResourcePoolId_ = getDefaultInstance().getDeploymentResourcePoolId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The ID to use for the DeploymentResourcePool, which
+     * will become the final component of the DeploymentResourcePool's resource
+     * name.
+     * The maximum length is 63 characters, and valid characters
+     * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+     * 
+ * + * string deployment_resource_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for deploymentResourcePoolId to set. + * @return This builder for chaining. + */ + public Builder setDeploymentResourcePoolIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deploymentResourcePoolId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest) + private static final com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDeploymentResourcePoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDeploymentResourcePoolRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolRequestOrBuilder.java new file mode 100644 index 000000000..844f6a201 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateDeploymentResourcePoolRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface CreateDeploymentResourcePoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CreateDeploymentResourcePoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent location resource where this DeploymentResourcePool will be
+   * created. Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent location resource where this DeploymentResourcePool will be
+   * created. Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The DeploymentResourcePool to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the deploymentResourcePool field is set. + */ + boolean hasDeploymentResourcePool(); + /** + * + * + *
+   * Required. The DeploymentResourcePool to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The deploymentResourcePool. + */ + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool getDeploymentResourcePool(); + /** + * + * + *
+   * Required. The DeploymentResourcePool to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder + getDeploymentResourcePoolOrBuilder(); + + /** + * + * + *
+   * Required. The ID to use for the DeploymentResourcePool, which
+   * will become the final component of the DeploymentResourcePool's resource
+   * name.
+   * The maximum length is 63 characters, and valid characters
+   * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+   * 
+ * + * string deployment_resource_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deploymentResourcePoolId. + */ + java.lang.String getDeploymentResourcePoolId(); + /** + * + * + *
+   * Required. The ID to use for the DeploymentResourcePool, which
+   * will become the final component of the DeploymentResourcePool's resource
+   * name.
+   * The maximum length is 63 characters, and valid characters
+   * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
+   * 
+ * + * string deployment_resource_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deploymentResourcePoolId. + */ + com.google.protobuf.ByteString getDeploymentResourcePoolIdBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteDeploymentResourcePoolRequest.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteDeploymentResourcePoolRequest.java new file mode 100644 index 000000000..f6f81cdaf --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteDeploymentResourcePoolRequest.java @@ -0,0 +1,684 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for DeleteDeploymentResourcePool method.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest} + */ +public final class DeleteDeploymentResourcePoolRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest) + DeleteDeploymentResourcePoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDeploymentResourcePoolRequest.newBuilder() to construct. + private DeleteDeploymentResourcePoolRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDeploymentResourcePoolRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDeploymentResourcePoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteDeploymentResourcePoolRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteDeploymentResourcePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteDeploymentResourcePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest.class, + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the DeploymentResourcePool to delete.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the DeploymentResourcePool to delete.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest other = + (com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for DeleteDeploymentResourcePool method.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest) + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteDeploymentResourcePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteDeploymentResourcePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest.class, + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteDeploymentResourcePoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest build() { + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest result = + new com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the DeploymentResourcePool to delete.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the DeploymentResourcePool to delete.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the DeploymentResourcePool to delete.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DeploymentResourcePool to delete.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DeploymentResourcePool to delete.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest) + private static final com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDeploymentResourcePoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteDeploymentResourcePoolRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteDeploymentResourcePoolRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteDeploymentResourcePoolRequestOrBuilder.java new file mode 100644 index 000000000..7b418c6e8 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteDeploymentResourcePoolRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface DeleteDeploymentResourcePoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.DeleteDeploymentResourcePoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the DeploymentResourcePool to delete.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the DeploymentResourcePool to delete.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePool.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePool.java new file mode 100644 index 000000000..5e2ae0417 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePool.java @@ -0,0 +1,1256 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * A description of resources that can be shared by multiple DeployedModels,
+ * whose underlying specification consists of a DedicatedResources.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeploymentResourcePool} + */ +public final class DeploymentResourcePool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.DeploymentResourcePool) + DeploymentResourcePoolOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeploymentResourcePool.newBuilder() to construct. + private DeploymentResourcePool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeploymentResourcePool() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeploymentResourcePool(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeploymentResourcePool( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.aiplatform.v1beta1.DedicatedResources.Builder subBuilder = null; + if (dedicatedResources_ != null) { + subBuilder = dedicatedResources_.toBuilder(); + } + dedicatedResources_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.DedicatedResources.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dedicatedResources_); + dedicatedResources_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolProto + .internal_static_google_cloud_aiplatform_v1beta1_DeploymentResourcePool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolProto + .internal_static_google_cloud_aiplatform_v1beta1_DeploymentResourcePool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.class, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The resource name of the DeploymentResourcePool.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the DeploymentResourcePool.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEDICATED_RESOURCES_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.DedicatedResources dedicatedResources_; + /** + * + * + *
+   * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dedicatedResources field is set. + */ + @java.lang.Override + public boolean hasDedicatedResources() { + return dedicatedResources_ != null; + } + /** + * + * + *
+   * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dedicatedResources. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DedicatedResources getDedicatedResources() { + return dedicatedResources_ == null + ? com.google.cloud.aiplatform.v1beta1.DedicatedResources.getDefaultInstance() + : dedicatedResources_; + } + /** + * + * + *
+   * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DedicatedResourcesOrBuilder + getDedicatedResourcesOrBuilder() { + return getDedicatedResources(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp when this DeploymentResourcePool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp when this DeploymentResourcePool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp when this DeploymentResourcePool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (dedicatedResources_ != null) { + output.writeMessage(2, getDedicatedResources()); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (dedicatedResources_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDedicatedResources()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool other = + (com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool) obj; + + if (!getName().equals(other.getName())) return false; + if (hasDedicatedResources() != other.hasDedicatedResources()) return false; + if (hasDedicatedResources()) { + if (!getDedicatedResources().equals(other.getDedicatedResources())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasDedicatedResources()) { + hash = (37 * hash) + DEDICATED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getDedicatedResources().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A description of resources that can be shared by multiple DeployedModels,
+   * whose underlying specification consists of a DedicatedResources.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeploymentResourcePool} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.DeploymentResourcePool) + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolProto + .internal_static_google_cloud_aiplatform_v1beta1_DeploymentResourcePool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolProto + .internal_static_google_cloud_aiplatform_v1beta1_DeploymentResourcePool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.class, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (dedicatedResourcesBuilder_ == null) { + dedicatedResources_ = null; + } else { + dedicatedResources_ = null; + dedicatedResourcesBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolProto + .internal_static_google_cloud_aiplatform_v1beta1_DeploymentResourcePool_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool build() { + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool buildPartial() { + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool result = + new com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool(this); + result.name_ = name_; + if (dedicatedResourcesBuilder_ == null) { + result.dedicatedResources_ = dedicatedResources_; + } else { + result.dedicatedResources_ = dedicatedResourcesBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool other) { + if (other == com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasDedicatedResources()) { + mergeDedicatedResources(other.getDedicatedResources()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name of the DeploymentResourcePool.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the DeploymentResourcePool.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the DeploymentResourcePool.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the DeploymentResourcePool.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the DeploymentResourcePool.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.DedicatedResources dedicatedResources_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DedicatedResources, + com.google.cloud.aiplatform.v1beta1.DedicatedResources.Builder, + com.google.cloud.aiplatform.v1beta1.DedicatedResourcesOrBuilder> + dedicatedResourcesBuilder_; + /** + * + * + *
+     * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dedicatedResources field is set. + */ + public boolean hasDedicatedResources() { + return dedicatedResourcesBuilder_ != null || dedicatedResources_ != null; + } + /** + * + * + *
+     * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dedicatedResources. + */ + public com.google.cloud.aiplatform.v1beta1.DedicatedResources getDedicatedResources() { + if (dedicatedResourcesBuilder_ == null) { + return dedicatedResources_ == null + ? com.google.cloud.aiplatform.v1beta1.DedicatedResources.getDefaultInstance() + : dedicatedResources_; + } else { + return dedicatedResourcesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDedicatedResources( + com.google.cloud.aiplatform.v1beta1.DedicatedResources value) { + if (dedicatedResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dedicatedResources_ = value; + onChanged(); + } else { + dedicatedResourcesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDedicatedResources( + com.google.cloud.aiplatform.v1beta1.DedicatedResources.Builder builderForValue) { + if (dedicatedResourcesBuilder_ == null) { + dedicatedResources_ = builderForValue.build(); + onChanged(); + } else { + dedicatedResourcesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDedicatedResources( + com.google.cloud.aiplatform.v1beta1.DedicatedResources value) { + if (dedicatedResourcesBuilder_ == null) { + if (dedicatedResources_ != null) { + dedicatedResources_ = + com.google.cloud.aiplatform.v1beta1.DedicatedResources.newBuilder(dedicatedResources_) + .mergeFrom(value) + .buildPartial(); + } else { + dedicatedResources_ = value; + } + onChanged(); + } else { + dedicatedResourcesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDedicatedResources() { + if (dedicatedResourcesBuilder_ == null) { + dedicatedResources_ = null; + onChanged(); + } else { + dedicatedResources_ = null; + dedicatedResourcesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.DedicatedResources.Builder + getDedicatedResourcesBuilder() { + + onChanged(); + return getDedicatedResourcesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.DedicatedResourcesOrBuilder + getDedicatedResourcesOrBuilder() { + if (dedicatedResourcesBuilder_ != null) { + return dedicatedResourcesBuilder_.getMessageOrBuilder(); + } else { + return dedicatedResources_ == null + ? com.google.cloud.aiplatform.v1beta1.DedicatedResources.getDefaultInstance() + : dedicatedResources_; + } + } + /** + * + * + *
+     * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DedicatedResources, + com.google.cloud.aiplatform.v1beta1.DedicatedResources.Builder, + com.google.cloud.aiplatform.v1beta1.DedicatedResourcesOrBuilder> + getDedicatedResourcesFieldBuilder() { + if (dedicatedResourcesBuilder_ == null) { + dedicatedResourcesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DedicatedResources, + com.google.cloud.aiplatform.v1beta1.DedicatedResources.Builder, + com.google.cloud.aiplatform.v1beta1.DedicatedResourcesOrBuilder>( + getDedicatedResources(), getParentForChildren(), isClean()); + dedicatedResources_ = null; + } + return dedicatedResourcesBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp when this DeploymentResourcePool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp when this DeploymentResourcePool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp when this DeploymentResourcePool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DeploymentResourcePool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DeploymentResourcePool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DeploymentResourcePool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp when this DeploymentResourcePool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp when this DeploymentResourcePool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp when this DeploymentResourcePool was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.DeploymentResourcePool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.DeploymentResourcePool) + private static final com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool(); + } + + public static com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeploymentResourcePool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeploymentResourcePool(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolName.java new file mode 100644 index 000000000..67cf61f0f --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolName.java @@ -0,0 +1,240 @@ +/* + * 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.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class DeploymentResourcePoolName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DEPLOYMENT_RESOURCE_POOL = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String deploymentResourcePool; + + @Deprecated + protected DeploymentResourcePoolName() { + project = null; + location = null; + deploymentResourcePool = null; + } + + private DeploymentResourcePoolName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + deploymentResourcePool = Preconditions.checkNotNull(builder.getDeploymentResourcePool()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeploymentResourcePool() { + return deploymentResourcePool; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DeploymentResourcePoolName of( + String project, String location, String deploymentResourcePool) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeploymentResourcePool(deploymentResourcePool) + .build(); + } + + public static String format(String project, String location, String deploymentResourcePool) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeploymentResourcePool(deploymentResourcePool) + .build() + .toString(); + } + + public static DeploymentResourcePoolName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DEPLOYMENT_RESOURCE_POOL.validatedMatch( + formattedString, + "DeploymentResourcePoolName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("deployment_resource_pool")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (DeploymentResourcePoolName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DEPLOYMENT_RESOURCE_POOL.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (deploymentResourcePool != null) { + fieldMapBuilder.put("deployment_resource_pool", deploymentResourcePool); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DEPLOYMENT_RESOURCE_POOL.instantiate( + "project", + project, + "location", + location, + "deployment_resource_pool", + deploymentResourcePool); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DeploymentResourcePoolName that = ((DeploymentResourcePoolName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.deploymentResourcePool, that.deploymentResourcePool); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(deploymentResourcePool); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}. + */ + public static class Builder { + private String project; + private String location; + private String deploymentResourcePool; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeploymentResourcePool() { + return deploymentResourcePool; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDeploymentResourcePool(String deploymentResourcePool) { + this.deploymentResourcePool = deploymentResourcePool; + return this; + } + + private Builder(DeploymentResourcePoolName deploymentResourcePoolName) { + this.project = deploymentResourcePoolName.project; + this.location = deploymentResourcePoolName.location; + this.deploymentResourcePool = deploymentResourcePoolName.deploymentResourcePool; + } + + public DeploymentResourcePoolName build() { + return new DeploymentResourcePoolName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolOrBuilder.java new file mode 100644 index 000000000..acd57669e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface DeploymentResourcePoolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.DeploymentResourcePool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the DeploymentResourcePool.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The resource name of the DeploymentResourcePool.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dedicatedResources field is set. + */ + boolean hasDedicatedResources(); + /** + * + * + *
+   * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dedicatedResources. + */ + com.google.cloud.aiplatform.v1beta1.DedicatedResources getDedicatedResources(); + /** + * + * + *
+   * Required. The underlying DedicatedResources that the DeploymentResourcePool uses.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.DedicatedResources dedicated_resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.DedicatedResourcesOrBuilder getDedicatedResourcesOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp when this DeploymentResourcePool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this DeploymentResourcePool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp when this DeploymentResourcePool was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolProto.java new file mode 100644 index 000000000..a5debc83b --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolProto.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto + +package com.google.cloud.aiplatform.v1beta1; + +public final class DeploymentResourcePoolProto { + private DeploymentResourcePoolProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_DeploymentResourcePool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_DeploymentResourcePool_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n>google/cloud/aiplatform/v1beta1/deploy" + + "ment_resource_pool.proto\022\037google.cloud.a" + + "iplatform.v1beta1\032\037google/api/field_beha" + + "vior.proto\032\031google/api/resource.proto\0327g" + + "oogle/cloud/aiplatform/v1beta1/machine_r" + + "esources.proto\032\037google/protobuf/timestam" + + "p.proto\"\315\002\n\026DeploymentResourcePool\022\021\n\004na" + + "me\030\001 \001(\tB\003\340A\003\022U\n\023dedicated_resources\030\002 \001" + + "(\01323.google.cloud.aiplatform.v1beta1.Ded" + + "icatedResourcesB\003\340A\002\0224\n\013create_time\030\004 \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003:\222\001\352A\216" + + "\001\n0aiplatform.googleapis.com/DeploymentR" + + "esourcePool\022Zprojects/{project}/location" + + "s/{location}/deploymentResourcePools/{de" + + "ployment_resource_pool}B\370\001\n#com.google.c" + + "loud.aiplatform.v1beta1B\033DeploymentResou" + + "rcePoolProtoP\001ZIgoogle.golang.org/genpro" + + "to/googleapis/cloud/aiplatform/v1beta1;a" + + "iplatform\252\002\037Google.Cloud.AIPlatform.V1Be" + + "ta1\312\002\037Google\\Cloud\\AIPlatform\\V1beta1\352\002\"" + + "Google::Cloud::AIPlatform::V1beta1b\006prot" + + "o3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.MachineResourcesProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_DeploymentResourcePool_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_DeploymentResourcePool_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_DeploymentResourcePool_descriptor, + new java.lang.String[] { + "Name", "DedicatedResources", "CreateTime", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.MachineResourcesProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceProto.java new file mode 100644 index 000000000..defb7db37 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeploymentResourcePoolServiceProto.java @@ -0,0 +1,275 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public final class DeploymentResourcePoolServiceProto { + private DeploymentResourcePoolServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_GetDeploymentResourcePoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_GetDeploymentResourcePoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_UpdateDeploymentResourcePoolOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_UpdateDeploymentResourcePoolOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_DeleteDeploymentResourcePoolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_DeleteDeploymentResourcePoolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nFgoogle/cloud/aiplatform/v1beta1/deploy" + + "ment_resource_pool_service.proto\022\037google" + + ".cloud.aiplatform.v1beta1\032\034google/api/an" + + "notations.proto\032\027google/api/client.proto" + + "\032\037google/api/field_behavior.proto\032\031googl" + + "e/api/resource.proto\0328google/cloud/aipla" + + "tform/v1beta1/deployed_model_ref.proto\032>" + + "google/cloud/aiplatform/v1beta1/deployme" + + "nt_resource_pool.proto\032.google/cloud/aip" + + "latform/v1beta1/endpoint.proto\032/google/c" + + "loud/aiplatform/v1beta1/operation.proto\032" + + "#google/longrunning/operations.proto\"\352\001\n" + + "#CreateDeploymentResourcePoolRequest\0229\n\006" + + "parent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleap" + + "is.com/Location\022^\n\030deployment_resource_p" + + "ool\030\002 \001(\01327.google.cloud.aiplatform.v1be" + + "ta1.DeploymentResourcePoolB\003\340A\002\022(\n\033deplo" + + "yment_resource_pool_id\030\003 \001(\tB\003\340A\002\"\204\001\n-Cr" + + "eateDeploymentResourcePoolOperationMetad" + + "ata\022S\n\020generic_metadata\030\001 \001(\01329.google.c" + + "loud.aiplatform.v1beta1.GenericOperation" + + "Metadata\"j\n GetDeploymentResourcePoolReq" + + "uest\022F\n\004name\030\001 \001(\tB8\340A\002\372A2\n0aiplatform.g" + + "oogleapis.com/DeploymentResourcePool\"\206\001\n" + + "\"ListDeploymentResourcePoolsRequest\0229\n\006p" + + "arent\030\001 \001(\tB)\340A\002\372A#\022!locations.googleapi" + + "s.com/Location\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npag" + + "e_token\030\003 \001(\t\"\232\001\n#ListDeploymentResource" + + "PoolsResponse\022Z\n\031deployment_resource_poo" + + "ls\030\001 \003(\01327.google.cloud.aiplatform.v1bet" + + "a1.DeploymentResourcePool\022\027\n\017next_page_t" + + "oken\030\002 \001(\t\"\204\001\n-UpdateDeploymentResourceP" + + "oolOperationMetadata\022S\n\020generic_metadata" + + "\030\001 \001(\01329.google.cloud.aiplatform.v1beta1" + + ".GenericOperationMetadata\"m\n#DeleteDeplo" + + "ymentResourcePoolRequest\022F\n\004name\030\001 \001(\tB8" + + "\340A\002\372A2\n0aiplatform.googleapis.com/Deploy" + + "mentResourcePool\"j\n\032QueryDeployedModelsR" + + "equest\022%\n\030deployment_resource_pool\030\001 \001(\t" + + "B\003\340A\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" + + " \001(\t\"\323\001\n\033QueryDeployedModelsResponse\022K\n\017" + + "deployed_models\030\001 \003(\0132..google.cloud.aip" + + "latform.v1beta1.DeployedModelB\002\030\001\022\027\n\017nex" + + "t_page_token\030\002 \001(\t\022N\n\023deployed_model_ref" + + "s\030\003 \003(\01321.google.cloud.aiplatform.v1beta" + + "1.DeployedModelRef2\337\013\n\035DeploymentResourc" + + "ePoolService\022\331\002\n\034CreateDeploymentResourc" + + "ePool\022D.google.cloud.aiplatform.v1beta1." + + "CreateDeploymentResourcePoolRequest\032\035.go" + + "ogle.longrunning.Operation\"\323\001\202\323\344\223\002E\"@/v1" + + "beta1/{parent=projects/*/locations/*}/de" + + "ploymentResourcePools:\001*\332A;parent,deploy" + + "ment_resource_pool,deployment_resource_p" + + "ool_id\312AG\n\026DeploymentResourcePool\022-Creat" + + "eDeploymentResourcePoolOperationMetadata" + + "\022\350\001\n\031GetDeploymentResourcePool\022A.google." + + "cloud.aiplatform.v1beta1.GetDeploymentRe" + + "sourcePoolRequest\0327.google.cloud.aiplatf" + + "orm.v1beta1.DeploymentResourcePool\"O\202\323\344\223" + + "\002B\022@/v1beta1/{name=projects/*/locations/" + + "*/deploymentResourcePools/*}\332A\004name\022\373\001\n\033" + + "ListDeploymentResourcePools\022C.google.clo" + + "ud.aiplatform.v1beta1.ListDeploymentReso" + + "urcePoolsRequest\032D.google.cloud.aiplatfo" + + "rm.v1beta1.ListDeploymentResourcePoolsRe" + + "sponse\"Q\202\323\344\223\002B\022@/v1beta1/{parent=project" + + "s/*/locations/*}/deploymentResourcePools" + + "\332A\006parent\022\210\002\n\034DeleteDeploymentResourcePo" + + "ol\022D.google.cloud.aiplatform.v1beta1.Del" + + "eteDeploymentResourcePoolRequest\032\035.googl" + + "e.longrunning.Operation\"\202\001\202\323\344\223\002B*@/v1bet" + + "a1/{name=projects/*/locations/*/deployme" + + "ntResourcePools/*}\332A\004name\312A0\n\025google.pro" + + "tobuf.Empty\022\027DeleteOperationMetadata\022\236\002\n" + + "\023QueryDeployedModels\022;.google.cloud.aipl" + + "atform.v1beta1.QueryDeployedModelsReques" + + "t\032<.google.cloud.aiplatform.v1beta1.Quer" + + "yDeployedModelsResponse\"\213\001\202\323\344\223\002j\022h/v1bet" + + "a1/{deployment_resource_pool=projects/*/" + + "locations/*/deploymentResourcePools/*}:q" + + "ueryDeployedModels\332A\030deployment_resource" + + "_pool\032M\312A\031aiplatform.googleapis.com\322A.ht" + + "tps://www.googleapis.com/auth/cloud-plat" + + "formB\377\001\n#com.google.cloud.aiplatform.v1b" + + "eta1B\"DeploymentResourcePoolServiceProto" + + "P\001ZIgoogle.golang.org/genproto/googleapi" + + "s/cloud/aiplatform/v1beta1;aiplatform\252\002\037" + + "Google.Cloud.AIPlatform.V1Beta1\312\002\037Google" + + "\\Cloud\\AIPlatform\\V1beta1\352\002\"Google::Clou" + + "d::AIPlatform::V1beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.DeployedModelNameProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.EndpointProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.OperationProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolRequest_descriptor, + new java.lang.String[] { + "Parent", "DeploymentResourcePool", "DeploymentResourcePoolId", + }); + internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_CreateDeploymentResourcePoolOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1beta1_GetDeploymentResourcePoolRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_GetDeploymentResourcePoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_GetDeploymentResourcePoolRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsResponse_descriptor, + new java.lang.String[] { + "DeploymentResourcePools", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1beta1_UpdateDeploymentResourcePoolOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1beta1_UpdateDeploymentResourcePoolOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_UpdateDeploymentResourcePoolOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1beta1_DeleteDeploymentResourcePoolRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1beta1_DeleteDeploymentResourcePoolRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_DeleteDeploymentResourcePoolRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsRequest_descriptor, + new java.lang.String[] { + "DeploymentResourcePool", "PageSize", "PageToken", + }); + internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsResponse_descriptor, + new java.lang.String[] { + "DeployedModels", "NextPageToken", "DeployedModelRefs", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.DeployedModelNameProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.EndpointProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.OperationProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Endpoint.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Endpoint.java index 87baef8d4..68877eb86 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Endpoint.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Endpoint.java @@ -1048,7 +1048,7 @@ public com.google.protobuf.ByteString getNetworkBytes() { * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1beta1.Endpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=120 + * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=116 * @return The enablePrivateServiceConnect. */ @java.lang.Override @@ -3864,7 +3864,7 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1beta1.Endpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=120 + * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=116 * @return The enablePrivateServiceConnect. */ @java.lang.Override @@ -3885,7 +3885,7 @@ public boolean getEnablePrivateServiceConnect() { * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1beta1.Endpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=120 + * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=116 * @param value The enablePrivateServiceConnect to set. * @return This builder for chaining. */ @@ -3909,7 +3909,7 @@ public Builder setEnablePrivateServiceConnect(boolean value) { * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1beta1.Endpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=120 + * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=116 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java index f3d34883e..4077e9c00 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java @@ -536,7 +536,7 @@ java.lang.String getLabelsOrDefault( * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1beta1.Endpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=120 + * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=116 * @return The enablePrivateServiceConnect. */ @java.lang.Deprecated diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java index 8de0efd0c..d3124bae4 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java @@ -121,16 +121,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "g\022\017\n\007enabled\030\001 \001(\010\022\025\n\rsampling_rate\030\002 \001(" + "\001\022R\n\024bigquery_destination\030\003 \001(\01324.google" + ".cloud.aiplatform.v1beta1.BigQueryDestin" - + "ationB\374\002\n#com.google.cloud.aiplatform.v1" + + "ationB\352\001\n#com.google.cloud.aiplatform.v1" + "beta1B\rEndpointProtoP\001ZIgoogle.golang.or" + "g/genproto/googleapis/cloud/aiplatform/v" + "1beta1;aiplatform\252\002\037Google.Cloud.AIPlatf" + "orm.V1Beta1\312\002\037Google\\Cloud\\AIPlatform\\V1" + "beta1\352\002\"Google::Cloud::AIPlatform::V1bet" - + "a1\352A\216\001\n0aiplatform.googleapis.com/Deploy" - + "mentResourcePool\022Zprojects/{project}/loc" - + "ations/{location}/deploymentResourcePool" - + "s/{deployment_resource_pool}b\006proto3" + + "a1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -222,7 +219,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetDeploymentResourcePoolRequest.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetDeploymentResourcePoolRequest.java new file mode 100644 index 000000000..e7d51293e --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetDeploymentResourcePoolRequest.java @@ -0,0 +1,679 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for GetDeploymentResourcePool method.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest} + */ +public final class GetDeploymentResourcePoolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest) + GetDeploymentResourcePoolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDeploymentResourcePoolRequest.newBuilder() to construct. + private GetDeploymentResourcePoolRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDeploymentResourcePoolRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDeploymentResourcePoolRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetDeploymentResourcePoolRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetDeploymentResourcePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetDeploymentResourcePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest.class, + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the DeploymentResourcePool to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the DeploymentResourcePool to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest other = + (com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GetDeploymentResourcePool method.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest) + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetDeploymentResourcePoolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetDeploymentResourcePoolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest.class, + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetDeploymentResourcePoolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest build() { + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest result = + new com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the DeploymentResourcePool to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the DeploymentResourcePool to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the DeploymentResourcePool to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DeploymentResourcePool to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the DeploymentResourcePool to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest) + private static final com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDeploymentResourcePoolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDeploymentResourcePoolRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetDeploymentResourcePoolRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetDeploymentResourcePoolRequestOrBuilder.java new file mode 100644 index 000000000..fe23d37a7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetDeploymentResourcePoolRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface GetDeploymentResourcePoolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.GetDeploymentResourcePoolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the DeploymentResourcePool to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the DeploymentResourcePool to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsRequest.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsRequest.java new file mode 100644 index 000000000..5422a2f49 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsRequest.java @@ -0,0 +1,974 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for ListDeploymentResourcePools method.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest} + */ +public final class ListDeploymentResourcePoolsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest) + ListDeploymentResourcePoolsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDeploymentResourcePoolsRequest.newBuilder() to construct. + private ListDeploymentResourcePoolsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDeploymentResourcePoolsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDeploymentResourcePoolsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDeploymentResourcePoolsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest.class, + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent Location which owns this collection of DeploymentResourcePools.
+   * Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent Location which owns this collection of DeploymentResourcePools.
+   * Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of DeploymentResourcePools to return. The service may
+   * return fewer than this value.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListDeploymentResourcePools` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to
+   * `ListDeploymentResourcePools` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListDeploymentResourcePools` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to
+   * `ListDeploymentResourcePools` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest other = + (com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ListDeploymentResourcePools method.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest) + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest.class, + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest build() { + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest result = + new com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent Location which owns this collection of DeploymentResourcePools.
+     * Format: projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent Location which owns this collection of DeploymentResourcePools.
+     * Format: projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent Location which owns this collection of DeploymentResourcePools.
+     * Format: projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent Location which owns this collection of DeploymentResourcePools.
+     * Format: projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent Location which owns this collection of DeploymentResourcePools.
+     * Format: projects/{project}/locations/{location}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of DeploymentResourcePools to return. The service may
+     * return fewer than this value.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of DeploymentResourcePools to return. The service may
+     * return fewer than this value.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of DeploymentResourcePools to return. The service may
+     * return fewer than this value.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListDeploymentResourcePools` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to
+     * `ListDeploymentResourcePools` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListDeploymentResourcePools` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to
+     * `ListDeploymentResourcePools` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListDeploymentResourcePools` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to
+     * `ListDeploymentResourcePools` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListDeploymentResourcePools` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to
+     * `ListDeploymentResourcePools` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListDeploymentResourcePools` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to
+     * `ListDeploymentResourcePools` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest) + private static final com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDeploymentResourcePoolsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDeploymentResourcePoolsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsRequestOrBuilder.java new file mode 100644 index 000000000..d2e9bd6c5 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface ListDeploymentResourcePoolsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent Location which owns this collection of DeploymentResourcePools.
+   * Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent Location which owns this collection of DeploymentResourcePools.
+   * Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of DeploymentResourcePools to return. The service may
+   * return fewer than this value.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListDeploymentResourcePools` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to
+   * `ListDeploymentResourcePools` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListDeploymentResourcePools` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to
+   * `ListDeploymentResourcePools` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsResponse.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsResponse.java new file mode 100644 index 000000000..3b1cbc331 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsResponse.java @@ -0,0 +1,1235 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for ListDeploymentResourcePools method.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse} + */ +public final class ListDeploymentResourcePoolsResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse) + ListDeploymentResourcePoolsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDeploymentResourcePoolsResponse.newBuilder() to construct. + private ListDeploymentResourcePoolsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDeploymentResourcePoolsResponse() { + deploymentResourcePools_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDeploymentResourcePoolsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDeploymentResourcePoolsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deploymentResourcePools_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool>(); + mutable_bitField0_ |= 0x00000001; + } + deploymentResourcePools_.add( + input.readMessage( + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + deploymentResourcePools_ = java.util.Collections.unmodifiableList(deploymentResourcePools_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse.class, + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse.Builder.class); + } + + public static final int DEPLOYMENT_RESOURCE_POOLS_FIELD_NUMBER = 1; + private java.util.List + deploymentResourcePools_; + /** + * + * + *
+   * The DeploymentResourcePools from the specified location.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + @java.lang.Override + public java.util.List + getDeploymentResourcePoolsList() { + return deploymentResourcePools_; + } + /** + * + * + *
+   * The DeploymentResourcePools from the specified location.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder> + getDeploymentResourcePoolsOrBuilderList() { + return deploymentResourcePools_; + } + /** + * + * + *
+   * The DeploymentResourcePools from the specified location.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + @java.lang.Override + public int getDeploymentResourcePoolsCount() { + return deploymentResourcePools_.size(); + } + /** + * + * + *
+   * The DeploymentResourcePools from the specified location.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool getDeploymentResourcePools( + int index) { + return deploymentResourcePools_.get(index); + } + /** + * + * + *
+   * The DeploymentResourcePools from the specified location.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder + getDeploymentResourcePoolsOrBuilder(int index) { + return deploymentResourcePools_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < deploymentResourcePools_.size(); i++) { + output.writeMessage(1, deploymentResourcePools_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < deploymentResourcePools_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, deploymentResourcePools_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse other = + (com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse) obj; + + if (!getDeploymentResourcePoolsList().equals(other.getDeploymentResourcePoolsList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeploymentResourcePoolsCount() > 0) { + hash = (37 * hash) + DEPLOYMENT_RESOURCE_POOLS_FIELD_NUMBER; + hash = (53 * hash) + getDeploymentResourcePoolsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for ListDeploymentResourcePools method.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse) + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse.class, + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeploymentResourcePoolsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (deploymentResourcePoolsBuilder_ == null) { + deploymentResourcePools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deploymentResourcePoolsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListDeploymentResourcePoolsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse build() { + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse result = + new com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse(this); + int from_bitField0_ = bitField0_; + if (deploymentResourcePoolsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deploymentResourcePools_ = + java.util.Collections.unmodifiableList(deploymentResourcePools_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deploymentResourcePools_ = deploymentResourcePools_; + } else { + result.deploymentResourcePools_ = deploymentResourcePoolsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse other) { + if (other + == com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse + .getDefaultInstance()) return this; + if (deploymentResourcePoolsBuilder_ == null) { + if (!other.deploymentResourcePools_.isEmpty()) { + if (deploymentResourcePools_.isEmpty()) { + deploymentResourcePools_ = other.deploymentResourcePools_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeploymentResourcePoolsIsMutable(); + deploymentResourcePools_.addAll(other.deploymentResourcePools_); + } + onChanged(); + } + } else { + if (!other.deploymentResourcePools_.isEmpty()) { + if (deploymentResourcePoolsBuilder_.isEmpty()) { + deploymentResourcePoolsBuilder_.dispose(); + deploymentResourcePoolsBuilder_ = null; + deploymentResourcePools_ = other.deploymentResourcePools_; + bitField0_ = (bitField0_ & ~0x00000001); + deploymentResourcePoolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDeploymentResourcePoolsFieldBuilder() + : null; + } else { + deploymentResourcePoolsBuilder_.addAllMessages(other.deploymentResourcePools_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + deploymentResourcePools_ = java.util.Collections.emptyList(); + + private void ensureDeploymentResourcePoolsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deploymentResourcePools_ = + new java.util.ArrayList( + deploymentResourcePools_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder> + deploymentResourcePoolsBuilder_; + + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public java.util.List + getDeploymentResourcePoolsList() { + if (deploymentResourcePoolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deploymentResourcePools_); + } else { + return deploymentResourcePoolsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public int getDeploymentResourcePoolsCount() { + if (deploymentResourcePoolsBuilder_ == null) { + return deploymentResourcePools_.size(); + } else { + return deploymentResourcePoolsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool getDeploymentResourcePools( + int index) { + if (deploymentResourcePoolsBuilder_ == null) { + return deploymentResourcePools_.get(index); + } else { + return deploymentResourcePoolsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public Builder setDeploymentResourcePools( + int index, com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool value) { + if (deploymentResourcePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeploymentResourcePoolsIsMutable(); + deploymentResourcePools_.set(index, value); + onChanged(); + } else { + deploymentResourcePoolsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public Builder setDeploymentResourcePools( + int index, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder builderForValue) { + if (deploymentResourcePoolsBuilder_ == null) { + ensureDeploymentResourcePoolsIsMutable(); + deploymentResourcePools_.set(index, builderForValue.build()); + onChanged(); + } else { + deploymentResourcePoolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public Builder addDeploymentResourcePools( + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool value) { + if (deploymentResourcePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeploymentResourcePoolsIsMutable(); + deploymentResourcePools_.add(value); + onChanged(); + } else { + deploymentResourcePoolsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public Builder addDeploymentResourcePools( + int index, com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool value) { + if (deploymentResourcePoolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeploymentResourcePoolsIsMutable(); + deploymentResourcePools_.add(index, value); + onChanged(); + } else { + deploymentResourcePoolsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public Builder addDeploymentResourcePools( + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder builderForValue) { + if (deploymentResourcePoolsBuilder_ == null) { + ensureDeploymentResourcePoolsIsMutable(); + deploymentResourcePools_.add(builderForValue.build()); + onChanged(); + } else { + deploymentResourcePoolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public Builder addDeploymentResourcePools( + int index, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder builderForValue) { + if (deploymentResourcePoolsBuilder_ == null) { + ensureDeploymentResourcePoolsIsMutable(); + deploymentResourcePools_.add(index, builderForValue.build()); + onChanged(); + } else { + deploymentResourcePoolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public Builder addAllDeploymentResourcePools( + java.lang.Iterable + values) { + if (deploymentResourcePoolsBuilder_ == null) { + ensureDeploymentResourcePoolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deploymentResourcePools_); + onChanged(); + } else { + deploymentResourcePoolsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public Builder clearDeploymentResourcePools() { + if (deploymentResourcePoolsBuilder_ == null) { + deploymentResourcePools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deploymentResourcePoolsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public Builder removeDeploymentResourcePools(int index) { + if (deploymentResourcePoolsBuilder_ == null) { + ensureDeploymentResourcePoolsIsMutable(); + deploymentResourcePools_.remove(index); + onChanged(); + } else { + deploymentResourcePoolsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder + getDeploymentResourcePoolsBuilder(int index) { + return getDeploymentResourcePoolsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder + getDeploymentResourcePoolsOrBuilder(int index) { + if (deploymentResourcePoolsBuilder_ == null) { + return deploymentResourcePools_.get(index); + } else { + return deploymentResourcePoolsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder> + getDeploymentResourcePoolsOrBuilderList() { + if (deploymentResourcePoolsBuilder_ != null) { + return deploymentResourcePoolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deploymentResourcePools_); + } + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder + addDeploymentResourcePoolsBuilder() { + return getDeploymentResourcePoolsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.getDefaultInstance()); + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder + addDeploymentResourcePoolsBuilder(int index) { + return getDeploymentResourcePoolsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.getDefaultInstance()); + } + /** + * + * + *
+     * The DeploymentResourcePools from the specified location.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + public java.util.List + getDeploymentResourcePoolsBuilderList() { + return getDeploymentResourcePoolsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder> + getDeploymentResourcePoolsFieldBuilder() { + if (deploymentResourcePoolsBuilder_ == null) { + deploymentResourcePoolsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool.Builder, + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder>( + deploymentResourcePools_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + deploymentResourcePools_ = null; + } + return deploymentResourcePoolsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse) + private static final com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDeploymentResourcePoolsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDeploymentResourcePoolsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsResponseOrBuilder.java new file mode 100644 index 000000000..d2596ffbb --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListDeploymentResourcePoolsResponseOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface ListDeploymentResourcePoolsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListDeploymentResourcePoolsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The DeploymentResourcePools from the specified location.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + java.util.List + getDeploymentResourcePoolsList(); + /** + * + * + *
+   * The DeploymentResourcePools from the specified location.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePool getDeploymentResourcePools(int index); + /** + * + * + *
+   * The DeploymentResourcePools from the specified location.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + int getDeploymentResourcePoolsCount(); + /** + * + * + *
+   * The DeploymentResourcePools from the specified location.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + java.util.List + getDeploymentResourcePoolsOrBuilderList(); + /** + * + * + *
+   * The DeploymentResourcePools from the specified location.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeploymentResourcePool deployment_resource_pools = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolOrBuilder + getDeploymentResourcePoolsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Model.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Model.java index faf74ffcd..b86d0caab 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Model.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Model.java @@ -493,6 +493,17 @@ public enum DeploymentResourcesType implements com.google.protobuf.ProtocolMessa * AUTOMATIC_RESOURCES = 2; */ AUTOMATIC_RESOURCES(2), + /** + * + * + *
+     * Resources that can be shared by multiple [DeployedModels][google.cloud.aiplatform.v1beta1.DeployedModel].
+     * A pre-configured [DeploymentResourcePool][google.cloud.aiplatform.v1beta1.DeploymentResourcePool] is required.
+     * 
+ * + * SHARED_RESOURCES = 3; + */ + SHARED_RESOURCES(3), UNRECOGNIZED(-1), ; @@ -528,6 +539,17 @@ public enum DeploymentResourcesType implements com.google.protobuf.ProtocolMessa * AUTOMATIC_RESOURCES = 2; */ public static final int AUTOMATIC_RESOURCES_VALUE = 2; + /** + * + * + *
+     * Resources that can be shared by multiple [DeployedModels][google.cloud.aiplatform.v1beta1.DeployedModel].
+     * A pre-configured [DeploymentResourcePool][google.cloud.aiplatform.v1beta1.DeploymentResourcePool] is required.
+     * 
+ * + * SHARED_RESOURCES = 3; + */ + public static final int SHARED_RESOURCES_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -559,6 +581,8 @@ public static DeploymentResourcesType forNumber(int value) { return DEDICATED_RESOURCES; case 2: return AUTOMATIC_RESOURCES; + case 3: + return SHARED_RESOURCES; default: return null; } @@ -1988,8 +2012,8 @@ public int getExportableContentsValue(int index) { * repeated .google.cloud.aiplatform.v1beta1.Model.ExportFormat.ExportableContent exportable_contents = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of exportableContents at the given index. + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for exportableContents to set. * @return This builder for chaining. */ public Builder setExportableContentsValue(int index, int value) { @@ -7976,9 +8000,8 @@ public int getSupportedDeploymentResourcesTypesValue(int index) { * repeated .google.cloud.aiplatform.v1beta1.Model.DeploymentResourcesType supported_deployment_resources_types = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of supportedDeploymentResourcesTypes at the given - * index. + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for supportedDeploymentResourcesTypes to set. * @return This builder for chaining. */ public Builder setSupportedDeploymentResourcesTypesValue(int index, int value) { diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelProto.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelProto.java index 0949cc438..6489449ac 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelProto.java +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelProto.java @@ -70,7 +70,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "eta1/env_var.proto\0321google/cloud/aiplatf" + "orm/v1beta1/explanation.proto\032\034google/pr" + "otobuf/struct.proto\032\037google/protobuf/tim" - + "estamp.proto\"\237\016\n\005Model\022\014\n\004name\030\001 \001(\t\022\032\n\n" + + "estamp.proto\"\266\016\n\005Model\022\014\n\004name\030\001 \001(\t\022\032\n\n" + "version_id\030\034 \001(\tB\006\340A\005\340A\003\022\027\n\017version_alia" + "ses\030\035 \003(\t\022<\n\023version_create_time\030\037 \001(\0132\032" + ".google.protobuf.TimestampB\003\340A\003\022<\n\023versi" @@ -110,29 +110,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "bleContentB\003\340A\003\"P\n\021ExportableContent\022\"\n\036" + "EXPORTABLE_CONTENT_UNSPECIFIED\020\000\022\014\n\010ARTI" + "FACT\020\001\022\t\n\005IMAGE\020\002\032-\n\013LabelsEntry\022\013\n\003key\030" - + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"v\n\027DeploymentRe" - + "sourcesType\022)\n%DEPLOYMENT_RESOURCES_TYPE" - + "_UNSPECIFIED\020\000\022\027\n\023DEDICATED_RESOURCES\020\001\022" - + "\027\n\023AUTOMATIC_RESOURCES\020\002:\\\352AY\n\037aiplatfor" - + "m.googleapis.com/Model\0226projects/{projec" - + "t}/locations/{location}/models/{model}\"{" - + "\n\017PredictSchemata\022 \n\023instance_schema_uri" - + "\030\001 \001(\tB\003\340A\005\022\"\n\025parameters_schema_uri\030\002 \001" - + "(\tB\003\340A\005\022\"\n\025prediction_schema_uri\030\003 \001(\tB\003" - + "\340A\005\"\205\002\n\022ModelContainerSpec\022\031\n\timage_uri\030" - + "\001 \001(\tB\006\340A\002\340A\005\022\024\n\007command\030\002 \003(\tB\003\340A\005\022\021\n\004a" - + "rgs\030\003 \003(\tB\003\340A\005\0229\n\003env\030\004 \003(\0132\'.google.clo" - + "ud.aiplatform.v1beta1.EnvVarB\003\340A\005\0229\n\005por" - + "ts\030\005 \003(\0132%.google.cloud.aiplatform.v1bet" - + "a1.PortB\003\340A\005\022\032\n\rpredict_route\030\006 \001(\tB\003\340A\005" - + "\022\031\n\014health_route\030\007 \001(\tB\003\340A\005\"\036\n\004Port\022\026\n\016c" - + "ontainer_port\030\003 \001(\005B\347\001\n#com.google.cloud" - + ".aiplatform.v1beta1B\nModelProtoP\001ZIgoogl" - + "e.golang.org/genproto/googleapis/cloud/a" - + "iplatform/v1beta1;aiplatform\252\002\037Google.Cl" - + "oud.AIPlatform.V1Beta1\312\002\037Google\\Cloud\\AI" - + "Platform\\V1beta1\352\002\"Google::Cloud::AIPlat" - + "form::V1beta1b\006proto3" + + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\214\001\n\027DeploymentR" + + "esourcesType\022)\n%DEPLOYMENT_RESOURCES_TYP" + + "E_UNSPECIFIED\020\000\022\027\n\023DEDICATED_RESOURCES\020\001" + + "\022\027\n\023AUTOMATIC_RESOURCES\020\002\022\024\n\020SHARED_RESO" + + "URCES\020\003:\\\352AY\n\037aiplatform.googleapis.com/" + + "Model\0226projects/{project}/locations/{loc" + + "ation}/models/{model}\"{\n\017PredictSchemata" + + "\022 \n\023instance_schema_uri\030\001 \001(\tB\003\340A\005\022\"\n\025pa" + + "rameters_schema_uri\030\002 \001(\tB\003\340A\005\022\"\n\025predic" + + "tion_schema_uri\030\003 \001(\tB\003\340A\005\"\205\002\n\022ModelCont" + + "ainerSpec\022\031\n\timage_uri\030\001 \001(\tB\006\340A\002\340A\005\022\024\n\007" + + "command\030\002 \003(\tB\003\340A\005\022\021\n\004args\030\003 \003(\tB\003\340A\005\0229\n" + + "\003env\030\004 \003(\0132\'.google.cloud.aiplatform.v1b" + + "eta1.EnvVarB\003\340A\005\0229\n\005ports\030\005 \003(\0132%.google" + + ".cloud.aiplatform.v1beta1.PortB\003\340A\005\022\032\n\rp" + + "redict_route\030\006 \001(\tB\003\340A\005\022\031\n\014health_route\030" + + "\007 \001(\tB\003\340A\005\"\036\n\004Port\022\026\n\016container_port\030\003 \001" + + "(\005B\347\001\n#com.google.cloud.aiplatform.v1bet" + + "a1B\nModelProtoP\001ZIgoogle.golang.org/genp" + + "roto/googleapis/cloud/aiplatform/v1beta1" + + ";aiplatform\252\002\037Google.Cloud.AIPlatform.V1" + + "Beta1\312\002\037Google\\Cloud\\AIPlatform\\V1beta1\352" + + "\002\"Google::Cloud::AIPlatform::V1beta1b\006pr" + + "oto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ProjectName.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ProjectName.java new file mode 100644 index 000000000..7aace6b86 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ProjectName.java @@ -0,0 +1,168 @@ +/* + * 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.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProjectName implements ResourceName { + private static final PathTemplate PROJECT = + PathTemplate.createWithoutUrlEncoding("projects/{project}"); + private volatile Map fieldValuesMap; + private final String project; + + @Deprecated + protected ProjectName() { + project = null; + } + + private ProjectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProjectName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static ProjectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT.validatedMatch( + formattedString, "ProjectName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProjectName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT.instantiate("project", project); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProjectName that = ((ProjectName) o); + return Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for projects/{project}. */ + public static class Builder { + private String project; + + protected Builder() {} + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder(ProjectName projectName) { + this.project = projectName.project; + } + + public ProjectName build() { + return new ProjectName(this); + } + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsRequest.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsRequest.java new file mode 100644 index 000000000..aa456edb0 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsRequest.java @@ -0,0 +1,960 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for QueryDeployedModels method.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest} + */ +public final class QueryDeployedModelsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest) + QueryDeployedModelsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueryDeployedModelsRequest.newBuilder() to construct. + private QueryDeployedModelsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueryDeployedModelsRequest() { + deploymentResourcePool_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryDeployedModelsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private QueryDeployedModelsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + deploymentResourcePool_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest.class, + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest.Builder.class); + } + + public static final int DEPLOYMENT_RESOURCE_POOL_FIELD_NUMBER = 1; + private volatile java.lang.Object deploymentResourcePool_; + /** + * + * + *
+   * Required. The name of the target DeploymentResourcePool to query.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * string deployment_resource_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deploymentResourcePool. + */ + @java.lang.Override + public java.lang.String getDeploymentResourcePool() { + java.lang.Object ref = deploymentResourcePool_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deploymentResourcePool_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the target DeploymentResourcePool to query.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * string deployment_resource_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deploymentResourcePool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeploymentResourcePoolBytes() { + java.lang.Object ref = deploymentResourcePool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deploymentResourcePool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of DeployedModels to return. The service may return
+   * fewer than this value.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `QueryDeployedModels` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to
+   * `QueryDeployedModels` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `QueryDeployedModels` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to
+   * `QueryDeployedModels` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deploymentResourcePool_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deploymentResourcePool_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deploymentResourcePool_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, deploymentResourcePool_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest other = + (com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest) obj; + + if (!getDeploymentResourcePool().equals(other.getDeploymentResourcePool())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DEPLOYMENT_RESOURCE_POOL_FIELD_NUMBER; + hash = (53 * hash) + getDeploymentResourcePool().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for QueryDeployedModels method.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest) + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest.class, + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + deploymentResourcePool_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest build() { + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest result = + new com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest(this); + result.deploymentResourcePool_ = deploymentResourcePool_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest.getDefaultInstance()) + return this; + if (!other.getDeploymentResourcePool().isEmpty()) { + deploymentResourcePool_ = other.deploymentResourcePool_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object deploymentResourcePool_ = ""; + /** + * + * + *
+     * Required. The name of the target DeploymentResourcePool to query.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * string deployment_resource_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deploymentResourcePool. + */ + public java.lang.String getDeploymentResourcePool() { + java.lang.Object ref = deploymentResourcePool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deploymentResourcePool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the target DeploymentResourcePool to query.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * string deployment_resource_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deploymentResourcePool. + */ + public com.google.protobuf.ByteString getDeploymentResourcePoolBytes() { + java.lang.Object ref = deploymentResourcePool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deploymentResourcePool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the target DeploymentResourcePool to query.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * string deployment_resource_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The deploymentResourcePool to set. + * @return This builder for chaining. + */ + public Builder setDeploymentResourcePool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deploymentResourcePool_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the target DeploymentResourcePool to query.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * string deployment_resource_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDeploymentResourcePool() { + + deploymentResourcePool_ = getDefaultInstance().getDeploymentResourcePool(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the target DeploymentResourcePool to query.
+     * Format:
+     * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+     * 
+ * + * string deployment_resource_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for deploymentResourcePool to set. + * @return This builder for chaining. + */ + public Builder setDeploymentResourcePoolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deploymentResourcePool_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of DeployedModels to return. The service may return
+     * fewer than this value.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of DeployedModels to return. The service may return
+     * fewer than this value.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of DeployedModels to return. The service may return
+     * fewer than this value.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `QueryDeployedModels` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to
+     * `QueryDeployedModels` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `QueryDeployedModels` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to
+     * `QueryDeployedModels` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `QueryDeployedModels` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to
+     * `QueryDeployedModels` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `QueryDeployedModels` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to
+     * `QueryDeployedModels` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `QueryDeployedModels` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to
+     * `QueryDeployedModels` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest) + private static final com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryDeployedModelsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueryDeployedModelsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsRequestOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsRequestOrBuilder.java new file mode 100644 index 000000000..a33870557 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface QueryDeployedModelsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.QueryDeployedModelsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the target DeploymentResourcePool to query.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * string deployment_resource_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The deploymentResourcePool. + */ + java.lang.String getDeploymentResourcePool(); + /** + * + * + *
+   * Required. The name of the target DeploymentResourcePool to query.
+   * Format:
+   * projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}
+   * 
+ * + * string deployment_resource_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for deploymentResourcePool. + */ + com.google.protobuf.ByteString getDeploymentResourcePoolBytes(); + + /** + * + * + *
+   * The maximum number of DeployedModels to return. The service may return
+   * fewer than this value.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `QueryDeployedModels` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to
+   * `QueryDeployedModels` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `QueryDeployedModels` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to
+   * `QueryDeployedModels` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsResponse.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsResponse.java new file mode 100644 index 000000000..68eb2bad7 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsResponse.java @@ -0,0 +1,1783 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for QueryDeployedModels method.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse} + */ +public final class QueryDeployedModelsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse) + QueryDeployedModelsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueryDeployedModelsResponse.newBuilder() to construct. + private QueryDeployedModelsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueryDeployedModelsResponse() { + deployedModels_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + deployedModelRefs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryDeployedModelsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private QueryDeployedModelsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deployedModels_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + deployedModels_.add( + input.readMessage( + com.google.cloud.aiplatform.v1beta1.DeployedModel.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + deployedModelRefs_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + deployedModelRefs_.add( + input.readMessage( + com.google.cloud.aiplatform.v1beta1.DeployedModelRef.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + deployedModels_ = java.util.Collections.unmodifiableList(deployedModels_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + deployedModelRefs_ = java.util.Collections.unmodifiableList(deployedModelRefs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse.class, + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse.Builder.class); + } + + public static final int DEPLOYED_MODELS_FIELD_NUMBER = 1; + private java.util.List deployedModels_; + /** + * + * + *
+   * DEPRECATED Use deployed_model_refs instead.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List getDeployedModelsList() { + return deployedModels_; + } + /** + * + * + *
+   * DEPRECATED Use deployed_model_refs instead.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List + getDeployedModelsOrBuilderList() { + return deployedModels_; + } + /** + * + * + *
+   * DEPRECATED Use deployed_model_refs instead.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public int getDeployedModelsCount() { + return deployedModels_.size(); + } + /** + * + * + *
+   * DEPRECATED Use deployed_model_refs instead.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.aiplatform.v1beta1.DeployedModel getDeployedModels(int index) { + return deployedModels_.get(index); + } + /** + * + * + *
+   * DEPRECATED Use deployed_model_refs instead.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.aiplatform.v1beta1.DeployedModelOrBuilder getDeployedModelsOrBuilder( + int index) { + return deployedModels_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOYED_MODEL_REFS_FIELD_NUMBER = 3; + private java.util.List deployedModelRefs_; + /** + * + * + *
+   * References to the DeployedModels that share the specified
+   * deploymentResourcePool.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + @java.lang.Override + public java.util.List + getDeployedModelRefsList() { + return deployedModelRefs_; + } + /** + * + * + *
+   * References to the DeployedModels that share the specified
+   * deploymentResourcePool.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + @java.lang.Override + public java.util.List + getDeployedModelRefsOrBuilderList() { + return deployedModelRefs_; + } + /** + * + * + *
+   * References to the DeployedModels that share the specified
+   * deploymentResourcePool.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + @java.lang.Override + public int getDeployedModelRefsCount() { + return deployedModelRefs_.size(); + } + /** + * + * + *
+   * References to the DeployedModels that share the specified
+   * deploymentResourcePool.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeployedModelRef getDeployedModelRefs(int index) { + return deployedModelRefs_.get(index); + } + /** + * + * + *
+   * References to the DeployedModels that share the specified
+   * deploymentResourcePool.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeployedModelRefOrBuilder + getDeployedModelRefsOrBuilder(int index) { + return deployedModelRefs_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < deployedModels_.size(); i++) { + output.writeMessage(1, deployedModels_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < deployedModelRefs_.size(); i++) { + output.writeMessage(3, deployedModelRefs_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < deployedModels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, deployedModels_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + for (int i = 0; i < deployedModelRefs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, deployedModelRefs_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse other = + (com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse) obj; + + if (!getDeployedModelsList().equals(other.getDeployedModelsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getDeployedModelRefsList().equals(other.getDeployedModelRefsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeployedModelsCount() > 0) { + hash = (37 * hash) + DEPLOYED_MODELS_FIELD_NUMBER; + hash = (53 * hash) + getDeployedModelsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getDeployedModelRefsCount() > 0) { + hash = (37 * hash) + DEPLOYED_MODEL_REFS_FIELD_NUMBER; + hash = (53 * hash) + getDeployedModelRefsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for QueryDeployedModels method.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse) + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse.class, + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeployedModelsFieldBuilder(); + getDeployedModelRefsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (deployedModelsBuilder_ == null) { + deployedModels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deployedModelsBuilder_.clear(); + } + nextPageToken_ = ""; + + if (deployedModelRefsBuilder_ == null) { + deployedModelRefs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + deployedModelRefsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_QueryDeployedModelsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse build() { + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse result = + new com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse(this); + int from_bitField0_ = bitField0_; + if (deployedModelsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + deployedModels_ = java.util.Collections.unmodifiableList(deployedModels_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deployedModels_ = deployedModels_; + } else { + result.deployedModels_ = deployedModelsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (deployedModelRefsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + deployedModelRefs_ = java.util.Collections.unmodifiableList(deployedModelRefs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.deployedModelRefs_ = deployedModelRefs_; + } else { + result.deployedModelRefs_ = deployedModelRefsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse other) { + if (other + == com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse.getDefaultInstance()) + return this; + if (deployedModelsBuilder_ == null) { + if (!other.deployedModels_.isEmpty()) { + if (deployedModels_.isEmpty()) { + deployedModels_ = other.deployedModels_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeployedModelsIsMutable(); + deployedModels_.addAll(other.deployedModels_); + } + onChanged(); + } + } else { + if (!other.deployedModels_.isEmpty()) { + if (deployedModelsBuilder_.isEmpty()) { + deployedModelsBuilder_.dispose(); + deployedModelsBuilder_ = null; + deployedModels_ = other.deployedModels_; + bitField0_ = (bitField0_ & ~0x00000001); + deployedModelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDeployedModelsFieldBuilder() + : null; + } else { + deployedModelsBuilder_.addAllMessages(other.deployedModels_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (deployedModelRefsBuilder_ == null) { + if (!other.deployedModelRefs_.isEmpty()) { + if (deployedModelRefs_.isEmpty()) { + deployedModelRefs_ = other.deployedModelRefs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDeployedModelRefsIsMutable(); + deployedModelRefs_.addAll(other.deployedModelRefs_); + } + onChanged(); + } + } else { + if (!other.deployedModelRefs_.isEmpty()) { + if (deployedModelRefsBuilder_.isEmpty()) { + deployedModelRefsBuilder_.dispose(); + deployedModelRefsBuilder_ = null; + deployedModelRefs_ = other.deployedModelRefs_; + bitField0_ = (bitField0_ & ~0x00000002); + deployedModelRefsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDeployedModelRefsFieldBuilder() + : null; + } else { + deployedModelRefsBuilder_.addAllMessages(other.deployedModelRefs_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List deployedModels_ = + java.util.Collections.emptyList(); + + private void ensureDeployedModelsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deployedModels_ = + new java.util.ArrayList( + deployedModels_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DeployedModel, + com.google.cloud.aiplatform.v1beta1.DeployedModel.Builder, + com.google.cloud.aiplatform.v1beta1.DeployedModelOrBuilder> + deployedModelsBuilder_; + + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public java.util.List + getDeployedModelsList() { + if (deployedModelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deployedModels_); + } else { + return deployedModelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public int getDeployedModelsCount() { + if (deployedModelsBuilder_ == null) { + return deployedModels_.size(); + } else { + return deployedModelsBuilder_.getCount(); + } + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.aiplatform.v1beta1.DeployedModel getDeployedModels(int index) { + if (deployedModelsBuilder_ == null) { + return deployedModels_.get(index); + } else { + return deployedModelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setDeployedModels( + int index, com.google.cloud.aiplatform.v1beta1.DeployedModel value) { + if (deployedModelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedModelsIsMutable(); + deployedModels_.set(index, value); + onChanged(); + } else { + deployedModelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setDeployedModels( + int index, com.google.cloud.aiplatform.v1beta1.DeployedModel.Builder builderForValue) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + deployedModels_.set(index, builderForValue.build()); + onChanged(); + } else { + deployedModelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addDeployedModels(com.google.cloud.aiplatform.v1beta1.DeployedModel value) { + if (deployedModelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedModelsIsMutable(); + deployedModels_.add(value); + onChanged(); + } else { + deployedModelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addDeployedModels( + int index, com.google.cloud.aiplatform.v1beta1.DeployedModel value) { + if (deployedModelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedModelsIsMutable(); + deployedModels_.add(index, value); + onChanged(); + } else { + deployedModelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addDeployedModels( + com.google.cloud.aiplatform.v1beta1.DeployedModel.Builder builderForValue) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + deployedModels_.add(builderForValue.build()); + onChanged(); + } else { + deployedModelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addDeployedModels( + int index, com.google.cloud.aiplatform.v1beta1.DeployedModel.Builder builderForValue) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + deployedModels_.add(index, builderForValue.build()); + onChanged(); + } else { + deployedModelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder addAllDeployedModels( + java.lang.Iterable values) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deployedModels_); + onChanged(); + } else { + deployedModelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder clearDeployedModels() { + if (deployedModelsBuilder_ == null) { + deployedModels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deployedModelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder removeDeployedModels(int index) { + if (deployedModelsBuilder_ == null) { + ensureDeployedModelsIsMutable(); + deployedModels_.remove(index); + onChanged(); + } else { + deployedModelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.aiplatform.v1beta1.DeployedModel.Builder getDeployedModelsBuilder( + int index) { + return getDeployedModelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.aiplatform.v1beta1.DeployedModelOrBuilder getDeployedModelsOrBuilder( + int index) { + if (deployedModelsBuilder_ == null) { + return deployedModels_.get(index); + } else { + return deployedModelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public java.util.List + getDeployedModelsOrBuilderList() { + if (deployedModelsBuilder_ != null) { + return deployedModelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deployedModels_); + } + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.aiplatform.v1beta1.DeployedModel.Builder addDeployedModelsBuilder() { + return getDeployedModelsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.DeployedModel.getDefaultInstance()); + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.aiplatform.v1beta1.DeployedModel.Builder addDeployedModelsBuilder( + int index) { + return getDeployedModelsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1beta1.DeployedModel.getDefaultInstance()); + } + /** + * + * + *
+     * DEPRECATED Use deployed_model_refs instead.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + public java.util.List + getDeployedModelsBuilderList() { + return getDeployedModelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DeployedModel, + com.google.cloud.aiplatform.v1beta1.DeployedModel.Builder, + com.google.cloud.aiplatform.v1beta1.DeployedModelOrBuilder> + getDeployedModelsFieldBuilder() { + if (deployedModelsBuilder_ == null) { + deployedModelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DeployedModel, + com.google.cloud.aiplatform.v1beta1.DeployedModel.Builder, + com.google.cloud.aiplatform.v1beta1.DeployedModelOrBuilder>( + deployedModels_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + deployedModels_ = null; + } + return deployedModelsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private java.util.List + deployedModelRefs_ = java.util.Collections.emptyList(); + + private void ensureDeployedModelRefsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + deployedModelRefs_ = + new java.util.ArrayList( + deployedModelRefs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DeployedModelRef, + com.google.cloud.aiplatform.v1beta1.DeployedModelRef.Builder, + com.google.cloud.aiplatform.v1beta1.DeployedModelRefOrBuilder> + deployedModelRefsBuilder_; + + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public java.util.List + getDeployedModelRefsList() { + if (deployedModelRefsBuilder_ == null) { + return java.util.Collections.unmodifiableList(deployedModelRefs_); + } else { + return deployedModelRefsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public int getDeployedModelRefsCount() { + if (deployedModelRefsBuilder_ == null) { + return deployedModelRefs_.size(); + } else { + return deployedModelRefsBuilder_.getCount(); + } + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.DeployedModelRef getDeployedModelRefs(int index) { + if (deployedModelRefsBuilder_ == null) { + return deployedModelRefs_.get(index); + } else { + return deployedModelRefsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public Builder setDeployedModelRefs( + int index, com.google.cloud.aiplatform.v1beta1.DeployedModelRef value) { + if (deployedModelRefsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedModelRefsIsMutable(); + deployedModelRefs_.set(index, value); + onChanged(); + } else { + deployedModelRefsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public Builder setDeployedModelRefs( + int index, com.google.cloud.aiplatform.v1beta1.DeployedModelRef.Builder builderForValue) { + if (deployedModelRefsBuilder_ == null) { + ensureDeployedModelRefsIsMutable(); + deployedModelRefs_.set(index, builderForValue.build()); + onChanged(); + } else { + deployedModelRefsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public Builder addDeployedModelRefs( + com.google.cloud.aiplatform.v1beta1.DeployedModelRef value) { + if (deployedModelRefsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedModelRefsIsMutable(); + deployedModelRefs_.add(value); + onChanged(); + } else { + deployedModelRefsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public Builder addDeployedModelRefs( + int index, com.google.cloud.aiplatform.v1beta1.DeployedModelRef value) { + if (deployedModelRefsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeployedModelRefsIsMutable(); + deployedModelRefs_.add(index, value); + onChanged(); + } else { + deployedModelRefsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public Builder addDeployedModelRefs( + com.google.cloud.aiplatform.v1beta1.DeployedModelRef.Builder builderForValue) { + if (deployedModelRefsBuilder_ == null) { + ensureDeployedModelRefsIsMutable(); + deployedModelRefs_.add(builderForValue.build()); + onChanged(); + } else { + deployedModelRefsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public Builder addDeployedModelRefs( + int index, com.google.cloud.aiplatform.v1beta1.DeployedModelRef.Builder builderForValue) { + if (deployedModelRefsBuilder_ == null) { + ensureDeployedModelRefsIsMutable(); + deployedModelRefs_.add(index, builderForValue.build()); + onChanged(); + } else { + deployedModelRefsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public Builder addAllDeployedModelRefs( + java.lang.Iterable values) { + if (deployedModelRefsBuilder_ == null) { + ensureDeployedModelRefsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deployedModelRefs_); + onChanged(); + } else { + deployedModelRefsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public Builder clearDeployedModelRefs() { + if (deployedModelRefsBuilder_ == null) { + deployedModelRefs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + deployedModelRefsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public Builder removeDeployedModelRefs(int index) { + if (deployedModelRefsBuilder_ == null) { + ensureDeployedModelRefsIsMutable(); + deployedModelRefs_.remove(index); + onChanged(); + } else { + deployedModelRefsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.DeployedModelRef.Builder getDeployedModelRefsBuilder( + int index) { + return getDeployedModelRefsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.DeployedModelRefOrBuilder + getDeployedModelRefsOrBuilder(int index) { + if (deployedModelRefsBuilder_ == null) { + return deployedModelRefs_.get(index); + } else { + return deployedModelRefsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public java.util.List + getDeployedModelRefsOrBuilderList() { + if (deployedModelRefsBuilder_ != null) { + return deployedModelRefsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deployedModelRefs_); + } + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.DeployedModelRef.Builder + addDeployedModelRefsBuilder() { + return getDeployedModelRefsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.DeployedModelRef.getDefaultInstance()); + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.DeployedModelRef.Builder addDeployedModelRefsBuilder( + int index) { + return getDeployedModelRefsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1beta1.DeployedModelRef.getDefaultInstance()); + } + /** + * + * + *
+     * References to the DeployedModels that share the specified
+     * deploymentResourcePool.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + public java.util.List + getDeployedModelRefsBuilderList() { + return getDeployedModelRefsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DeployedModelRef, + com.google.cloud.aiplatform.v1beta1.DeployedModelRef.Builder, + com.google.cloud.aiplatform.v1beta1.DeployedModelRefOrBuilder> + getDeployedModelRefsFieldBuilder() { + if (deployedModelRefsBuilder_ == null) { + deployedModelRefsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.DeployedModelRef, + com.google.cloud.aiplatform.v1beta1.DeployedModelRef.Builder, + com.google.cloud.aiplatform.v1beta1.DeployedModelRefOrBuilder>( + deployedModelRefs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + deployedModelRefs_ = null; + } + return deployedModelRefsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse) + private static final com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryDeployedModelsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueryDeployedModelsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsResponseOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsResponseOrBuilder.java new file mode 100644 index 000000000..032816995 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/QueryDeployedModelsResponseOrBuilder.java @@ -0,0 +1,182 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface QueryDeployedModelsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.QueryDeployedModelsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * DEPRECATED Use deployed_model_refs instead.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + java.util.List getDeployedModelsList(); + /** + * + * + *
+   * DEPRECATED Use deployed_model_refs instead.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.aiplatform.v1beta1.DeployedModel getDeployedModels(int index); + /** + * + * + *
+   * DEPRECATED Use deployed_model_refs instead.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + int getDeployedModelsCount(); + /** + * + * + *
+   * DEPRECATED Use deployed_model_refs instead.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + java.util.List + getDeployedModelsOrBuilderList(); + /** + * + * + *
+   * DEPRECATED Use deployed_model_refs instead.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModel deployed_models = 1 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.aiplatform.v1beta1.DeployedModelOrBuilder getDeployedModelsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * References to the DeployedModels that share the specified
+   * deploymentResourcePool.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + java.util.List getDeployedModelRefsList(); + /** + * + * + *
+   * References to the DeployedModels that share the specified
+   * deploymentResourcePool.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + com.google.cloud.aiplatform.v1beta1.DeployedModelRef getDeployedModelRefs(int index); + /** + * + * + *
+   * References to the DeployedModels that share the specified
+   * deploymentResourcePool.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + int getDeployedModelRefsCount(); + /** + * + * + *
+   * References to the DeployedModels that share the specified
+   * deploymentResourcePool.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + java.util.List + getDeployedModelRefsOrBuilderList(); + /** + * + * + *
+   * References to the DeployedModels that share the specified
+   * deploymentResourcePool.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.DeployedModelRef deployed_model_refs = 3; + * + */ + com.google.cloud.aiplatform.v1beta1.DeployedModelRefOrBuilder getDeployedModelRefsOrBuilder( + int index); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateDeploymentResourcePoolOperationMetadata.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateDeploymentResourcePoolOperationMetadata.java new file mode 100644 index 000000000..f5e912afc --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateDeploymentResourcePoolOperationMetadata.java @@ -0,0 +1,782 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Runtime operation information for UpdateDeploymentResourcePool method.
+ * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata} + */ +public final class UpdateDeploymentResourcePoolOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata) + UpdateDeploymentResourcePoolOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDeploymentResourcePoolOperationMetadata.newBuilder() to construct. + private UpdateDeploymentResourcePoolOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDeploymentResourcePoolOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDeploymentResourcePoolOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateDeploymentResourcePoolOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder subBuilder = + null; + if (genericMetadata_ != null) { + subBuilder = genericMetadata_.toBuilder(); + } + genericMetadata_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(genericMetadata_); + genericMetadata_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpdateDeploymentResourcePoolOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpdateDeploymentResourcePoolOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + .Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + return getGenericMetadata(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata other = + (com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata) obj; + + if (hasGenericMetadata() != other.hasGenericMetadata()) return false; + if (hasGenericMetadata()) { + if (!getGenericMetadata().equals(other.getGenericMetadata())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasGenericMetadata()) { + hash = (37 * hash) + GENERIC_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getGenericMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Runtime operation information for UpdateDeploymentResourcePool method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata) + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpdateDeploymentResourcePoolOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpdateDeploymentResourcePoolOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + .class, + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.DeploymentResourcePoolServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpdateDeploymentResourcePoolOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + build() { + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + buildPartial() { + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata result = + new com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata( + this); + if (genericMetadataBuilder_ == null) { + result.genericMetadata_ = genericMetadata_; + } else { + result.genericMetadata_ = genericMetadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + .getDefaultInstance()) return this; + if (other.hasGenericMetadata()) { + mergeGenericMetadata(other.getGenericMetadata()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + genericMetadataBuilder_; + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return genericMetadataBuilder_ != null || genericMetadata_ != null; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata() { + if (genericMetadataBuilder_ == null) { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } else { + return genericMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + genericMetadata_ = value; + onChanged(); + } else { + genericMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder setGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder builderForValue) { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = builderForValue.build(); + onChanged(); + } else { + genericMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder mergeGenericMetadata( + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata value) { + if (genericMetadataBuilder_ == null) { + if (genericMetadata_ != null) { + genericMetadata_ = + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.newBuilder( + genericMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + genericMetadata_ = value; + } + onChanged(); + } else { + genericMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public Builder clearGenericMetadata() { + if (genericMetadataBuilder_ == null) { + genericMetadata_ = null; + onChanged(); + } else { + genericMetadata_ = null; + genericMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder() { + if (genericMetadataBuilder_ != null) { + return genericMetadataBuilder_.getMessageOrBuilder(); + } else { + return genericMetadata_ == null + ? com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.getDefaultInstance() + : genericMetadata_; + } + } + /** + * + * + *
+     * The operation generic information.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder> + getGenericMetadataFieldBuilder() { + if (genericMetadataBuilder_ == null) { + genericMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder, + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder>( + getGenericMetadata(), getParentForChildren(), isClean()); + genericMetadata_ = null; + } + return genericMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata) + private static final com.google.cloud.aiplatform.v1beta1 + .UpdateDeploymentResourcePoolOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDeploymentResourcePoolOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateDeploymentResourcePoolOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateDeploymentResourcePoolOperationMetadataOrBuilder.java b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateDeploymentResourcePoolOperationMetadataOrBuilder.java new file mode 100644 index 000000000..1a1db25a6 --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpdateDeploymentResourcePoolOperationMetadataOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface UpdateDeploymentResourcePoolOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.UpdateDeploymentResourcePoolOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The operation generic information.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadataOrBuilder + getGenericMetadataOrBuilder(); +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto new file mode 100644 index 000000000..2249e655c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto @@ -0,0 +1,50 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/machine_resources.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "DeploymentResourcePoolProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// A description of resources that can be shared by multiple DeployedModels, +// whose underlying specification consists of a DedicatedResources. +message DeploymentResourcePool { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/DeploymentResourcePool" + pattern: "projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}" + }; + + // Output only. The resource name of the DeploymentResourcePool. + // Format: + // projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The underlying DedicatedResources that the DeploymentResourcePool uses. + DedicatedResources dedicated_resources = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Timestamp when this DeploymentResourcePool was created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto new file mode 100644 index 000000000..11eddf67c --- /dev/null +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto @@ -0,0 +1,219 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/deployed_model_ref.proto"; +import "google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto"; +import "google/cloud/aiplatform/v1beta1/endpoint.proto"; +import "google/cloud/aiplatform/v1beta1/operation.proto"; +import "google/longrunning/operations.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform"; +option java_multiple_files = true; +option java_outer_classname = "DeploymentResourcePoolServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// A service that manages the DeploymentResourcePool resource. +service DeploymentResourcePoolService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Create a DeploymentResourcePool. + rpc CreateDeploymentResourcePool(CreateDeploymentResourcePoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/deploymentResourcePools" + body: "*" + }; + option (google.api.method_signature) = "parent,deployment_resource_pool,deployment_resource_pool_id"; + option (google.longrunning.operation_info) = { + response_type: "DeploymentResourcePool" + metadata_type: "CreateDeploymentResourcePoolOperationMetadata" + }; + } + + // Get a DeploymentResourcePool. + rpc GetDeploymentResourcePool(GetDeploymentResourcePoolRequest) returns (DeploymentResourcePool) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List DeploymentResourcePools in a location. + rpc ListDeploymentResourcePools(ListDeploymentResourcePoolsRequest) returns (ListDeploymentResourcePoolsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/deploymentResourcePools" + }; + option (google.api.method_signature) = "parent"; + } + + // Delete a DeploymentResourcePool. + rpc DeleteDeploymentResourcePool(DeleteDeploymentResourcePoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // List DeployedModels that have been deployed on this DeploymentResourcePool. + rpc QueryDeployedModels(QueryDeployedModelsRequest) returns (QueryDeployedModelsResponse) { + option (google.api.http) = { + get: "/v1beta1/{deployment_resource_pool=projects/*/locations/*/deploymentResourcePools/*}:queryDeployedModels" + }; + option (google.api.method_signature) = "deployment_resource_pool"; + } +} + +// Request message for CreateDeploymentResourcePool method. +message CreateDeploymentResourcePoolRequest { + // Required. The parent location resource where this DeploymentResourcePool will be + // created. Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The DeploymentResourcePool to create. + DeploymentResourcePool deployment_resource_pool = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the DeploymentResourcePool, which + // will become the final component of the DeploymentResourcePool's resource + // name. + // + // The maximum length is 63 characters, and valid characters + // are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + string deployment_resource_pool_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Runtime operation information for CreateDeploymentResourcePool method. +message CreateDeploymentResourcePoolOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for GetDeploymentResourcePool method. +message GetDeploymentResourcePoolRequest { + // Required. The name of the DeploymentResourcePool to retrieve. + // Format: + // projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/DeploymentResourcePool" + } + ]; +} + +// Request message for ListDeploymentResourcePools method. +message ListDeploymentResourcePoolsRequest { + // Required. The parent Location which owns this collection of DeploymentResourcePools. + // Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of DeploymentResourcePools to return. The service may + // return fewer than this value. + int32 page_size = 2; + + // A page token, received from a previous `ListDeploymentResourcePools` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListDeploymentResourcePools` must match the call that provided the page + // token. + string page_token = 3; +} + +// Response message for ListDeploymentResourcePools method. +message ListDeploymentResourcePoolsResponse { + // The DeploymentResourcePools from the specified location. + repeated DeploymentResourcePool deployment_resource_pools = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Runtime operation information for UpdateDeploymentResourcePool method. +message UpdateDeploymentResourcePoolOperationMetadata { + // The operation generic information. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for DeleteDeploymentResourcePool method. +message DeleteDeploymentResourcePoolRequest { + // Required. The name of the DeploymentResourcePool to delete. + // Format: + // projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/DeploymentResourcePool" + } + ]; +} + +// Request message for QueryDeployedModels method. +message QueryDeployedModelsRequest { + // Required. The name of the target DeploymentResourcePool to query. + // Format: + // projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} + string deployment_resource_pool = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of DeployedModels to return. The service may return + // fewer than this value. + int32 page_size = 2; + + // A page token, received from a previous `QueryDeployedModels` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `QueryDeployedModels` must match the call that provided the page + // token. + string page_token = 3; +} + +// Response message for QueryDeployedModels method. +message QueryDeployedModelsResponse { + // DEPRECATED Use deployed_model_refs instead. + repeated DeployedModel deployed_models = 1 [deprecated = true]; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // References to the DeployedModels that share the specified + // deploymentResourcePool. + repeated DeployedModelRef deployed_model_refs = 3; +} diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint.proto index e99590864..0236e532f 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint.proto +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint.proto @@ -31,10 +31,6 @@ option java_outer_classname = "EndpointProto"; option java_package = "com.google.cloud.aiplatform.v1beta1"; option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; -option (google.api.resource_definition) = { - type: "aiplatform.googleapis.com/DeploymentResourcePool" - pattern: "projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}" -}; // Models are deployed into it, and afterwards Endpoint is called to obtain // predictions and explanations. diff --git a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model.proto b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model.proto index d17275bb8..ba9b2cd5a 100644 --- a/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model.proto +++ b/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model.proto @@ -98,6 +98,10 @@ message Model { // Resources that to large degree are decided by Vertex AI, and require // only a modest additional configuration. AUTOMATIC_RESOURCES = 2; + + // Resources that can be shared by multiple [DeployedModels][google.cloud.aiplatform.v1beta1.DeployedModel]. + // A pre-configured [DeploymentResourcePool][google.cloud.aiplatform.v1beta1.DeploymentResourcePool] is required. + SHARED_RESOURCES = 3; } // The resource name of the Model.