From 7f45b24906d35837c94322f9fa81d7d1b905ce79 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 23 Jun 2022 16:12:33 +0000 Subject: [PATCH] feat: add BatchImportModelEvaluationSlices API in aiplatform v1 model_service.proto (#972) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 456604066 Source-Link: https://github.com/googleapis/googleapis/commit/d57f437df4bb99d3ebca35ad9ccbda9f232e9264 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d9f3b867c60688ee2ed5dbf572ad88913d1fce45 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDlmM2I4NjdjNjA2ODhlZTJlZDVkYmY1NzJhZDg4OTEzZDFmY2U0NSJ9 feat: add model_version_id to BatchPredictionJob in aiplatform v1 batch_prediction_job.proto feat: add model_version_id to DeployedModel in aiplatform v1 endpoint.proto feat: add model_version_id to PredictResponse in aiplatform v1 prediction_service.proto PiperOrigin-RevId: 456571762 Source-Link: https://github.com/googleapis/googleapis/commit/19bd392eedec5c877f1241ee00d6b2cb34cfadc2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d4dfc802a88fe77bc04191f4b1d9b59481e692fd Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDRkZmM4MDJhODhmZTc3YmMwNDE5MWY0YjFkOWI1OTQ4MWU2OTJmZCJ9 feat: add BatchImportModelEvaluationSlices API in aiplatform v1beta1 model_service.proto PiperOrigin-RevId: 456559576 Source-Link: https://github.com/googleapis/googleapis/commit/f5cd5093e0900f4319052a2b69f0814da18d2641 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b3549d7a62116d5dbf49e22fb3d4c759d5da8313 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjM1NDlkN2E2MjExNmQ1ZGJmNDllMjJmYjNkNGM3NTlkNWRhODMxMyJ9 --- .../aiplatform/v1/ModelServiceClient.java | 126 ++ .../aiplatform/v1/ModelServiceSettings.java | 15 + .../cloud/aiplatform/v1/gapic_metadata.json | 3 + .../v1/stub/GrpcModelServiceStub.java | 48 + .../aiplatform/v1/stub/ModelServiceStub.java | 9 + .../v1/stub/ModelServiceStubSettings.java | 34 + .../v1beta1/ModelServiceClient.java | 126 ++ .../v1beta1/ModelServiceSettings.java | 15 + .../aiplatform/v1beta1/gapic_metadata.json | 3 + .../v1beta1/stub/GrpcModelServiceStub.java | 48 + .../v1beta1/stub/ModelServiceStub.java | 9 + .../stub/ModelServiceStubSettings.java | 34 + .../aiplatform/v1/JobServiceClientTest.java | 4 + .../aiplatform/v1/MockModelServiceImpl.java | 22 + .../aiplatform/v1/ModelServiceClientTest.java | 88 ++ .../v1/PredictionServiceClientTest.java | 2 + .../v1beta1/MockModelServiceImpl.java | 22 + .../v1beta1/ModelServiceClientTest.java | 88 ++ .../cloud/aiplatform/v1/ModelServiceGrpc.java | 141 +- .../aiplatform/v1beta1/ModelServiceGrpc.java | 144 +- ...tchImportModelEvaluationSlicesRequest.java | 1241 ++++++++++++++++ ...ModelEvaluationSlicesRequestOrBuilder.java | 122 ++ ...chImportModelEvaluationSlicesResponse.java | 788 ++++++++++ ...odelEvaluationSlicesResponseOrBuilder.java | 84 ++ .../aiplatform/v1/BatchPredictionJob.java | 179 +++ .../v1/BatchPredictionJobOrBuilder.java | 25 + .../v1/BatchPredictionJobProto.java | 122 +- .../cloud/aiplatform/v1/DeployedModel.java | 179 +++ .../aiplatform/v1/DeployedModelOrBuilder.java | 25 + .../cloud/aiplatform/v1/EndpointProto.java | 48 +- .../aiplatform/v1/ModelServiceProto.java | 254 ++-- .../cloud/aiplatform/v1/PredictResponse.java | 186 +++ .../v1/PredictResponseOrBuilder.java | 27 + .../aiplatform/v1/PredictionServiceProto.java | 83 +- .../aiplatform/v1/batch_prediction_job.proto | 3 + .../google/cloud/aiplatform/v1/endpoint.proto | 3 + .../cloud/aiplatform/v1/model_service.proto | 31 + .../aiplatform/v1/prediction_service.proto | 4 + ...tchImportModelEvaluationSlicesRequest.java | 1261 +++++++++++++++++ ...ModelEvaluationSlicesRequestOrBuilder.java | 122 ++ ...chImportModelEvaluationSlicesResponse.java | 797 +++++++++++ ...odelEvaluationSlicesResponseOrBuilder.java | 84 ++ .../aiplatform/v1beta1/ModelServiceProto.java | 285 ++-- .../aiplatform/v1beta1/model_service.proto | 31 + 44 files changed, 6602 insertions(+), 363 deletions(-) create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesResponseOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesResponseOrBuilder.java diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceClient.java index 5b22fba90d12..0846d90c211d 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceClient.java @@ -1527,6 +1527,132 @@ public final ModelEvaluation importModelEvaluation(ImportModelEvaluationRequest return stub.importModelEvaluationCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports a list of externally generated ModelEvaluationSlice. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ModelEvaluationName parent =
+   *       ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
+   *   List modelEvaluationSlices = new ArrayList<>();
+   *   BatchImportModelEvaluationSlicesResponse response =
+   *       modelServiceClient.batchImportModelEvaluationSlices(parent, modelEvaluationSlices);
+   * }
+   * }
+ * + * @param parent Required. The name of the parent ModelEvaluation resource. Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` + * @param modelEvaluationSlices Required. Model evaluation slice resource to be imported. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchImportModelEvaluationSlicesResponse batchImportModelEvaluationSlices( + ModelEvaluationName parent, List modelEvaluationSlices) { + BatchImportModelEvaluationSlicesRequest request = + BatchImportModelEvaluationSlicesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllModelEvaluationSlices(modelEvaluationSlices) + .build(); + return batchImportModelEvaluationSlices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports a list of externally generated ModelEvaluationSlice. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String parent =
+   *       ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]").toString();
+   *   List modelEvaluationSlices = new ArrayList<>();
+   *   BatchImportModelEvaluationSlicesResponse response =
+   *       modelServiceClient.batchImportModelEvaluationSlices(parent, modelEvaluationSlices);
+   * }
+   * }
+ * + * @param parent Required. The name of the parent ModelEvaluation resource. Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` + * @param modelEvaluationSlices Required. Model evaluation slice resource to be imported. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchImportModelEvaluationSlicesResponse batchImportModelEvaluationSlices( + String parent, List modelEvaluationSlices) { + BatchImportModelEvaluationSlicesRequest request = + BatchImportModelEvaluationSlicesRequest.newBuilder() + .setParent(parent) + .addAllModelEvaluationSlices(modelEvaluationSlices) + .build(); + return batchImportModelEvaluationSlices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports a list of externally generated ModelEvaluationSlice. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   BatchImportModelEvaluationSlicesRequest request =
+   *       BatchImportModelEvaluationSlicesRequest.newBuilder()
+   *           .setParent(
+   *               ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]")
+   *                   .toString())
+   *           .addAllModelEvaluationSlices(new ArrayList())
+   *           .build();
+   *   BatchImportModelEvaluationSlicesResponse response =
+   *       modelServiceClient.batchImportModelEvaluationSlices(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 BatchImportModelEvaluationSlicesResponse batchImportModelEvaluationSlices( + BatchImportModelEvaluationSlicesRequest request) { + return batchImportModelEvaluationSlicesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports a list of externally generated ModelEvaluationSlice. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   BatchImportModelEvaluationSlicesRequest request =
+   *       BatchImportModelEvaluationSlicesRequest.newBuilder()
+   *           .setParent(
+   *               ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]")
+   *                   .toString())
+   *           .addAllModelEvaluationSlices(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       modelServiceClient.batchImportModelEvaluationSlicesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchImportModelEvaluationSlicesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesCallable() { + return stub.batchImportModelEvaluationSlicesCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a ModelEvaluation. diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceSettings.java index d028c939f85d..bb36fd439738 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceSettings.java @@ -166,6 +166,14 @@ public UnaryCallSettings exportModelSettings() { return ((ModelServiceStubSettings) getStubSettings()).importModelEvaluationSettings(); } + /** Returns the object with the settings used for calls to batchImportModelEvaluationSlices. */ + public UnaryCallSettings< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesSettings() { + return ((ModelServiceStubSettings) getStubSettings()) + .batchImportModelEvaluationSlicesSettings(); + } + /** Returns the object with the settings used for calls to getModelEvaluation. */ public UnaryCallSettings getModelEvaluationSettings() { @@ -402,6 +410,13 @@ public UnaryCallSettings.Builder exportModelSetti return getStubSettingsBuilder().importModelEvaluationSettings(); } + /** Returns the builder for the settings used for calls to batchImportModelEvaluationSlices. */ + public UnaryCallSettings.Builder< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesSettings() { + return getStubSettingsBuilder().batchImportModelEvaluationSlicesSettings(); + } + /** Returns the builder for the settings used for calls to getModelEvaluation. */ public UnaryCallSettings.Builder getModelEvaluationSettings() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json index 76777b4ad5dd..ebaa23fb5e2f 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json @@ -565,6 +565,9 @@ "grpc": { "libraryClient": "ModelServiceClient", "rpcs": { + "BatchImportModelEvaluationSlices": { + "methods": ["batchImportModelEvaluationSlices", "batchImportModelEvaluationSlices", "batchImportModelEvaluationSlices", "batchImportModelEvaluationSlicesCallable"] + }, "DeleteModel": { "methods": ["deleteModelAsync", "deleteModelAsync", "deleteModelAsync", "deleteModelOperationCallable", "deleteModelCallable"] }, diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceStub.java index f58a29d9e5e8..53fa1a68b58f 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceStub.java @@ -29,6 +29,8 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest; +import com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse; import com.google.cloud.aiplatform.v1.DeleteModelRequest; import com.google.cloud.aiplatform.v1.DeleteModelVersionRequest; import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; @@ -172,6 +174,23 @@ public class GrpcModelServiceStub extends ModelServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(ModelEvaluation.getDefaultInstance())) .build(); + private static final MethodDescriptor< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1.ModelService/BatchImportModelEvaluationSlices") + .setRequestMarshaller( + ProtoUtils.marshaller( + BatchImportModelEvaluationSlicesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + BatchImportModelEvaluationSlicesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor getModelEvaluationMethodDescriptor = MethodDescriptor.newBuilder() @@ -289,6 +308,9 @@ public class GrpcModelServiceStub extends ModelServiceStub { exportModelOperationCallable; private final UnaryCallable importModelEvaluationCallable; + private final UnaryCallable< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesCallable; private final UnaryCallable getModelEvaluationCallable; private final UnaryCallable @@ -455,6 +477,20 @@ protected GrpcModelServiceStub( return params.build(); }) .build(); + GrpcCallSettings< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(batchImportModelEvaluationSlicesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings getModelEvaluationTransportSettings = GrpcCallSettings.newBuilder() @@ -622,6 +658,11 @@ protected GrpcModelServiceStub( importModelEvaluationTransportSettings, settings.importModelEvaluationSettings(), clientContext); + this.batchImportModelEvaluationSlicesCallable = + callableFactory.createUnaryCallable( + batchImportModelEvaluationSlicesTransportSettings, + settings.batchImportModelEvaluationSlicesSettings(), + clientContext); this.getModelEvaluationCallable = callableFactory.createUnaryCallable( getModelEvaluationTransportSettings, @@ -768,6 +809,13 @@ public UnaryCallable exportModelCallable() { return importModelEvaluationCallable; } + @Override + public UnaryCallable< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesCallable() { + return batchImportModelEvaluationSlicesCallable; + } + @Override public UnaryCallable getModelEvaluationCallable() { return getModelEvaluationCallable; diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStub.java index 9afa3fea0984..8453778fa532 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStub.java @@ -25,6 +25,8 @@ 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.v1.BatchImportModelEvaluationSlicesRequest; +import com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse; import com.google.cloud.aiplatform.v1.DeleteModelRequest; import com.google.cloud.aiplatform.v1.DeleteModelVersionRequest; import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; @@ -150,6 +152,13 @@ public UnaryCallable exportModelCallable() { throw new UnsupportedOperationException("Not implemented: importModelEvaluationCallable()"); } + public UnaryCallable< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchImportModelEvaluationSlicesCallable()"); + } + public UnaryCallable getModelEvaluationCallable() { throw new UnsupportedOperationException("Not implemented: getModelEvaluationCallable()"); } diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStubSettings.java index 00c266a92938..7272252d625f 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStubSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStubSettings.java @@ -48,6 +48,8 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest; +import com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse; import com.google.cloud.aiplatform.v1.DeleteModelRequest; import com.google.cloud.aiplatform.v1.DeleteModelVersionRequest; import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; @@ -158,6 +160,9 @@ public class ModelServiceStubSettings extends StubSettings importModelEvaluationSettings; + private final UnaryCallSettings< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesSettings; private final UnaryCallSettings getModelEvaluationSettings; private final PagedCallSettings< @@ -565,6 +570,13 @@ public UnaryCallSettings exportModelSettings() { return importModelEvaluationSettings; } + /** Returns the object with the settings used for calls to batchImportModelEvaluationSlices. */ + public UnaryCallSettings< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesSettings() { + return batchImportModelEvaluationSlicesSettings; + } + /** Returns the object with the settings used for calls to getModelEvaluation. */ public UnaryCallSettings getModelEvaluationSettings() { @@ -712,6 +724,8 @@ protected ModelServiceStubSettings(Builder settingsBuilder) throws IOException { exportModelSettings = settingsBuilder.exportModelSettings().build(); exportModelOperationSettings = settingsBuilder.exportModelOperationSettings().build(); importModelEvaluationSettings = settingsBuilder.importModelEvaluationSettings().build(); + batchImportModelEvaluationSlicesSettings = + settingsBuilder.batchImportModelEvaluationSlicesSettings().build(); getModelEvaluationSettings = settingsBuilder.getModelEvaluationSettings().build(); listModelEvaluationsSettings = settingsBuilder.listModelEvaluationsSettings().build(); getModelEvaluationSliceSettings = settingsBuilder.getModelEvaluationSliceSettings().build(); @@ -754,6 +768,9 @@ public static class Builder extends StubSettings.Builder importModelEvaluationSettings; + private final UnaryCallSettings.Builder< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesSettings; private final UnaryCallSettings.Builder getModelEvaluationSettings; private final PagedCallSettings.Builder< @@ -817,6 +834,7 @@ protected Builder(ClientContext clientContext) { exportModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); exportModelOperationSettings = OperationCallSettings.newBuilder(); importModelEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchImportModelEvaluationSlicesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getModelEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listModelEvaluationsSettings = PagedCallSettings.newBuilder(LIST_MODEL_EVALUATIONS_PAGE_STR_FACT); @@ -841,6 +859,7 @@ protected Builder(ClientContext clientContext) { mergeVersionAliasesSettings, exportModelSettings, importModelEvaluationSettings, + batchImportModelEvaluationSlicesSettings, getModelEvaluationSettings, listModelEvaluationsSettings, getModelEvaluationSliceSettings, @@ -871,6 +890,8 @@ protected Builder(ModelServiceStubSettings settings) { exportModelSettings = settings.exportModelSettings.toBuilder(); exportModelOperationSettings = settings.exportModelOperationSettings.toBuilder(); importModelEvaluationSettings = settings.importModelEvaluationSettings.toBuilder(); + batchImportModelEvaluationSlicesSettings = + settings.batchImportModelEvaluationSlicesSettings.toBuilder(); getModelEvaluationSettings = settings.getModelEvaluationSettings.toBuilder(); listModelEvaluationsSettings = settings.listModelEvaluationsSettings.toBuilder(); getModelEvaluationSliceSettings = settings.getModelEvaluationSliceSettings.toBuilder(); @@ -893,6 +914,7 @@ protected Builder(ModelServiceStubSettings settings) { mergeVersionAliasesSettings, exportModelSettings, importModelEvaluationSettings, + batchImportModelEvaluationSlicesSettings, getModelEvaluationSettings, listModelEvaluationsSettings, getModelEvaluationSliceSettings, @@ -968,6 +990,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .batchImportModelEvaluationSlicesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .getModelEvaluationSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -1216,6 +1243,13 @@ public UnaryCallSettings.Builder exportModelSetti return importModelEvaluationSettings; } + /** Returns the builder for the settings used for calls to batchImportModelEvaluationSlices. */ + public UnaryCallSettings.Builder< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesSettings() { + return batchImportModelEvaluationSlicesSettings; + } + /** Returns the builder for the settings used for calls to getModelEvaluation. */ public UnaryCallSettings.Builder getModelEvaluationSettings() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java index f173b892f2ed..96e594ca105c 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java @@ -1671,6 +1671,132 @@ public final ModelEvaluation importModelEvaluation(ImportModelEvaluationRequest return stub.importModelEvaluationCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports a list of externally generated ModelEvaluationSlice. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ModelEvaluationName parent =
+   *       ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
+   *   List modelEvaluationSlices = new ArrayList<>();
+   *   BatchImportModelEvaluationSlicesResponse response =
+   *       modelServiceClient.batchImportModelEvaluationSlices(parent, modelEvaluationSlices);
+   * }
+   * }
+ * + * @param parent Required. The name of the parent ModelEvaluation resource. Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` + * @param modelEvaluationSlices Required. Model evaluation slice resource to be imported. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchImportModelEvaluationSlicesResponse batchImportModelEvaluationSlices( + ModelEvaluationName parent, List modelEvaluationSlices) { + BatchImportModelEvaluationSlicesRequest request = + BatchImportModelEvaluationSlicesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllModelEvaluationSlices(modelEvaluationSlices) + .build(); + return batchImportModelEvaluationSlices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports a list of externally generated ModelEvaluationSlice. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String parent =
+   *       ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]").toString();
+   *   List modelEvaluationSlices = new ArrayList<>();
+   *   BatchImportModelEvaluationSlicesResponse response =
+   *       modelServiceClient.batchImportModelEvaluationSlices(parent, modelEvaluationSlices);
+   * }
+   * }
+ * + * @param parent Required. The name of the parent ModelEvaluation resource. Format: + * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` + * @param modelEvaluationSlices Required. Model evaluation slice resource to be imported. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchImportModelEvaluationSlicesResponse batchImportModelEvaluationSlices( + String parent, List modelEvaluationSlices) { + BatchImportModelEvaluationSlicesRequest request = + BatchImportModelEvaluationSlicesRequest.newBuilder() + .setParent(parent) + .addAllModelEvaluationSlices(modelEvaluationSlices) + .build(); + return batchImportModelEvaluationSlices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports a list of externally generated ModelEvaluationSlice. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   BatchImportModelEvaluationSlicesRequest request =
+   *       BatchImportModelEvaluationSlicesRequest.newBuilder()
+   *           .setParent(
+   *               ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]")
+   *                   .toString())
+   *           .addAllModelEvaluationSlices(new ArrayList())
+   *           .build();
+   *   BatchImportModelEvaluationSlicesResponse response =
+   *       modelServiceClient.batchImportModelEvaluationSlices(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 BatchImportModelEvaluationSlicesResponse batchImportModelEvaluationSlices( + BatchImportModelEvaluationSlicesRequest request) { + return batchImportModelEvaluationSlicesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports a list of externally generated ModelEvaluationSlice. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   BatchImportModelEvaluationSlicesRequest request =
+   *       BatchImportModelEvaluationSlicesRequest.newBuilder()
+   *           .setParent(
+   *               ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]")
+   *                   .toString())
+   *           .addAllModelEvaluationSlices(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       modelServiceClient.batchImportModelEvaluationSlicesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchImportModelEvaluationSlicesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesCallable() { + return stub.batchImportModelEvaluationSlicesCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a ModelEvaluation. diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceSettings.java index b06af4b83ade..c81f8c13861a 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceSettings.java @@ -183,6 +183,14 @@ public UnaryCallSettings exportModelSettings() { return ((ModelServiceStubSettings) getStubSettings()).importModelEvaluationSettings(); } + /** Returns the object with the settings used for calls to batchImportModelEvaluationSlices. */ + public UnaryCallSettings< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesSettings() { + return ((ModelServiceStubSettings) getStubSettings()) + .batchImportModelEvaluationSlicesSettings(); + } + /** Returns the object with the settings used for calls to getModelEvaluation. */ public UnaryCallSettings getModelEvaluationSettings() { @@ -434,6 +442,13 @@ public UnaryCallSettings.Builder exportModelSetti return getStubSettingsBuilder().importModelEvaluationSettings(); } + /** Returns the builder for the settings used for calls to batchImportModelEvaluationSlices. */ + public UnaryCallSettings.Builder< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesSettings() { + return getStubSettingsBuilder().batchImportModelEvaluationSlicesSettings(); + } + /** Returns the builder for the settings used for calls to getModelEvaluation. */ public UnaryCallSettings.Builder getModelEvaluationSettings() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json index bf49669c463e..01466f0ac0e0 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json @@ -565,6 +565,9 @@ "grpc": { "libraryClient": "ModelServiceClient", "rpcs": { + "BatchImportModelEvaluationSlices": { + "methods": ["batchImportModelEvaluationSlices", "batchImportModelEvaluationSlices", "batchImportModelEvaluationSlices", "batchImportModelEvaluationSlicesCallable"] + }, "DeleteModel": { "methods": ["deleteModelAsync", "deleteModelAsync", "deleteModelAsync", "deleteModelOperationCallable", "deleteModelCallable"] }, diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceStub.java index 297560f51cf7..1087a381ca08 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceStub.java @@ -30,6 +30,8 @@ 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.BatchImportModelEvaluationSlicesRequest; +import com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse; import com.google.cloud.aiplatform.v1beta1.DeleteModelRequest; import com.google.cloud.aiplatform.v1beta1.DeleteModelVersionRequest; import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; @@ -189,6 +191,23 @@ public class GrpcModelServiceStub extends ModelServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(ModelEvaluation.getDefaultInstance())) .build(); + private static final MethodDescriptor< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.ModelService/BatchImportModelEvaluationSlices") + .setRequestMarshaller( + ProtoUtils.marshaller( + BatchImportModelEvaluationSlicesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + BatchImportModelEvaluationSlicesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor getModelEvaluationMethodDescriptor = MethodDescriptor.newBuilder() @@ -315,6 +334,9 @@ public class GrpcModelServiceStub extends ModelServiceStub { exportModelOperationCallable; private final UnaryCallable importModelEvaluationCallable; + private final UnaryCallable< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesCallable; private final UnaryCallable getModelEvaluationCallable; private final UnaryCallable @@ -492,6 +514,20 @@ protected GrpcModelServiceStub( return params.build(); }) .build(); + GrpcCallSettings< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(batchImportModelEvaluationSlicesMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings getModelEvaluationTransportSettings = GrpcCallSettings.newBuilder() @@ -670,6 +706,11 @@ protected GrpcModelServiceStub( importModelEvaluationTransportSettings, settings.importModelEvaluationSettings(), clientContext); + this.batchImportModelEvaluationSlicesCallable = + callableFactory.createUnaryCallable( + batchImportModelEvaluationSlicesTransportSettings, + settings.batchImportModelEvaluationSlicesSettings(), + clientContext); this.getModelEvaluationCallable = callableFactory.createUnaryCallable( getModelEvaluationTransportSettings, @@ -831,6 +872,13 @@ public UnaryCallable exportModelCallable() { return importModelEvaluationCallable; } + @Override + public UnaryCallable< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesCallable() { + return batchImportModelEvaluationSlicesCallable; + } + @Override public UnaryCallable getModelEvaluationCallable() { return getModelEvaluationCallable; diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStub.java index dd424a47cb7b..3721c8c57f34 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStub.java @@ -26,6 +26,8 @@ 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.BatchImportModelEvaluationSlicesRequest; +import com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse; import com.google.cloud.aiplatform.v1beta1.DeleteModelRequest; import com.google.cloud.aiplatform.v1beta1.DeleteModelVersionRequest; import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; @@ -169,6 +171,13 @@ public UnaryCallable exportModelCallable() { throw new UnsupportedOperationException("Not implemented: importModelEvaluationCallable()"); } + public UnaryCallable< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchImportModelEvaluationSlicesCallable()"); + } + public UnaryCallable getModelEvaluationCallable() { throw new UnsupportedOperationException("Not implemented: getModelEvaluationCallable()"); } diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStubSettings.java index c5c80d36205b..7a93ef274d6d 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStubSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStubSettings.java @@ -48,6 +48,8 @@ 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.BatchImportModelEvaluationSlicesRequest; +import com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse; import com.google.cloud.aiplatform.v1beta1.DeleteModelRequest; import com.google.cloud.aiplatform.v1beta1.DeleteModelVersionRequest; import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; @@ -169,6 +171,9 @@ public class ModelServiceStubSettings extends StubSettings importModelEvaluationSettings; + private final UnaryCallSettings< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesSettings; private final UnaryCallSettings getModelEvaluationSettings; private final PagedCallSettings< @@ -591,6 +596,13 @@ public UnaryCallSettings exportModelSettings() { return importModelEvaluationSettings; } + /** Returns the object with the settings used for calls to batchImportModelEvaluationSlices. */ + public UnaryCallSettings< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesSettings() { + return batchImportModelEvaluationSlicesSettings; + } + /** Returns the object with the settings used for calls to getModelEvaluation. */ public UnaryCallSettings getModelEvaluationSettings() { @@ -741,6 +753,8 @@ protected ModelServiceStubSettings(Builder settingsBuilder) throws IOException { exportModelSettings = settingsBuilder.exportModelSettings().build(); exportModelOperationSettings = settingsBuilder.exportModelOperationSettings().build(); importModelEvaluationSettings = settingsBuilder.importModelEvaluationSettings().build(); + batchImportModelEvaluationSlicesSettings = + settingsBuilder.batchImportModelEvaluationSlicesSettings().build(); getModelEvaluationSettings = settingsBuilder.getModelEvaluationSettings().build(); listModelEvaluationsSettings = settingsBuilder.listModelEvaluationsSettings().build(); getModelEvaluationSliceSettings = settingsBuilder.getModelEvaluationSliceSettings().build(); @@ -790,6 +804,9 @@ public static class Builder extends StubSettings.Builder importModelEvaluationSettings; + private final UnaryCallSettings.Builder< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesSettings; private final UnaryCallSettings.Builder getModelEvaluationSettings; private final PagedCallSettings.Builder< @@ -865,6 +882,7 @@ protected Builder(ClientContext clientContext) { exportModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); exportModelOperationSettings = OperationCallSettings.newBuilder(); importModelEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchImportModelEvaluationSlicesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getModelEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listModelEvaluationsSettings = PagedCallSettings.newBuilder(LIST_MODEL_EVALUATIONS_PAGE_STR_FACT); @@ -890,6 +908,7 @@ protected Builder(ClientContext clientContext) { mergeVersionAliasesSettings, exportModelSettings, importModelEvaluationSettings, + batchImportModelEvaluationSlicesSettings, getModelEvaluationSettings, listModelEvaluationsSettings, getModelEvaluationSliceSettings, @@ -923,6 +942,8 @@ protected Builder(ModelServiceStubSettings settings) { exportModelSettings = settings.exportModelSettings.toBuilder(); exportModelOperationSettings = settings.exportModelOperationSettings.toBuilder(); importModelEvaluationSettings = settings.importModelEvaluationSettings.toBuilder(); + batchImportModelEvaluationSlicesSettings = + settings.batchImportModelEvaluationSlicesSettings.toBuilder(); getModelEvaluationSettings = settings.getModelEvaluationSettings.toBuilder(); listModelEvaluationsSettings = settings.listModelEvaluationsSettings.toBuilder(); getModelEvaluationSliceSettings = settings.getModelEvaluationSliceSettings.toBuilder(); @@ -946,6 +967,7 @@ protected Builder(ModelServiceStubSettings settings) { mergeVersionAliasesSettings, exportModelSettings, importModelEvaluationSettings, + batchImportModelEvaluationSlicesSettings, getModelEvaluationSettings, listModelEvaluationsSettings, getModelEvaluationSliceSettings, @@ -1026,6 +1048,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .batchImportModelEvaluationSlicesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .getModelEvaluationSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) @@ -1317,6 +1344,13 @@ public UnaryCallSettings.Builder exportModelSetti return importModelEvaluationSettings; } + /** Returns the builder for the settings used for calls to batchImportModelEvaluationSlices. */ + public UnaryCallSettings.Builder< + BatchImportModelEvaluationSlicesRequest, BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlicesSettings() { + return batchImportModelEvaluationSlicesSettings; + } + /** Returns the builder for the settings used for calls to getModelEvaluation. */ public UnaryCallSettings.Builder getModelEvaluationSettings() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/JobServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/JobServiceClientTest.java index e9d0f3a44e4a..2db7c6c37581 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/JobServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/JobServiceClientTest.java @@ -1544,6 +1544,7 @@ public void createBatchPredictionJobTest() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") .setUnmanagedContainerModel(UnmanagedContainerModel.newBuilder().build()) .setInputConfig(BatchPredictionJob.InputConfig.newBuilder().build()) .setModelParameters(Value.newBuilder().setBoolValue(true).build()) @@ -1610,6 +1611,7 @@ public void createBatchPredictionJobTest2() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") .setUnmanagedContainerModel(UnmanagedContainerModel.newBuilder().build()) .setInputConfig(BatchPredictionJob.InputConfig.newBuilder().build()) .setModelParameters(Value.newBuilder().setBoolValue(true).build()) @@ -1676,6 +1678,7 @@ public void getBatchPredictionJobTest() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") .setUnmanagedContainerModel(UnmanagedContainerModel.newBuilder().build()) .setInputConfig(BatchPredictionJob.InputConfig.newBuilder().build()) .setModelParameters(Value.newBuilder().setBoolValue(true).build()) @@ -1741,6 +1744,7 @@ public void getBatchPredictionJobTest2() throws Exception { .toString()) .setDisplayName("displayName1714148973") .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") .setUnmanagedContainerModel(UnmanagedContainerModel.newBuilder().build()) .setInputConfig(BatchPredictionJob.InputConfig.newBuilder().build()) .setModelParameters(Value.newBuilder().setBoolValue(true).build()) diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelServiceImpl.java index 3eebadb789d6..a5bd3ac81a32 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelServiceImpl.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelServiceImpl.java @@ -265,6 +265,28 @@ public void importModelEvaluation( } } + @Override + public void batchImportModelEvaluationSlices( + BatchImportModelEvaluationSlicesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchImportModelEvaluationSlicesResponse) { + requests.add(request); + responseObserver.onNext(((BatchImportModelEvaluationSlicesResponse) 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 BatchImportModelEvaluationSlices, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchImportModelEvaluationSlicesResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void getModelEvaluation( GetModelEvaluationRequest request, StreamObserver responseObserver) { diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java index ab2e3940acaf..4c83ae059b87 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java @@ -1087,6 +1087,94 @@ public void importModelEvaluationExceptionTest2() throws Exception { } } + @Test + public void batchImportModelEvaluationSlicesTest() throws Exception { + BatchImportModelEvaluationSlicesResponse expectedResponse = + BatchImportModelEvaluationSlicesResponse.newBuilder() + .addAllImportedModelEvaluationSlices(new ArrayList()) + .build(); + mockModelService.addResponse(expectedResponse); + + ModelEvaluationName parent = + ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"); + List modelEvaluationSlices = new ArrayList<>(); + + BatchImportModelEvaluationSlicesResponse actualResponse = + client.batchImportModelEvaluationSlices(parent, modelEvaluationSlices); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchImportModelEvaluationSlicesRequest actualRequest = + ((BatchImportModelEvaluationSlicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(modelEvaluationSlices, actualRequest.getModelEvaluationSlicesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchImportModelEvaluationSlicesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + ModelEvaluationName parent = + ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"); + List modelEvaluationSlices = new ArrayList<>(); + client.batchImportModelEvaluationSlices(parent, modelEvaluationSlices); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchImportModelEvaluationSlicesTest2() throws Exception { + BatchImportModelEvaluationSlicesResponse expectedResponse = + BatchImportModelEvaluationSlicesResponse.newBuilder() + .addAllImportedModelEvaluationSlices(new ArrayList()) + .build(); + mockModelService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + List modelEvaluationSlices = new ArrayList<>(); + + BatchImportModelEvaluationSlicesResponse actualResponse = + client.batchImportModelEvaluationSlices(parent, modelEvaluationSlices); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchImportModelEvaluationSlicesRequest actualRequest = + ((BatchImportModelEvaluationSlicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(modelEvaluationSlices, actualRequest.getModelEvaluationSlicesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchImportModelEvaluationSlicesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String parent = "parent-995424086"; + List modelEvaluationSlices = new ArrayList<>(); + client.batchImportModelEvaluationSlices(parent, modelEvaluationSlices); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getModelEvaluationTest() throws Exception { ModelEvaluation expectedResponse = diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java index a0dd9694cefe..ba1161491553 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/PredictionServiceClientTest.java @@ -109,6 +109,7 @@ public void predictTest() throws Exception { .addAllPredictions(new ArrayList()) .setDeployedModelId("deployedModelId-1817547906") .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") .setModelDisplayName("modelDisplayName1578770308") .build(); mockPredictionService.addResponse(expectedResponse); @@ -156,6 +157,7 @@ public void predictTest2() throws Exception { .addAllPredictions(new ArrayList()) .setDeployedModelId("deployedModelId-1817547906") .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") .setModelDisplayName("modelDisplayName1578770308") .build(); mockPredictionService.addResponse(expectedResponse); diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelServiceImpl.java index 217b004ad8ea..60c461613930 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelServiceImpl.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelServiceImpl.java @@ -286,6 +286,28 @@ public void importModelEvaluation( } } + @Override + public void batchImportModelEvaluationSlices( + BatchImportModelEvaluationSlicesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BatchImportModelEvaluationSlicesResponse) { + requests.add(request); + responseObserver.onNext(((BatchImportModelEvaluationSlicesResponse) 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 BatchImportModelEvaluationSlices, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BatchImportModelEvaluationSlicesResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void getModelEvaluation( GetModelEvaluationRequest request, StreamObserver responseObserver) { diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClientTest.java index 689a9f33bbe8..5da7fe6cda97 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClientTest.java @@ -1177,6 +1177,94 @@ public void importModelEvaluationExceptionTest2() throws Exception { } } + @Test + public void batchImportModelEvaluationSlicesTest() throws Exception { + BatchImportModelEvaluationSlicesResponse expectedResponse = + BatchImportModelEvaluationSlicesResponse.newBuilder() + .addAllImportedModelEvaluationSlices(new ArrayList()) + .build(); + mockModelService.addResponse(expectedResponse); + + ModelEvaluationName parent = + ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"); + List modelEvaluationSlices = new ArrayList<>(); + + BatchImportModelEvaluationSlicesResponse actualResponse = + client.batchImportModelEvaluationSlices(parent, modelEvaluationSlices); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchImportModelEvaluationSlicesRequest actualRequest = + ((BatchImportModelEvaluationSlicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(modelEvaluationSlices, actualRequest.getModelEvaluationSlicesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchImportModelEvaluationSlicesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + ModelEvaluationName parent = + ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"); + List modelEvaluationSlices = new ArrayList<>(); + client.batchImportModelEvaluationSlices(parent, modelEvaluationSlices); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchImportModelEvaluationSlicesTest2() throws Exception { + BatchImportModelEvaluationSlicesResponse expectedResponse = + BatchImportModelEvaluationSlicesResponse.newBuilder() + .addAllImportedModelEvaluationSlices(new ArrayList()) + .build(); + mockModelService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + List modelEvaluationSlices = new ArrayList<>(); + + BatchImportModelEvaluationSlicesResponse actualResponse = + client.batchImportModelEvaluationSlices(parent, modelEvaluationSlices); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchImportModelEvaluationSlicesRequest actualRequest = + ((BatchImportModelEvaluationSlicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(modelEvaluationSlices, actualRequest.getModelEvaluationSlicesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchImportModelEvaluationSlicesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String parent = "parent-995424086"; + List modelEvaluationSlices = new ArrayList<>(); + client.batchImportModelEvaluationSlices(parent, modelEvaluationSlices); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getModelEvaluationTest() throws Exception { ModelEvaluation expectedResponse = diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceGrpc.java index ff1e189585fb..6555d398b15a 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceGrpc.java +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceGrpc.java @@ -480,6 +480,59 @@ private ModelServiceGrpc() {} return getImportModelEvaluationMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest, + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse> + getBatchImportModelEvaluationSlicesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchImportModelEvaluationSlices", + requestType = com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest.class, + responseType = com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest, + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse> + getBatchImportModelEvaluationSlicesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest, + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse> + getBatchImportModelEvaluationSlicesMethod; + if ((getBatchImportModelEvaluationSlicesMethod = + ModelServiceGrpc.getBatchImportModelEvaluationSlicesMethod) + == null) { + synchronized (ModelServiceGrpc.class) { + if ((getBatchImportModelEvaluationSlicesMethod = + ModelServiceGrpc.getBatchImportModelEvaluationSlicesMethod) + == null) { + ModelServiceGrpc.getBatchImportModelEvaluationSlicesMethod = + getBatchImportModelEvaluationSlicesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchImportModelEvaluationSlices")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1 + .BatchImportModelEvaluationSlicesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new ModelServiceMethodDescriptorSupplier( + "BatchImportModelEvaluationSlices")) + .build(); + } + } + } + return getBatchImportModelEvaluationSlicesMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.aiplatform.v1.GetModelEvaluationRequest, com.google.cloud.aiplatform.v1.ModelEvaluation> @@ -875,6 +928,22 @@ public void importModelEvaluation( getImportModelEvaluationMethod(), responseObserver); } + /** + * + * + *
+     * Imports a list of externally generated ModelEvaluationSlice.
+     * 
+ */ + public void batchImportModelEvaluationSlices( + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchImportModelEvaluationSlicesMethod(), responseObserver); + } + /** * * @@ -1002,6 +1071,13 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.aiplatform.v1.ImportModelEvaluationRequest, com.google.cloud.aiplatform.v1.ModelEvaluation>( this, METHODID_IMPORT_MODEL_EVALUATION))) + .addMethod( + getBatchImportModelEvaluationSlicesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest, + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse>( + this, METHODID_BATCH_IMPORT_MODEL_EVALUATION_SLICES))) .addMethod( getGetModelEvaluationMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1219,6 +1295,24 @@ public void importModelEvaluation( responseObserver); } + /** + * + * + *
+     * Imports a list of externally generated ModelEvaluationSlice.
+     * 
+ */ + public void batchImportModelEvaluationSlices( + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchImportModelEvaluationSlicesMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1446,6 +1540,20 @@ public com.google.cloud.aiplatform.v1.ModelEvaluation importModelEvaluation( getChannel(), getImportModelEvaluationMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Imports a list of externally generated ModelEvaluationSlice.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse + batchImportModelEvaluationSlices( + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchImportModelEvaluationSlicesMethod(), getCallOptions(), request); + } + /** * * @@ -1660,6 +1768,22 @@ protected ModelServiceFutureStub build( getChannel().newCall(getImportModelEvaluationMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Imports a list of externally generated ModelEvaluationSlice.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlices( + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchImportModelEvaluationSlicesMethod(), getCallOptions()), + request); + } + /** * * @@ -1729,10 +1853,11 @@ protected ModelServiceFutureStub build( private static final int METHODID_MERGE_VERSION_ALIASES = 7; private static final int METHODID_EXPORT_MODEL = 8; private static final int METHODID_IMPORT_MODEL_EVALUATION = 9; - private static final int METHODID_GET_MODEL_EVALUATION = 10; - private static final int METHODID_LIST_MODEL_EVALUATIONS = 11; - private static final int METHODID_GET_MODEL_EVALUATION_SLICE = 12; - private static final int METHODID_LIST_MODEL_EVALUATION_SLICES = 13; + private static final int METHODID_BATCH_IMPORT_MODEL_EVALUATION_SLICES = 10; + private static final int METHODID_GET_MODEL_EVALUATION = 11; + private static final int METHODID_LIST_MODEL_EVALUATIONS = 12; + private static final int METHODID_GET_MODEL_EVALUATION_SLICE = 13; + private static final int METHODID_LIST_MODEL_EVALUATION_SLICES = 14; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1805,6 +1930,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_BATCH_IMPORT_MODEL_EVALUATION_SLICES: + serviceImpl.batchImportModelEvaluationSlices( + (com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse>) + responseObserver); + break; case METHODID_GET_MODEL_EVALUATION: serviceImpl.getModelEvaluation( (com.google.cloud.aiplatform.v1.GetModelEvaluationRequest) request, @@ -1905,6 +2037,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getMergeVersionAliasesMethod()) .addMethod(getExportModelMethod()) .addMethod(getImportModelEvaluationMethod()) + .addMethod(getBatchImportModelEvaluationSlicesMethod()) .addMethod(getGetModelEvaluationMethod()) .addMethod(getListModelEvaluationsMethod()) .addMethod(getGetModelEvaluationSliceMethod()) diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceGrpc.java index c3ab83c24d7d..d7c420e73e0e 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceGrpc.java +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceGrpc.java @@ -540,6 +540,62 @@ private ModelServiceGrpc() {} return getImportModelEvaluationMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest, + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse> + getBatchImportModelEvaluationSlicesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchImportModelEvaluationSlices", + requestType = + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest.class, + responseType = + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest, + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse> + getBatchImportModelEvaluationSlicesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest, + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse> + getBatchImportModelEvaluationSlicesMethod; + if ((getBatchImportModelEvaluationSlicesMethod = + ModelServiceGrpc.getBatchImportModelEvaluationSlicesMethod) + == null) { + synchronized (ModelServiceGrpc.class) { + if ((getBatchImportModelEvaluationSlicesMethod = + ModelServiceGrpc.getBatchImportModelEvaluationSlicesMethod) + == null) { + ModelServiceGrpc.getBatchImportModelEvaluationSlicesMethod = + getBatchImportModelEvaluationSlicesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchImportModelEvaluationSlices")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1 + .BatchImportModelEvaluationSlicesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1 + .BatchImportModelEvaluationSlicesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new ModelServiceMethodDescriptorSupplier( + "BatchImportModelEvaluationSlices")) + .build(); + } + } + } + return getBatchImportModelEvaluationSlicesMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.aiplatform.v1beta1.GetModelEvaluationRequest, com.google.cloud.aiplatform.v1beta1.ModelEvaluation> @@ -950,6 +1006,22 @@ public void importModelEvaluation( getImportModelEvaluationMethod(), responseObserver); } + /** + * + * + *
+     * Imports a list of externally generated ModelEvaluationSlice.
+     * 
+ */ + public void batchImportModelEvaluationSlices( + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchImportModelEvaluationSlicesMethod(), responseObserver); + } + /** * * @@ -1085,6 +1157,13 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.aiplatform.v1beta1.ImportModelEvaluationRequest, com.google.cloud.aiplatform.v1beta1.ModelEvaluation>( this, METHODID_IMPORT_MODEL_EVALUATION))) + .addMethod( + getBatchImportModelEvaluationSlicesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest, + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse>( + this, METHODID_BATCH_IMPORT_MODEL_EVALUATION_SLICES))) .addMethod( getGetModelEvaluationMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1318,6 +1397,24 @@ public void importModelEvaluation( responseObserver); } + /** + * + * + *
+     * Imports a list of externally generated ModelEvaluationSlice.
+     * 
+ */ + public void batchImportModelEvaluationSlices( + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchImportModelEvaluationSlicesMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1559,6 +1656,20 @@ public com.google.cloud.aiplatform.v1beta1.ModelEvaluation importModelEvaluation getChannel(), getImportModelEvaluationMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Imports a list of externally generated ModelEvaluationSlice.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + batchImportModelEvaluationSlices( + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchImportModelEvaluationSlicesMethod(), getCallOptions(), request); + } + /** * * @@ -1792,6 +1903,22 @@ protected ModelServiceFutureStub build( getChannel().newCall(getImportModelEvaluationMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Imports a list of externally generated ModelEvaluationSlice.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse> + batchImportModelEvaluationSlices( + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchImportModelEvaluationSlicesMethod(), getCallOptions()), + request); + } + /** * * @@ -1863,10 +1990,11 @@ protected ModelServiceFutureStub build( private static final int METHODID_MERGE_VERSION_ALIASES = 8; private static final int METHODID_EXPORT_MODEL = 9; private static final int METHODID_IMPORT_MODEL_EVALUATION = 10; - private static final int METHODID_GET_MODEL_EVALUATION = 11; - private static final int METHODID_LIST_MODEL_EVALUATIONS = 12; - private static final int METHODID_GET_MODEL_EVALUATION_SLICE = 13; - private static final int METHODID_LIST_MODEL_EVALUATION_SLICES = 14; + private static final int METHODID_BATCH_IMPORT_MODEL_EVALUATION_SLICES = 11; + private static final int METHODID_GET_MODEL_EVALUATION = 12; + private static final int METHODID_LIST_MODEL_EVALUATIONS = 13; + private static final int METHODID_GET_MODEL_EVALUATION_SLICE = 14; + private static final int METHODID_LIST_MODEL_EVALUATION_SLICES = 15; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1947,6 +2075,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_BATCH_IMPORT_MODEL_EVALUATION_SLICES: + serviceImpl.batchImportModelEvaluationSlices( + (com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse>) + responseObserver); + break; case METHODID_GET_MODEL_EVALUATION: serviceImpl.getModelEvaluation( (com.google.cloud.aiplatform.v1beta1.GetModelEvaluationRequest) request, @@ -2049,6 +2184,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getMergeVersionAliasesMethod()) .addMethod(getExportModelMethod()) .addMethod(getImportModelEvaluationMethod()) + .addMethod(getBatchImportModelEvaluationSlicesMethod()) .addMethod(getGetModelEvaluationMethod()) .addMethod(getListModelEvaluationsMethod()) .addMethod(getGetModelEvaluationSliceMethod()) diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesRequest.java new file mode 100644 index 000000000000..7e7a1fbdb1ad --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesRequest.java @@ -0,0 +1,1241 @@ +/* + * 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest} + */ +public final class BatchImportModelEvaluationSlicesRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest) + BatchImportModelEvaluationSlicesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchImportModelEvaluationSlicesRequest.newBuilder() to construct. + private BatchImportModelEvaluationSlicesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchImportModelEvaluationSlicesRequest() { + parent_ = ""; + modelEvaluationSlices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchImportModelEvaluationSlicesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchImportModelEvaluationSlicesRequest( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + modelEvaluationSlices_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + modelEvaluationSlices_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.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)) { + modelEvaluationSlices_ = java.util.Collections.unmodifiableList(modelEvaluationSlices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest.class, + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the parent ModelEvaluation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * 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 name of the parent ModelEvaluation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * 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 MODEL_EVALUATION_SLICES_FIELD_NUMBER = 2; + private java.util.List + modelEvaluationSlices_; + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getModelEvaluationSlicesList() { + return modelEvaluationSlices_; + } + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getModelEvaluationSlicesOrBuilderList() { + return modelEvaluationSlices_; + } + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getModelEvaluationSlicesCount() { + return modelEvaluationSlices_.size(); + } + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice getModelEvaluationSlices(int index) { + return modelEvaluationSlices_.get(index); + } + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder + getModelEvaluationSlicesOrBuilder(int index) { + return modelEvaluationSlices_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < modelEvaluationSlices_.size(); i++) { + output.writeMessage(2, modelEvaluationSlices_.get(i)); + } + 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_); + } + for (int i = 0; i < modelEvaluationSlices_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, modelEvaluationSlices_.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.v1.BatchImportModelEvaluationSlicesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest other = + (com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getModelEvaluationSlicesList().equals(other.getModelEvaluationSlicesList())) 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 (getModelEvaluationSlicesCount() > 0) { + hash = (37 * hash) + MODEL_EVALUATION_SLICES_FIELD_NUMBER; + hash = (53 * hash) + getModelEvaluationSlicesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest 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.v1.BatchImportModelEvaluationSlicesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest 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.v1.BatchImportModelEvaluationSlicesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest 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.v1.BatchImportModelEvaluationSlicesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest + 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.v1.BatchImportModelEvaluationSlicesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest 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.v1.BatchImportModelEvaluationSlicesRequest 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 [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest) + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest.class, + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getModelEvaluationSlicesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (modelEvaluationSlicesBuilder_ == null) { + modelEvaluationSlices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + modelEvaluationSlicesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest build() { + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest buildPartial() { + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest result = + new com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (modelEvaluationSlicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + modelEvaluationSlices_ = java.util.Collections.unmodifiableList(modelEvaluationSlices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.modelEvaluationSlices_ = modelEvaluationSlices_; + } else { + result.modelEvaluationSlices_ = modelEvaluationSlicesBuilder_.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.v1.BatchImportModelEvaluationSlicesRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest other) { + if (other + == com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (modelEvaluationSlicesBuilder_ == null) { + if (!other.modelEvaluationSlices_.isEmpty()) { + if (modelEvaluationSlices_.isEmpty()) { + modelEvaluationSlices_ = other.modelEvaluationSlices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.addAll(other.modelEvaluationSlices_); + } + onChanged(); + } + } else { + if (!other.modelEvaluationSlices_.isEmpty()) { + if (modelEvaluationSlicesBuilder_.isEmpty()) { + modelEvaluationSlicesBuilder_.dispose(); + modelEvaluationSlicesBuilder_ = null; + modelEvaluationSlices_ = other.modelEvaluationSlices_; + bitField0_ = (bitField0_ & ~0x00000001); + modelEvaluationSlicesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getModelEvaluationSlicesFieldBuilder() + : null; + } else { + modelEvaluationSlicesBuilder_.addAllMessages(other.modelEvaluationSlices_); + } + } + } + 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.v1.BatchImportModelEvaluationSlicesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the parent ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * 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 name of the parent ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * 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 name of the parent ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * 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 name of the parent ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * 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 name of the parent ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * 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 java.util.List + modelEvaluationSlices_ = java.util.Collections.emptyList(); + + private void ensureModelEvaluationSlicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + modelEvaluationSlices_ = + new java.util.ArrayList( + modelEvaluationSlices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelEvaluationSlice, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder, + com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder> + modelEvaluationSlicesBuilder_; + + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getModelEvaluationSlicesList() { + if (modelEvaluationSlicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(modelEvaluationSlices_); + } else { + return modelEvaluationSlicesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getModelEvaluationSlicesCount() { + if (modelEvaluationSlicesBuilder_ == null) { + return modelEvaluationSlices_.size(); + } else { + return modelEvaluationSlicesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice getModelEvaluationSlices(int index) { + if (modelEvaluationSlicesBuilder_ == null) { + return modelEvaluationSlices_.get(index); + } else { + return modelEvaluationSlicesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModelEvaluationSlices( + int index, com.google.cloud.aiplatform.v1.ModelEvaluationSlice value) { + if (modelEvaluationSlicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.set(index, value); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModelEvaluationSlices( + int index, com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder builderForValue) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.set(index, builderForValue.build()); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addModelEvaluationSlices( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice value) { + if (modelEvaluationSlicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.add(value); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addModelEvaluationSlices( + int index, com.google.cloud.aiplatform.v1.ModelEvaluationSlice value) { + if (modelEvaluationSlicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.add(index, value); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addModelEvaluationSlices( + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder builderForValue) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.add(builderForValue.build()); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addModelEvaluationSlices( + int index, com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder builderForValue) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.add(index, builderForValue.build()); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllModelEvaluationSlices( + java.lang.Iterable values) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, modelEvaluationSlices_); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearModelEvaluationSlices() { + if (modelEvaluationSlicesBuilder_ == null) { + modelEvaluationSlices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeModelEvaluationSlices(int index) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.remove(index); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder + getModelEvaluationSlicesBuilder(int index) { + return getModelEvaluationSlicesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder + getModelEvaluationSlicesOrBuilder(int index) { + if (modelEvaluationSlicesBuilder_ == null) { + return modelEvaluationSlices_.get(index); + } else { + return modelEvaluationSlicesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getModelEvaluationSlicesOrBuilderList() { + if (modelEvaluationSlicesBuilder_ != null) { + return modelEvaluationSlicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(modelEvaluationSlices_); + } + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder + addModelEvaluationSlicesBuilder() { + return getModelEvaluationSlicesFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.ModelEvaluationSlice.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder + addModelEvaluationSlicesBuilder(int index) { + return getModelEvaluationSlicesFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1.ModelEvaluationSlice.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getModelEvaluationSlicesBuilderList() { + return getModelEvaluationSlicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelEvaluationSlice, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder, + com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder> + getModelEvaluationSlicesFieldBuilder() { + if (modelEvaluationSlicesBuilder_ == null) { + modelEvaluationSlicesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.ModelEvaluationSlice, + com.google.cloud.aiplatform.v1.ModelEvaluationSlice.Builder, + com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder>( + modelEvaluationSlices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + modelEvaluationSlices_ = null; + } + return modelEvaluationSlicesBuilder_; + } + + @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.v1.BatchImportModelEvaluationSlicesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest) + private static final com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest(); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchImportModelEvaluationSlicesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchImportModelEvaluationSlicesRequest(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.v1.BatchImportModelEvaluationSlicesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesRequestOrBuilder.java new file mode 100644 index 000000000000..91889cab5154 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface BatchImportModelEvaluationSlicesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent ModelEvaluation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the parent ModelEvaluation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getModelEvaluationSlicesList(); + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.ModelEvaluationSlice getModelEvaluationSlices(int index); + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getModelEvaluationSlicesCount(); + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getModelEvaluationSlicesOrBuilderList(); + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.ModelEvaluationSliceOrBuilder getModelEvaluationSlicesOrBuilder( + int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesResponse.java new file mode 100644 index 000000000000..0becd4cde728 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesResponse.java @@ -0,0 +1,788 @@ +/* + * 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse} + */ +public final class BatchImportModelEvaluationSlicesResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse) + BatchImportModelEvaluationSlicesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchImportModelEvaluationSlicesResponse.newBuilder() to construct. + private BatchImportModelEvaluationSlicesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchImportModelEvaluationSlicesResponse() { + importedModelEvaluationSlices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchImportModelEvaluationSlicesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchImportModelEvaluationSlicesResponse( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + importedModelEvaluationSlices_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + importedModelEvaluationSlices_.add(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)) { + importedModelEvaluationSlices_ = importedModelEvaluationSlices_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse.class, + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse.Builder.class); + } + + public static final int IMPORTED_MODEL_EVALUATION_SLICES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList importedModelEvaluationSlices_; + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the importedModelEvaluationSlices. + */ + public com.google.protobuf.ProtocolStringList getImportedModelEvaluationSlicesList() { + return importedModelEvaluationSlices_; + } + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of importedModelEvaluationSlices. + */ + public int getImportedModelEvaluationSlicesCount() { + return importedModelEvaluationSlices_.size(); + } + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The importedModelEvaluationSlices at the given index. + */ + public java.lang.String getImportedModelEvaluationSlices(int index) { + return importedModelEvaluationSlices_.get(index); + } + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the importedModelEvaluationSlices at the given index. + */ + public com.google.protobuf.ByteString getImportedModelEvaluationSlicesBytes(int index) { + return importedModelEvaluationSlices_.getByteString(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 < importedModelEvaluationSlices_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 1, importedModelEvaluationSlices_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < importedModelEvaluationSlices_.size(); i++) { + dataSize += computeStringSizeNoTag(importedModelEvaluationSlices_.getRaw(i)); + } + size += dataSize; + size += 1 * getImportedModelEvaluationSlicesList().size(); + } + 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.v1.BatchImportModelEvaluationSlicesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse other = + (com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse) obj; + + if (!getImportedModelEvaluationSlicesList() + .equals(other.getImportedModelEvaluationSlicesList())) 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 (getImportedModelEvaluationSlicesCount() > 0) { + hash = (37 * hash) + IMPORTED_MODEL_EVALUATION_SLICES_FIELD_NUMBER; + hash = (53 * hash) + getImportedModelEvaluationSlicesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse 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.v1.BatchImportModelEvaluationSlicesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse 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.v1.BatchImportModelEvaluationSlicesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse 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.v1.BatchImportModelEvaluationSlicesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse + 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.v1.BatchImportModelEvaluationSlicesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse 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.v1.BatchImportModelEvaluationSlicesResponse 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 [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse) + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse.class, + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse.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(); + importedModelEvaluationSlices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse build() { + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse buildPartial() { + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse result = + new com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + importedModelEvaluationSlices_ = importedModelEvaluationSlices_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.importedModelEvaluationSlices_ = importedModelEvaluationSlices_; + 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.v1.BatchImportModelEvaluationSlicesResponse) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse other) { + if (other + == com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse + .getDefaultInstance()) return this; + if (!other.importedModelEvaluationSlices_.isEmpty()) { + if (importedModelEvaluationSlices_.isEmpty()) { + importedModelEvaluationSlices_ = other.importedModelEvaluationSlices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureImportedModelEvaluationSlicesIsMutable(); + importedModelEvaluationSlices_.addAll(other.importedModelEvaluationSlices_); + } + 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.v1.BatchImportModelEvaluationSlicesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList importedModelEvaluationSlices_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureImportedModelEvaluationSlicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + importedModelEvaluationSlices_ = + new com.google.protobuf.LazyStringArrayList(importedModelEvaluationSlices_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the importedModelEvaluationSlices. + */ + public com.google.protobuf.ProtocolStringList getImportedModelEvaluationSlicesList() { + return importedModelEvaluationSlices_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of importedModelEvaluationSlices. + */ + public int getImportedModelEvaluationSlicesCount() { + return importedModelEvaluationSlices_.size(); + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The importedModelEvaluationSlices at the given index. + */ + public java.lang.String getImportedModelEvaluationSlices(int index) { + return importedModelEvaluationSlices_.get(index); + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the importedModelEvaluationSlices at the given index. + */ + public com.google.protobuf.ByteString getImportedModelEvaluationSlicesBytes(int index) { + return importedModelEvaluationSlices_.getByteString(index); + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The importedModelEvaluationSlices to set. + * @return This builder for chaining. + */ + public Builder setImportedModelEvaluationSlices(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportedModelEvaluationSlicesIsMutable(); + importedModelEvaluationSlices_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The importedModelEvaluationSlices to add. + * @return This builder for chaining. + */ + public Builder addImportedModelEvaluationSlices(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportedModelEvaluationSlicesIsMutable(); + importedModelEvaluationSlices_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The importedModelEvaluationSlices to add. + * @return This builder for chaining. + */ + public Builder addAllImportedModelEvaluationSlices( + java.lang.Iterable values) { + ensureImportedModelEvaluationSlicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, importedModelEvaluationSlices_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearImportedModelEvaluationSlices() { + importedModelEvaluationSlices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the importedModelEvaluationSlices to add. + * @return This builder for chaining. + */ + public Builder addImportedModelEvaluationSlicesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureImportedModelEvaluationSlicesIsMutable(); + importedModelEvaluationSlices_.add(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.v1.BatchImportModelEvaluationSlicesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse) + private static final com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse(); + } + + public static com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchImportModelEvaluationSlicesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchImportModelEvaluationSlicesResponse(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.v1.BatchImportModelEvaluationSlicesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesResponseOrBuilder.java new file mode 100644 index 000000000000..660e3470967b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchImportModelEvaluationSlicesResponseOrBuilder.java @@ -0,0 +1,84 @@ +/* + * 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/v1/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface BatchImportModelEvaluationSlicesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the importedModelEvaluationSlices. + */ + java.util.List getImportedModelEvaluationSlicesList(); + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of importedModelEvaluationSlices. + */ + int getImportedModelEvaluationSlicesCount(); + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The importedModelEvaluationSlices at the given index. + */ + java.lang.String getImportedModelEvaluationSlices(int index); + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the importedModelEvaluationSlices at the given index. + */ + com.google.protobuf.ByteString getImportedModelEvaluationSlicesBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJob.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJob.java index ce65e5707cee..000344ab478c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJob.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJob.java @@ -44,6 +44,7 @@ private BatchPredictionJob() { name_ = ""; displayName_ = ""; model_ = ""; + modelVersionId_ = ""; state_ = 0; partialFailures_ = java.util.Collections.emptyList(); } @@ -390,6 +391,13 @@ private BatchPredictionJob( unmanagedContainerModel_ = subBuilder.buildPartial(); } + break; + } + case 242: + { + java.lang.String s = input.readStringRequireUtf8(); + + modelVersionId_ = s; break; } default: @@ -5458,6 +5466,55 @@ public com.google.protobuf.ByteString getModelBytes() { } } + public static final int MODEL_VERSION_ID_FIELD_NUMBER = 30; + private volatile java.lang.Object modelVersionId_; + /** + * + * + *
+   * Output only. The version ID of the Model that produces the predictions via this job.
+   * 
+ * + * string model_version_id = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + @java.lang.Override + public java.lang.String getModelVersionId() { + java.lang.Object ref = modelVersionId_; + 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(); + modelVersionId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The version ID of the Model that produces the predictions via this job.
+   * 
+ * + * string model_version_id = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelVersionIdBytes() { + java.lang.Object ref = modelVersionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int UNMANAGED_CONTAINER_MODEL_FIELD_NUMBER = 28; private com.google.cloud.aiplatform.v1.UnmanagedContainerModel unmanagedContainerModel_; /** @@ -6741,6 +6798,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (unmanagedContainerModel_ != null) { output.writeMessage(28, getUnmanagedContainerModel()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 30, modelVersionId_); + } unknownFields.writeTo(output); } @@ -6830,6 +6890,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 28, getUnmanagedContainerModel()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(30, modelVersionId_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -6849,6 +6912,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (!getModel().equals(other.getModel())) return false; + if (!getModelVersionId().equals(other.getModelVersionId())) return false; if (hasUnmanagedContainerModel() != other.hasUnmanagedContainerModel()) return false; if (hasUnmanagedContainerModel()) { if (!getUnmanagedContainerModel().equals(other.getUnmanagedContainerModel())) return false; @@ -6935,6 +6999,8 @@ public int hashCode() { hash = (53 * hash) + getDisplayName().hashCode(); hash = (37 * hash) + MODEL_FIELD_NUMBER; hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + MODEL_VERSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getModelVersionId().hashCode(); if (hasUnmanagedContainerModel()) { hash = (37 * hash) + UNMANAGED_CONTAINER_MODEL_FIELD_NUMBER; hash = (53 * hash) + getUnmanagedContainerModel().hashCode(); @@ -7187,6 +7253,8 @@ public Builder clear() { model_ = ""; + modelVersionId_ = ""; + if (unmanagedContainerModelBuilder_ == null) { unmanagedContainerModel_ = null; } else { @@ -7325,6 +7393,7 @@ public com.google.cloud.aiplatform.v1.BatchPredictionJob buildPartial() { result.name_ = name_; result.displayName_ = displayName_; result.model_ = model_; + result.modelVersionId_ = modelVersionId_; if (unmanagedContainerModelBuilder_ == null) { result.unmanagedContainerModel_ = unmanagedContainerModel_; } else { @@ -7480,6 +7549,10 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.BatchPredictionJob other model_ = other.model_; onChanged(); } + if (!other.getModelVersionId().isEmpty()) { + modelVersionId_ = other.modelVersionId_; + onChanged(); + } if (other.hasUnmanagedContainerModel()) { mergeUnmanagedContainerModel(other.getUnmanagedContainerModel()); } @@ -7942,6 +8015,112 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object modelVersionId_ = ""; + /** + * + * + *
+     * Output only. The version ID of the Model that produces the predictions via this job.
+     * 
+ * + * string model_version_id = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + public java.lang.String getModelVersionId() { + java.lang.Object ref = modelVersionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelVersionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The version ID of the Model that produces the predictions via this job.
+     * 
+ * + * string model_version_id = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + public com.google.protobuf.ByteString getModelVersionIdBytes() { + java.lang.Object ref = modelVersionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The version ID of the Model that produces the predictions via this job.
+     * 
+ * + * string model_version_id = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The modelVersionId to set. + * @return This builder for chaining. + */ + public Builder setModelVersionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + modelVersionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The version ID of the Model that produces the predictions via this job.
+     * 
+ * + * string model_version_id = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearModelVersionId() { + + modelVersionId_ = getDefaultInstance().getModelVersionId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The version ID of the Model that produces the predictions via this job.
+     * 
+ * + * string model_version_id = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for modelVersionId to set. + * @return This builder for chaining. + */ + public Builder setModelVersionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + modelVersionId_ = value; + onChanged(); + return this; + } + private com.google.cloud.aiplatform.v1.UnmanagedContainerModel unmanagedContainerModel_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.aiplatform.v1.UnmanagedContainerModel, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobOrBuilder.java index dfba864eec8e..de5e7aa22b72 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobOrBuilder.java @@ -110,6 +110,31 @@ public interface BatchPredictionJobOrBuilder */ com.google.protobuf.ByteString getModelBytes(); + /** + * + * + *
+   * Output only. The version ID of the Model that produces the predictions via this job.
+   * 
+ * + * string model_version_id = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + java.lang.String getModelVersionId(); + /** + * + * + *
+   * Output only. The version ID of the Model that produces the predictions via this job.
+   * 
+ * + * string model_version_id = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + com.google.protobuf.ByteString getModelVersionIdBytes(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobProto.java index 0cf78fe78c14..6f76ca91129b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/BatchPredictionJobProto.java @@ -71,68 +71,69 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "rs.proto\032:google/cloud/aiplatform/v1/unm" + "anaged_container_model.proto\032\034google/pro" + "tobuf/struct.proto\032\037google/protobuf/time" - + "stamp.proto\032\027google/rpc/status.proto\"\232\021\n" + + "stamp.proto\032\027google/rpc/status.proto\"\271\021\n" + "\022BatchPredictionJob\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031" + "\n\014display_name\030\002 \001(\tB\003\340A\002\0223\n\005model\030\003 \001(\t" - + "B$\372A!\n\037aiplatform.googleapis.com/Model\022V" - + "\n\031unmanaged_container_model\030\034 \001(\01323.goog" - + "le.cloud.aiplatform.v1.UnmanagedContaine" - + "rModel\022U\n\014input_config\030\004 \001(\0132:.google.cl" - + "oud.aiplatform.v1.BatchPredictionJob.Inp" - + "utConfigB\003\340A\002\0220\n\020model_parameters\030\005 \001(\0132" - + "\026.google.protobuf.Value\022W\n\routput_config" - + "\030\006 \001(\0132;.google.cloud.aiplatform.v1.Batc" - + "hPredictionJob.OutputConfigB\003\340A\002\022P\n\023dedi" - + "cated_resources\030\007 \001(\01323.google.cloud.aip" - + "latform.v1.BatchDedicatedResources\022d\n\036ma" - + "nual_batch_tuning_parameters\030\010 \001(\01327.goo" - + "gle.cloud.aiplatform.v1.ManualBatchTunin" - + "gParametersB\003\340A\005\022\034\n\024generate_explanation" - + "\030\027 \001(\010\022E\n\020explanation_spec\030\031 \001(\0132+.googl" - + "e.cloud.aiplatform.v1.ExplanationSpec\022S\n" - + "\013output_info\030\t \001(\01329.google.cloud.aiplat" - + "form.v1.BatchPredictionJob.OutputInfoB\003\340" - + "A\003\0228\n\005state\030\n \001(\0162$.google.cloud.aiplatf" - + "orm.v1.JobStateB\003\340A\003\022&\n\005error\030\013 \001(\0132\022.go" - + "ogle.rpc.StatusB\003\340A\003\0221\n\020partial_failures" - + "\030\014 \003(\0132\022.google.rpc.StatusB\003\340A\003\022N\n\022resou" - + "rces_consumed\030\r \001(\0132-.google.cloud.aipla" - + "tform.v1.ResourcesConsumedB\003\340A\003\022J\n\020compl" - + "etion_stats\030\016 \001(\0132+.google.cloud.aiplatf" - + "orm.v1.CompletionStatsB\003\340A\003\0224\n\013create_ti" - + "me\030\017 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\0223\n\nstart_time\030\020 \001(\0132\032.google.protobuf." - + "TimestampB\003\340A\003\0221\n\010end_time\030\021 \001(\0132\032.googl" - + "e.protobuf.TimestampB\003\340A\003\0224\n\013update_time" - + "\030\022 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" - + "J\n\006labels\030\023 \003(\0132:.google.cloud.aiplatfor" - + "m.v1.BatchPredictionJob.LabelsEntry\022C\n\017e" - + "ncryption_spec\030\030 \001(\0132*.google.cloud.aipl" - + "atform.v1.EncryptionSpec\032\272\001\n\013InputConfig" - + "\022;\n\ngcs_source\030\002 \001(\0132%.google.cloud.aipl" - + "atform.v1.GcsSourceH\000\022E\n\017bigquery_source" - + "\030\003 \001(\0132*.google.cloud.aiplatform.v1.BigQ" - + "uerySourceH\000\022\035\n\020instances_format\030\001 \001(\tB\003" - + "\340A\002B\010\n\006source\032\326\001\n\014OutputConfig\022E\n\017gcs_de" - + "stination\030\002 \001(\0132*.google.cloud.aiplatfor" - + "m.v1.GcsDestinationH\000\022O\n\024bigquery_destin" - + "ation\030\003 \001(\0132/.google.cloud.aiplatform.v1" - + ".BigQueryDestinationH\000\022\037\n\022predictions_fo" - + "rmat\030\001 \001(\tB\003\340A\002B\r\n\013destination\032\220\001\n\nOutpu" - + "tInfo\022#\n\024gcs_output_directory\030\001 \001(\tB\003\340A\003" - + "H\000\022&\n\027bigquery_output_dataset\030\002 \001(\tB\003\340A\003" - + "H\000\022\"\n\025bigquery_output_table\030\004 \001(\tB\003\340A\003B\021" - + "\n\017output_location\032-\n\013LabelsEntry\022\013\n\003key\030" - + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\206\001\352A\202\001\n,aiplatf" - + "orm.googleapis.com/BatchPredictionJob\022Rp" - + "rojects/{project}/locations/{location}/b" - + "atchPredictionJobs/{batch_prediction_job" - + "}B\333\001\n\036com.google.cloud.aiplatform.v1B\027Ba" - + "tchPredictionJobProtoP\001ZDgoogle.golang.o" - + "rg/genproto/googleapis/cloud/aiplatform/" - + "v1;aiplatform\252\002\032Google.Cloud.AIPlatform." - + "V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google" - + "::Cloud::AIPlatform::V1b\006proto3" + + "B$\372A!\n\037aiplatform.googleapis.com/Model\022\035" + + "\n\020model_version_id\030\036 \001(\tB\003\340A\003\022V\n\031unmanag" + + "ed_container_model\030\034 \001(\01323.google.cloud." + + "aiplatform.v1.UnmanagedContainerModel\022U\n" + + "\014input_config\030\004 \001(\0132:.google.cloud.aipla" + + "tform.v1.BatchPredictionJob.InputConfigB" + + "\003\340A\002\0220\n\020model_parameters\030\005 \001(\0132\026.google." + + "protobuf.Value\022W\n\routput_config\030\006 \001(\0132;." + + "google.cloud.aiplatform.v1.BatchPredicti" + + "onJob.OutputConfigB\003\340A\002\022P\n\023dedicated_res" + + "ources\030\007 \001(\01323.google.cloud.aiplatform.v" + + "1.BatchDedicatedResources\022d\n\036manual_batc" + + "h_tuning_parameters\030\010 \001(\01327.google.cloud" + + ".aiplatform.v1.ManualBatchTuningParamete" + + "rsB\003\340A\005\022\034\n\024generate_explanation\030\027 \001(\010\022E\n" + + "\020explanation_spec\030\031 \001(\0132+.google.cloud.a" + + "iplatform.v1.ExplanationSpec\022S\n\013output_i" + + "nfo\030\t \001(\01329.google.cloud.aiplatform.v1.B" + + "atchPredictionJob.OutputInfoB\003\340A\003\0228\n\005sta" + + "te\030\n \001(\0162$.google.cloud.aiplatform.v1.Jo" + + "bStateB\003\340A\003\022&\n\005error\030\013 \001(\0132\022.google.rpc." + + "StatusB\003\340A\003\0221\n\020partial_failures\030\014 \003(\0132\022." + + "google.rpc.StatusB\003\340A\003\022N\n\022resources_cons" + + "umed\030\r \001(\0132-.google.cloud.aiplatform.v1." + + "ResourcesConsumedB\003\340A\003\022J\n\020completion_sta" + + "ts\030\016 \001(\0132+.google.cloud.aiplatform.v1.Co" + + "mpletionStatsB\003\340A\003\0224\n\013create_time\030\017 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\0223\n\nstar" + + "t_time\030\020 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\0221\n\010end_time\030\021 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\0224\n\013update_time\030\022 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\022J\n\006labels" + + "\030\023 \003(\0132:.google.cloud.aiplatform.v1.Batc" + + "hPredictionJob.LabelsEntry\022C\n\017encryption" + + "_spec\030\030 \001(\0132*.google.cloud.aiplatform.v1" + + ".EncryptionSpec\032\272\001\n\013InputConfig\022;\n\ngcs_s" + + "ource\030\002 \001(\0132%.google.cloud.aiplatform.v1" + + ".GcsSourceH\000\022E\n\017bigquery_source\030\003 \001(\0132*." + + "google.cloud.aiplatform.v1.BigQuerySourc" + + "eH\000\022\035\n\020instances_format\030\001 \001(\tB\003\340A\002B\010\n\006so" + + "urce\032\326\001\n\014OutputConfig\022E\n\017gcs_destination" + + "\030\002 \001(\0132*.google.cloud.aiplatform.v1.GcsD" + + "estinationH\000\022O\n\024bigquery_destination\030\003 \001" + + "(\0132/.google.cloud.aiplatform.v1.BigQuery" + + "DestinationH\000\022\037\n\022predictions_format\030\001 \001(" + + "\tB\003\340A\002B\r\n\013destination\032\220\001\n\nOutputInfo\022#\n\024" + + "gcs_output_directory\030\001 \001(\tB\003\340A\003H\000\022&\n\027big" + + "query_output_dataset\030\002 \001(\tB\003\340A\003H\000\022\"\n\025big" + + "query_output_table\030\004 \001(\tB\003\340A\003B\021\n\017output_" + + "location\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + + "value\030\002 \001(\t:\0028\001:\206\001\352A\202\001\n,aiplatform.googl" + + "eapis.com/BatchPredictionJob\022Rprojects/{" + + "project}/locations/{location}/batchPredi" + + "ctionJobs/{batch_prediction_job}B\333\001\n\036com" + + ".google.cloud.aiplatform.v1B\027BatchPredic" + + "tionJobProtoP\001ZDgoogle.golang.org/genpro" + + "to/googleapis/cloud/aiplatform/v1;aiplat" + + "form\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Goog" + + "le\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::" + + "AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -161,6 +162,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "DisplayName", "Model", + "ModelVersionId", "UnmanagedContainerModel", "InputConfig", "ModelParameters", diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModel.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModel.java index 5ad47d0a2976..2654eab2de9f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModel.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModel.java @@ -40,6 +40,7 @@ private DeployedModel(com.google.protobuf.GeneratedMessageV3.Builder builder) private DeployedModel() { id_ = ""; model_ = ""; + modelVersionId_ = ""; displayName_ = ""; serviceAccount_ = ""; } @@ -198,6 +199,13 @@ private DeployedModel( disableContainerLogging_ = input.readBool(); break; } + case 146: + { + java.lang.String s = input.readStringRequireUtf8(); + + modelVersionId_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -503,6 +511,55 @@ public com.google.protobuf.ByteString getModelBytes() { } } + public static final int MODEL_VERSION_ID_FIELD_NUMBER = 18; + private volatile java.lang.Object modelVersionId_; + /** + * + * + *
+   * Output only. The version ID of the model that is deployed.
+   * 
+ * + * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + @java.lang.Override + public java.lang.String getModelVersionId() { + java.lang.Object ref = modelVersionId_; + 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(); + modelVersionId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The version ID of the model that is deployed.
+   * 
+ * + * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelVersionIdBytes() { + java.lang.Object ref = modelVersionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; private volatile java.lang.Object displayName_; /** @@ -885,6 +942,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (disableContainerLogging_ != false) { output.writeBool(15, disableContainerLogging_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, modelVersionId_); + } unknownFields.writeTo(output); } @@ -931,6 +991,9 @@ public int getSerializedSize() { if (disableContainerLogging_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, disableContainerLogging_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, modelVersionId_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -949,6 +1012,7 @@ public boolean equals(final java.lang.Object obj) { if (!getId().equals(other.getId())) return false; if (!getModel().equals(other.getModel())) return false; + if (!getModelVersionId().equals(other.getModelVersionId())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { @@ -991,6 +1055,8 @@ public int hashCode() { hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + MODEL_FIELD_NUMBER; hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + MODEL_VERSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getModelVersionId().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); if (hasCreateTime()) { @@ -1172,6 +1238,8 @@ public Builder clear() { model_ = ""; + modelVersionId_ = ""; + displayName_ = ""; if (createTimeBuilder_ == null) { @@ -1243,6 +1311,7 @@ public com.google.cloud.aiplatform.v1.DeployedModel buildPartial() { } result.id_ = id_; result.model_ = model_; + result.modelVersionId_ = modelVersionId_; result.displayName_ = displayName_; if (createTimeBuilder_ == null) { result.createTime_ = createTime_; @@ -1320,6 +1389,10 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeployedModel other) { model_ = other.model_; onChanged(); } + if (!other.getModelVersionId().isEmpty()) { + modelVersionId_ = other.modelVersionId_; + onChanged(); + } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; onChanged(); @@ -2097,6 +2170,112 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object modelVersionId_ = ""; + /** + * + * + *
+     * Output only. The version ID of the model that is deployed.
+     * 
+ * + * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + public java.lang.String getModelVersionId() { + java.lang.Object ref = modelVersionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelVersionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The version ID of the model that is deployed.
+     * 
+ * + * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + public com.google.protobuf.ByteString getModelVersionIdBytes() { + java.lang.Object ref = modelVersionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The version ID of the model that is deployed.
+     * 
+ * + * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The modelVersionId to set. + * @return This builder for chaining. + */ + public Builder setModelVersionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + modelVersionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The version ID of the model that is deployed.
+     * 
+ * + * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearModelVersionId() { + + modelVersionId_ = getDefaultInstance().getModelVersionId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The version ID of the model that is deployed.
+     * 
+ * + * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for modelVersionId to set. + * @return This builder for chaining. + */ + public Builder setModelVersionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + modelVersionId_ = value; + onChanged(); + return this; + } + private java.lang.Object displayName_ = ""; /** * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelOrBuilder.java index 8dc11d20fc9b..8cca8035fc45 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedModelOrBuilder.java @@ -163,6 +163,31 @@ public interface DeployedModelOrBuilder */ com.google.protobuf.ByteString getModelBytes(); + /** + * + * + *
+   * Output only. The version ID of the model that is deployed.
+   * 
+ * + * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + java.lang.String getModelVersionId(); + /** + * + * + *
+   * Output only. The version ID of the model that is deployed.
+   * 
+ * + * string model_version_id = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + com.google.protobuf.ByteString getModelVersionIdBytes(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java index a7659d473a27..1b6883c9c0f4 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointProto.java @@ -93,35 +93,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\005:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + "value\030\002 \001(\t:\0028\001:e\352Ab\n\"aiplatform.googlea" + "pis.com/Endpoint\022/v1/{name=projects/*/locations/*/models" - + "/*}:mergeVersionAliases:\001*\332A\024name,versio" - + "n_aliases\022\346\001\n\013ExportModel\022..google.cloud" - + ".aiplatform.v1.ExportModelRequest\032\035.goog" - + "le.longrunning.Operation\"\207\001\202\323\344\223\0026\"1/v1/{" - + "name=projects/*/locations/*/models/*}:ex" - + "port:\001*\332A\022name,output_config\312A3\n\023ExportM" - + "odelResponse\022\034ExportModelOperationMetada" - + "ta\022\344\001\n\025ImportModelEvaluation\0228.google.cl" - + "oud.aiplatform.v1.ImportModelEvaluationR" - + "equest\032+.google.cloud.aiplatform.v1.Mode" - + "lEvaluation\"d\202\323\344\223\002D\"?/v1/{parent=project" - + "s/*/locations/*/models/*}/evaluations:im" - + "port:\001*\332A\027parent,model_evaluation\022\301\001\n\022Ge" - + "tModelEvaluation\0225.google.cloud.aiplatfo" - + "rm.v1.GetModelEvaluationRequest\032+.google" - + ".cloud.aiplatform.v1.ModelEvaluation\"G\202\323" - + "\344\223\002:\0228/v1/{name=projects/*/locations/*/m" - + "odels/*/evaluations/*}\332A\004name\022\324\001\n\024ListMo" - + "delEvaluations\0227.google.cloud.aiplatform" - + ".v1.ListModelEvaluationsRequest\0328.google" - + ".cloud.aiplatform.v1.ListModelEvaluation" - + "sResponse\"I\202\323\344\223\002:\0228/v1/{parent=projects/" - + "*/locations/*/models/*}/evaluations\332A\006pa" - + "rent\022\331\001\n\027GetModelEvaluationSlice\022:.googl" - + "e.cloud.aiplatform.v1.GetModelEvaluation" - + "SliceRequest\0320.google.cloud.aiplatform.v" - + "1.ModelEvaluationSlice\"P\202\323\344\223\002C\022A/v1/{nam" - + "e=projects/*/locations/*/models/*/evalua" - + "tions/*/slices/*}\332A\004name\022\354\001\n\031ListModelEv" - + "aluationSlices\022<.google.cloud.aiplatform" - + ".v1.ListModelEvaluationSlicesRequest\032=.g" - + "oogle.cloud.aiplatform.v1.ListModelEvalu" - + "ationSlicesResponse\"R\202\323\344\223\002C\022A/v1/{parent" + + "ionSliceB\003\340A\002\"Y\n(BatchImportModelEvaluat" + + "ionSlicesResponse\022-\n imported_model_eval" + + "uation_slices\030\001 \003(\tB\003\340A\003\"\\\n\031GetModelEval" + + "uationRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aip" + + "latform.googleapis.com/ModelEvaluation\"\274" + + "\001\n\033ListModelEvaluationsRequest\0227\n\006parent" + + "\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatform.googleapis.co" + + "m/Model\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001" + + "(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(" + + "\0132\032.google.protobuf.FieldMask\"\177\n\034ListMod" + + "elEvaluationsResponse\022F\n\021model_evaluatio" + + "ns\030\001 \003(\0132+.google.cloud.aiplatform.v1.Mo" + + "delEvaluation\022\027\n\017next_page_token\030\002 \001(\t\"f" + + "\n\036GetModelEvaluationSliceRequest\022D\n\004name" + + "\030\001 \001(\tB6\340A\002\372A0\n.aiplatform.googleapis.co" + + "m/ModelEvaluationSlice\"\313\001\n ListModelEval" + + "uationSlicesRequest\022A\n\006parent\030\001 \001(\tB1\340A\002" + + "\372A+\n)aiplatform.googleapis.com/ModelEval" + + "uation\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(" + + "\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\013" + + "2\032.google.protobuf.FieldMask\"\217\001\n!ListMod" + + "elEvaluationSlicesResponse\022Q\n\027model_eval" + + "uation_slices\030\001 \003(\01320.google.cloud.aipla" + + "tform.v1.ModelEvaluationSlice\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t2\362\031\n\014ModelService\022\340\001\n\013Uplo" + + "adModel\022..google.cloud.aiplatform.v1.Upl" + + "oadModelRequest\032\035.google.longrunning.Ope" + + "ration\"\201\001\202\323\344\223\0026\"1/v1/{parent=projects/*/" + + "locations/*}/models:upload:\001*\332A\014parent,m" + + "odel\312A3\n\023UploadModelResponse\022\034UploadMode" + + "lOperationMetadata\022\225\001\n\010GetModel\022+.google" + + ".cloud.aiplatform.v1.GetModelRequest\032!.g" + + "oogle.cloud.aiplatform.v1.Model\"9\202\323\344\223\002,\022" + + "*/v1/{name=projects/*/locations/*/models" + + "/*}\332A\004name\022\250\001\n\nListModels\022-.google.cloud" + + ".aiplatform.v1.ListModelsRequest\032..googl" + + "e.cloud.aiplatform.v1.ListModelsResponse" + + "\";\202\323\344\223\002,\022*/v1/{parent=projects/*/locatio" + + "ns/*}/models\332A\006parent\022\310\001\n\021ListModelVersi" + + "ons\0224.google.cloud.aiplatform.v1.ListMod" + + "elVersionsRequest\0325.google.cloud.aiplatf" + + "orm.v1.ListModelVersionsResponse\"F\202\323\344\223\0029" + + "\0227/v1/{name=projects/*/locations/*/model" + + "s/*}:listVersions\332A\004name\022\265\001\n\013UpdateModel" + + "\022..google.cloud.aiplatform.v1.UpdateMode" + + "lRequest\032!.google.cloud.aiplatform.v1.Mo" + + "del\"S\202\323\344\223\002920/v1/{model.name=projects/*/" + + "locations/*/models/*}:\005model\332A\021model,upd" + + "ate_mask\022\312\001\n\013DeleteModel\022..google.cloud." + + "aiplatform.v1.DeleteModelRequest\032\035.googl" + + "e.longrunning.Operation\"l\202\323\344\223\002,**/v1/{na" + + "me=projects/*/locations/*/models/*}\332A\004na" + + "me\312A0\n\025google.protobuf.Empty\022\027DeleteOper" + + "ationMetadata\022\346\001\n\022DeleteModelVersion\0225.g" + + "oogle.cloud.aiplatform.v1.DeleteModelVer" + + "sionRequest\032\035.google.longrunning.Operati" + + "on\"z\202\323\344\223\002:*8/v1/{name=projects/*/locatio" + + "ns/*/models/*}:deleteVersion\332A\004name\312A0\n\025" + + "google.protobuf.Empty\022\027DeleteOperationMe" + + "tadata\022\322\001\n\023MergeVersionAliases\0226.google." + + "cloud.aiplatform.v1.MergeVersionAliasesR" + + "equest\032!.google.cloud.aiplatform.v1.Mode" + + "l\"`\202\323\344\223\002C\">/v1/{name=projects/*/location" + + "s/*/models/*}:mergeVersionAliases:\001*\332A\024n" + + "ame,version_aliases\022\346\001\n\013ExportModel\022..go" + + "ogle.cloud.aiplatform.v1.ExportModelRequ" + + "est\032\035.google.longrunning.Operation\"\207\001\202\323\344" + + "\223\0026\"1/v1/{name=projects/*/locations/*/mo" + + "dels/*}:export:\001*\332A\022name,output_config\312A" + + "3\n\023ExportModelResponse\022\034ExportModelOpera" + + "tionMetadata\022\344\001\n\025ImportModelEvaluation\0228" + + ".google.cloud.aiplatform.v1.ImportModelE" + + "valuationRequest\032+.google.cloud.aiplatfo" + + "rm.v1.ModelEvaluation\"d\202\323\344\223\002D\"?/v1/{pare" + + "nt=projects/*/locations/*/models/*}/eval" + + "uations:import:\001*\332A\027parent,model_evaluat" + + "ion\022\250\002\n BatchImportModelEvaluationSlices" + + "\022C.google.cloud.aiplatform.v1.BatchImpor" + + "tModelEvaluationSlicesRequest\032D.google.c" + + "loud.aiplatform.v1.BatchImportModelEvalu" + + "ationSlicesResponse\"y\202\323\344\223\002R\"M/v1/{parent" + "=projects/*/locations/*/models/*/evaluat" - + "ions/*}/slices\332A\006parent\032M\312A\031aiplatform.g" - + "oogleapis.com\322A.https://www.googleapis.c" - + "om/auth/cloud-platformB\325\001\n\036com.google.cl" - + "oud.aiplatform.v1B\021ModelServiceProtoP\001ZD" - + "google.golang.org/genproto/googleapis/cl" - + "oud/aiplatform/v1;aiplatform\252\002\032Google.Cl" - + "oud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatf" - + "orm\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006" - + "proto3" + + "ions/*}/slices:batchImport:\001*\332A\036parent,m" + + "odel_evaluation_slices\022\301\001\n\022GetModelEvalu" + + "ation\0225.google.cloud.aiplatform.v1.GetMo" + + "delEvaluationRequest\032+.google.cloud.aipl" + + "atform.v1.ModelEvaluation\"G\202\323\344\223\002:\0228/v1/{" + + "name=projects/*/locations/*/models/*/eva" + + "luations/*}\332A\004name\022\324\001\n\024ListModelEvaluati" + + "ons\0227.google.cloud.aiplatform.v1.ListMod" + + "elEvaluationsRequest\0328.google.cloud.aipl" + + "atform.v1.ListModelEvaluationsResponse\"I" + + "\202\323\344\223\002:\0228/v1/{parent=projects/*/locations" + + "/*/models/*}/evaluations\332A\006parent\022\331\001\n\027Ge" + + "tModelEvaluationSlice\022:.google.cloud.aip" + + "latform.v1.GetModelEvaluationSliceReques" + + "t\0320.google.cloud.aiplatform.v1.ModelEval" + + "uationSlice\"P\202\323\344\223\002C\022A/v1/{name=projects/" + + "*/locations/*/models/*/evaluations/*/sli" + + "ces/*}\332A\004name\022\354\001\n\031ListModelEvaluationSli" + + "ces\022<.google.cloud.aiplatform.v1.ListMod" + + "elEvaluationSlicesRequest\032=.google.cloud" + + ".aiplatform.v1.ListModelEvaluationSlices" + + "Response\"R\202\323\344\223\002C\022A/v1/{parent=projects/*" + + "/locations/*/models/*/evaluations/*}/sli" + + "ces\332A\006parent\032M\312A\031aiplatform.googleapis.c" + + "om\322A.https://www.googleapis.com/auth/clo" + + "ud-platformB\325\001\n\036com.google.cloud.aiplatf" + + "orm.v1B\021ModelServiceProtoP\001ZDgoogle.gola" + + "ng.org/genproto/googleapis/cloud/aiplatf" + + "orm/v1;aiplatform\252\002\032Google.Cloud.AIPlatf" + + "orm.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Go" + + "ogle::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -469,8 +491,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Parent", "ModelEvaluation", }); - internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_descriptor = + internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesRequest_descriptor = getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesRequest_descriptor, + new java.lang.String[] { + "Parent", "ModelEvaluationSlices", + }); + internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesResponse_descriptor, + new java.lang.String[] { + "ImportedModelEvaluationSlices", + }); + internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_descriptor = + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_descriptor, @@ -478,7 +516,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_descriptor, @@ -486,7 +524,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_descriptor, @@ -494,7 +532,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ModelEvaluations", "NextPageToken", }); internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_descriptor, @@ -502,7 +540,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_descriptor, @@ -510,7 +548,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponse.java index 3bd8aa8e8a06..fd565249338a 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponse.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponse.java @@ -41,6 +41,7 @@ private PredictResponse() { predictions_ = java.util.Collections.emptyList(); deployedModelId_ = ""; model_ = ""; + modelVersionId_ = ""; modelDisplayName_ = ""; } @@ -105,6 +106,13 @@ private PredictResponse( modelDisplayName_ = s; break; } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + modelVersionId_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -337,6 +345,57 @@ public com.google.protobuf.ByteString getModelBytes() { } } + public static final int MODEL_VERSION_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object modelVersionId_; + /** + * + * + *
+   * Output only. The version ID of the Model which is deployed as the DeployedModel that
+   * this prediction hits.
+   * 
+ * + * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + @java.lang.Override + public java.lang.String getModelVersionId() { + java.lang.Object ref = modelVersionId_; + 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(); + modelVersionId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The version ID of the Model which is deployed as the DeployedModel that
+   * this prediction hits.
+   * 
+ * + * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelVersionIdBytes() { + java.lang.Object ref = modelVersionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int MODEL_DISPLAY_NAME_FIELD_NUMBER = 4; private volatile java.lang.Object modelDisplayName_; /** @@ -414,6 +473,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelDisplayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, modelDisplayName_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, modelVersionId_); + } unknownFields.writeTo(output); } @@ -435,6 +497,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelDisplayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, modelDisplayName_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, modelVersionId_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -454,6 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPredictionsList().equals(other.getPredictionsList())) return false; if (!getDeployedModelId().equals(other.getDeployedModelId())) return false; if (!getModel().equals(other.getModel())) return false; + if (!getModelVersionId().equals(other.getModelVersionId())) return false; if (!getModelDisplayName().equals(other.getModelDisplayName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -474,6 +540,8 @@ public int hashCode() { hash = (53 * hash) + getDeployedModelId().hashCode(); hash = (37 * hash) + MODEL_FIELD_NUMBER; hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + MODEL_VERSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getModelVersionId().hashCode(); hash = (37 * hash) + MODEL_DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getModelDisplayName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); @@ -633,6 +701,8 @@ public Builder clear() { model_ = ""; + modelVersionId_ = ""; + modelDisplayName_ = ""; return this; @@ -674,6 +744,7 @@ public com.google.cloud.aiplatform.v1.PredictResponse buildPartial() { } result.deployedModelId_ = deployedModelId_; result.model_ = model_; + result.modelVersionId_ = modelVersionId_; result.modelDisplayName_ = modelDisplayName_; onBuilt(); return result; @@ -759,6 +830,10 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.PredictResponse other) { model_ = other.model_; onChanged(); } + if (!other.getModelVersionId().isEmpty()) { + modelVersionId_ = other.modelVersionId_; + onChanged(); + } if (!other.getModelDisplayName().isEmpty()) { modelDisplayName_ = other.modelDisplayName_; onChanged(); @@ -1439,6 +1514,117 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object modelVersionId_ = ""; + /** + * + * + *
+     * Output only. The version ID of the Model which is deployed as the DeployedModel that
+     * this prediction hits.
+     * 
+ * + * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + public java.lang.String getModelVersionId() { + java.lang.Object ref = modelVersionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelVersionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The version ID of the Model which is deployed as the DeployedModel that
+     * this prediction hits.
+     * 
+ * + * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + public com.google.protobuf.ByteString getModelVersionIdBytes() { + java.lang.Object ref = modelVersionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The version ID of the Model which is deployed as the DeployedModel that
+     * this prediction hits.
+     * 
+ * + * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The modelVersionId to set. + * @return This builder for chaining. + */ + public Builder setModelVersionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + modelVersionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The version ID of the Model which is deployed as the DeployedModel that
+     * this prediction hits.
+     * 
+ * + * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearModelVersionId() { + + modelVersionId_ = getDefaultInstance().getModelVersionId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The version ID of the Model which is deployed as the DeployedModel that
+     * this prediction hits.
+     * 
+ * + * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for modelVersionId to set. + * @return This builder for chaining. + */ + public Builder setModelVersionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + modelVersionId_ = value; + onChanged(); + return this; + } + private java.lang.Object modelDisplayName_ = ""; /** * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponseOrBuilder.java index 2c1bd226498b..023745e6eb7f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponseOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictResponseOrBuilder.java @@ -150,6 +150,33 @@ public interface PredictResponseOrBuilder */ com.google.protobuf.ByteString getModelBytes(); + /** + * + * + *
+   * Output only. The version ID of the Model which is deployed as the DeployedModel that
+   * this prediction hits.
+   * 
+ * + * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + java.lang.String getModelVersionId(); + /** + * + * + *
+   * Output only. The version ID of the Model which is deployed as the DeployedModel that
+   * this prediction hits.
+   * 
+ * + * string model_version_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + com.google.protobuf.ByteString getModelVersionIdBytes(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java index eba649594f57..61a2a23bf18c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceProto.java @@ -67,49 +67,50 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.goo" + "gleapis.com/Endpoint\022.\n\tinstances\030\002 \003(\0132" + "\026.google.protobuf.ValueB\003\340A\002\022*\n\nparamete" - + "rs\030\003 \001(\0132\026.google.protobuf.Value\"\262\001\n\017Pre" + + "rs\030\003 \001(\0132\026.google.protobuf.Value\"\321\001\n\017Pre" + "dictResponse\022+\n\013predictions\030\001 \003(\0132\026.goog" + "le.protobuf.Value\022\031\n\021deployed_model_id\030\002" + " \001(\t\0226\n\005model\030\003 \001(\tB\'\340A\003\372A!\n\037aiplatform." - + "googleapis.com/Model\022\037\n\022model_display_na" - + "me\030\004 \001(\tB\003\340A\003\"z\n\021RawPredictRequest\022<\n\010en" - + "dpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googlea" - + "pis.com/Endpoint\022\'\n\thttp_body\030\002 \001(\0132\024.go" - + "ogle.api.HttpBody\"\235\002\n\016ExplainRequest\022<\n\010" - + "endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googl" - + "eapis.com/Endpoint\022.\n\tinstances\030\002 \003(\0132\026." - + "google.protobuf.ValueB\003\340A\002\022*\n\nparameters" - + "\030\004 \001(\0132\026.google.protobuf.Value\022V\n\031explan" - + "ation_spec_override\030\005 \001(\01323.google.cloud" - + ".aiplatform.v1.ExplanationSpecOverride\022\031" - + "\n\021deployed_model_id\030\003 \001(\t\"\230\001\n\017ExplainRes" - + "ponse\022=\n\014explanations\030\001 \003(\0132\'.google.clo" - + "ud.aiplatform.v1.Explanation\022\031\n\021deployed" - + "_model_id\030\002 \001(\t\022+\n\013predictions\030\003 \003(\0132\026.g" - + "oogle.protobuf.Value2\274\005\n\021PredictionServi" - + "ce\022\310\001\n\007Predict\022*.google.cloud.aiplatform" - + ".v1.PredictRequest\032+.google.cloud.aiplat" - + "form.v1.PredictResponse\"d\202\323\344\223\002>\"9/v1/{en" - + "dpoint=projects/*/locations/*/endpoints/" - + "*}:predict:\001*\332A\035endpoint,instances,param" - + "eters\022\257\001\n\nRawPredict\022-.google.cloud.aipl" - + "atform.v1.RawPredictRequest\032\024.google.api" - + ".HttpBody\"\\\202\323\344\223\002A\"\"9/v1/{endpoint=projects/*/l" - + "ocations/*/endpoints/*}:explain:\001*\332A/end" - + "point,instances,parameters,deployed_mode" - + "l_id\032M\312A\031aiplatform.googleapis.com\322A.htt" - + "ps://www.googleapis.com/auth/cloud-platf" - + "ormB\332\001\n\036com.google.cloud.aiplatform.v1B\026" - + "PredictionServiceProtoP\001ZDgoogle.golang." - + "org/genproto/googleapis/cloud/aiplatform" - + "/v1;aiplatform\252\002\032Google.Cloud.AIPlatform" - + ".V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Googl" - + "e::Cloud::AIPlatform::V1b\006proto3" + + "googleapis.com/Model\022\035\n\020model_version_id" + + "\030\005 \001(\tB\003\340A\003\022\037\n\022model_display_name\030\004 \001(\tB" + + "\003\340A\003\"z\n\021RawPredictRequest\022<\n\010endpoint\030\001 " + + "\001(\tB*\340A\002\372A$\n\"aiplatform.googleapis.com/E" + + "ndpoint\022\'\n\thttp_body\030\002 \001(\0132\024.google.api." + + "HttpBody\"\235\002\n\016ExplainRequest\022<\n\010endpoint\030" + + "\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googleapis.com" + + "/Endpoint\022.\n\tinstances\030\002 \003(\0132\026.google.pr" + + "otobuf.ValueB\003\340A\002\022*\n\nparameters\030\004 \001(\0132\026." + + "google.protobuf.Value\022V\n\031explanation_spe" + + "c_override\030\005 \001(\01323.google.cloud.aiplatfo" + + "rm.v1.ExplanationSpecOverride\022\031\n\021deploye" + + "d_model_id\030\003 \001(\t\"\230\001\n\017ExplainResponse\022=\n\014" + + "explanations\030\001 \003(\0132\'.google.cloud.aiplat" + + "form.v1.Explanation\022\031\n\021deployed_model_id" + + "\030\002 \001(\t\022+\n\013predictions\030\003 \003(\0132\026.google.pro" + + "tobuf.Value2\274\005\n\021PredictionService\022\310\001\n\007Pr" + + "edict\022*.google.cloud.aiplatform.v1.Predi" + + "ctRequest\032+.google.cloud.aiplatform.v1.P" + + "redictResponse\"d\202\323\344\223\002>\"9/v1/{endpoint=pr" + + "ojects/*/locations/*/endpoints/*}:predic" + + "t:\001*\332A\035endpoint,instances,parameters\022\257\001\n" + + "\nRawPredict\022-.google.cloud.aiplatform.v1" + + ".RawPredictRequest\032\024.google.api.HttpBody" + + "\"\\\202\323\344\223\002A\"\"9/v1/{endpoint=projects/*/locations/" + + "*/endpoints/*}:explain:\001*\332A/endpoint,ins" + + "tances,parameters,deployed_model_id\032M\312A\031" + + "aiplatform.googleapis.com\322A.https://www." + + "googleapis.com/auth/cloud-platformB\332\001\n\036c" + + "om.google.cloud.aiplatform.v1B\026Predictio" + + "nServiceProtoP\001ZDgoogle.golang.org/genpr" + + "oto/googleapis/cloud/aiplatform/v1;aipla" + + "tform\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Goo" + + "gle\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud:" + + ":AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -137,7 +138,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PredictResponse_descriptor, new java.lang.String[] { - "Predictions", "DeployedModelId", "Model", "ModelDisplayName", + "Predictions", "DeployedModelId", "Model", "ModelVersionId", "ModelDisplayName", }); internal_static_google_cloud_aiplatform_v1_RawPredictRequest_descriptor = getDescriptor().getMessageTypes().get(2); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/batch_prediction_job.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/batch_prediction_job.proto index 528ef5becbb5..3212d0ce5556 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/batch_prediction_job.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/batch_prediction_job.proto @@ -166,6 +166,9 @@ message BatchPredictionJob { type: "aiplatform.googleapis.com/Model" }]; + // Output only. The version ID of the Model that produces the predictions via this job. + string model_version_id = 30 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Contains model information necessary to perform batch prediction without // requiring uploading to model registry. // Exactly one of model and unmanaged_container_model must be set. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto index e252817732f6..6d48f8f220ce 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/endpoint.proto @@ -166,6 +166,9 @@ message DeployedModel { } ]; + // Output only. The version ID of the model that is deployed. + string model_version_id = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + // The display name of the DeployedModel. If not provided upon creation, // the Model's display_name is used. string display_name = 3; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_service.proto index 4c4641b1d63c..baa693ba1daf 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_service.proto @@ -152,6 +152,15 @@ service ModelService { option (google.api.method_signature) = "parent,model_evaluation"; } + // Imports a list of externally generated ModelEvaluationSlice. + rpc BatchImportModelEvaluationSlices(BatchImportModelEvaluationSlicesRequest) returns (BatchImportModelEvaluationSlicesResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices:batchImport" + body: "*" + }; + option (google.api.method_signature) = "parent,model_evaluation_slices"; + } + // Gets a ModelEvaluation. rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) { option (google.api.http) = { @@ -523,6 +532,28 @@ message ImportModelEvaluationRequest { ModelEvaluation model_evaluation = 2 [(google.api.field_behavior) = REQUIRED]; } +// Request message for [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices] +message BatchImportModelEvaluationSlicesRequest { + // Required. The name of the parent ModelEvaluation resource. + // Format: + // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ModelEvaluation" + } + ]; + + // Required. Model evaluation slice resource to be imported. + repeated ModelEvaluationSlice model_evaluation_slices = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.BatchImportModelEvaluationSlices] +message BatchImportModelEvaluationSlicesResponse { + // Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1.ModelEvaluationSlice.name]. + repeated string imported_model_evaluation_slices = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Request message for [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1.ModelService.GetModelEvaluation]. message GetModelEvaluationRequest { // Required. The name of the ModelEvaluation resource. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto index e2ba434961c9..36096fd9ef2e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/prediction_service.proto @@ -133,6 +133,10 @@ message PredictResponse { } ]; + // Output only. The version ID of the Model which is deployed as the DeployedModel that + // this prediction hits. + string model_version_id = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The [display name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is deployed as // the DeployedModel that this prediction hits. string model_display_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesRequest.java new file mode 100644 index 000000000000..29bd94539b5f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesRequest.java @@ -0,0 +1,1261 @@ +/* + * 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/model_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1beta1.ModelService.BatchImportModelEvaluationSlices]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest} + */ +public final class BatchImportModelEvaluationSlicesRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest) + BatchImportModelEvaluationSlicesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchImportModelEvaluationSlicesRequest.newBuilder() to construct. + private BatchImportModelEvaluationSlicesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchImportModelEvaluationSlicesRequest() { + parent_ = ""; + modelEvaluationSlices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchImportModelEvaluationSlicesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchImportModelEvaluationSlicesRequest( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + modelEvaluationSlices_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice>(); + mutable_bitField0_ |= 0x00000001; + } + modelEvaluationSlices_.add( + input.readMessage( + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.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)) { + modelEvaluationSlices_ = java.util.Collections.unmodifiableList(modelEvaluationSlices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest.class, + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The name of the parent ModelEvaluation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * 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 name of the parent ModelEvaluation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * 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 MODEL_EVALUATION_SLICES_FIELD_NUMBER = 2; + private java.util.List + modelEvaluationSlices_; + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getModelEvaluationSlicesList() { + return modelEvaluationSlices_; + } + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getModelEvaluationSlicesOrBuilderList() { + return modelEvaluationSlices_; + } + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getModelEvaluationSlicesCount() { + return modelEvaluationSlices_.size(); + } + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice getModelEvaluationSlices( + int index) { + return modelEvaluationSlices_.get(index); + } + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ModelEvaluationSliceOrBuilder + getModelEvaluationSlicesOrBuilder(int index) { + return modelEvaluationSlices_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < modelEvaluationSlices_.size(); i++) { + output.writeMessage(2, modelEvaluationSlices_.get(i)); + } + 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_); + } + for (int i = 0; i < modelEvaluationSlices_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, modelEvaluationSlices_.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.BatchImportModelEvaluationSlicesRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest other = + (com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getModelEvaluationSlicesList().equals(other.getModelEvaluationSlicesList())) 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 (getModelEvaluationSlicesCount() > 0) { + hash = (37 * hash) + MODEL_EVALUATION_SLICES_FIELD_NUMBER; + hash = (53 * hash) + getModelEvaluationSlicesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest + 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.BatchImportModelEvaluationSlicesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest + 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.BatchImportModelEvaluationSlicesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest + 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.BatchImportModelEvaluationSlicesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest + 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.BatchImportModelEvaluationSlicesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest + 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.BatchImportModelEvaluationSlicesRequest + 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.BatchImportModelEvaluationSlicesRequest + 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.BatchImportModelEvaluationSlicesRequest 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 [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1beta1.ModelService.BatchImportModelEvaluationSlices]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest) + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest.class, + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getModelEvaluationSlicesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (modelEvaluationSlicesBuilder_ == null) { + modelEvaluationSlices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + modelEvaluationSlicesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest build() { + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest + buildPartial() { + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest result = + new com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (modelEvaluationSlicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + modelEvaluationSlices_ = java.util.Collections.unmodifiableList(modelEvaluationSlices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.modelEvaluationSlices_ = modelEvaluationSlices_; + } else { + result.modelEvaluationSlices_ = modelEvaluationSlicesBuilder_.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.BatchImportModelEvaluationSlicesRequest) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (modelEvaluationSlicesBuilder_ == null) { + if (!other.modelEvaluationSlices_.isEmpty()) { + if (modelEvaluationSlices_.isEmpty()) { + modelEvaluationSlices_ = other.modelEvaluationSlices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.addAll(other.modelEvaluationSlices_); + } + onChanged(); + } + } else { + if (!other.modelEvaluationSlices_.isEmpty()) { + if (modelEvaluationSlicesBuilder_.isEmpty()) { + modelEvaluationSlicesBuilder_.dispose(); + modelEvaluationSlicesBuilder_ = null; + modelEvaluationSlices_ = other.modelEvaluationSlices_; + bitField0_ = (bitField0_ & ~0x00000001); + modelEvaluationSlicesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getModelEvaluationSlicesFieldBuilder() + : null; + } else { + modelEvaluationSlicesBuilder_.addAllMessages(other.modelEvaluationSlices_); + } + } + } + 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.BatchImportModelEvaluationSlicesRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the parent ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * 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 name of the parent ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * 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 name of the parent ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * 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 name of the parent ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * 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 name of the parent ModelEvaluation resource.
+     * Format:
+     * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+     * 
+ * + * + * 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 java.util.List + modelEvaluationSlices_ = java.util.Collections.emptyList(); + + private void ensureModelEvaluationSlicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + modelEvaluationSlices_ = + new java.util.ArrayList( + modelEvaluationSlices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice, + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Builder, + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSliceOrBuilder> + modelEvaluationSlicesBuilder_; + + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getModelEvaluationSlicesList() { + if (modelEvaluationSlicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(modelEvaluationSlices_); + } else { + return modelEvaluationSlicesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getModelEvaluationSlicesCount() { + if (modelEvaluationSlicesBuilder_ == null) { + return modelEvaluationSlices_.size(); + } else { + return modelEvaluationSlicesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice getModelEvaluationSlices( + int index) { + if (modelEvaluationSlicesBuilder_ == null) { + return modelEvaluationSlices_.get(index); + } else { + return modelEvaluationSlicesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModelEvaluationSlices( + int index, com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice value) { + if (modelEvaluationSlicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.set(index, value); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModelEvaluationSlices( + int index, + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Builder builderForValue) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.set(index, builderForValue.build()); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addModelEvaluationSlices( + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice value) { + if (modelEvaluationSlicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.add(value); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addModelEvaluationSlices( + int index, com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice value) { + if (modelEvaluationSlicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.add(index, value); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addModelEvaluationSlices( + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Builder builderForValue) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.add(builderForValue.build()); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addModelEvaluationSlices( + int index, + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Builder builderForValue) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.add(index, builderForValue.build()); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllModelEvaluationSlices( + java.lang.Iterable + values) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, modelEvaluationSlices_); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearModelEvaluationSlices() { + if (modelEvaluationSlicesBuilder_ == null) { + modelEvaluationSlices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeModelEvaluationSlices(int index) { + if (modelEvaluationSlicesBuilder_ == null) { + ensureModelEvaluationSlicesIsMutable(); + modelEvaluationSlices_.remove(index); + onChanged(); + } else { + modelEvaluationSlicesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Builder + getModelEvaluationSlicesBuilder(int index) { + return getModelEvaluationSlicesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ModelEvaluationSliceOrBuilder + getModelEvaluationSlicesOrBuilder(int index) { + if (modelEvaluationSlicesBuilder_ == null) { + return modelEvaluationSlices_.get(index); + } else { + return modelEvaluationSlicesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.ModelEvaluationSliceOrBuilder> + getModelEvaluationSlicesOrBuilderList() { + if (modelEvaluationSlicesBuilder_ != null) { + return modelEvaluationSlicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(modelEvaluationSlices_); + } + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Builder + addModelEvaluationSlicesBuilder() { + return getModelEvaluationSlicesFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Builder + addModelEvaluationSlicesBuilder(int index) { + return getModelEvaluationSlicesFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Model evaluation slice resource to be imported.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getModelEvaluationSlicesBuilderList() { + return getModelEvaluationSlicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice, + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Builder, + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSliceOrBuilder> + getModelEvaluationSlicesFieldBuilder() { + if (modelEvaluationSlicesBuilder_ == null) { + modelEvaluationSlicesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice, + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Builder, + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSliceOrBuilder>( + modelEvaluationSlices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + modelEvaluationSlices_ = null; + } + return modelEvaluationSlicesBuilder_; + } + + @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.BatchImportModelEvaluationSlicesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest) + private static final com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchImportModelEvaluationSlicesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchImportModelEvaluationSlicesRequest(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.BatchImportModelEvaluationSlicesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesRequestOrBuilder.java new file mode 100644 index 000000000000..5087c8992e3e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesRequestOrBuilder.java @@ -0,0 +1,122 @@ +/* + * 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/model_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface BatchImportModelEvaluationSlicesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent ModelEvaluation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the parent ModelEvaluation resource.
+   * Format:
+   * `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getModelEvaluationSlicesList(); + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSlice getModelEvaluationSlices(int index); + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getModelEvaluationSlicesCount(); + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getModelEvaluationSlicesOrBuilderList(); + /** + * + * + *
+   * Required. Model evaluation slice resource to be imported.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.ModelEvaluationSlice model_evaluation_slices = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.ModelEvaluationSliceOrBuilder + getModelEvaluationSlicesOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesResponse.java new file mode 100644 index 000000000000..b6d68cc1934e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesResponse.java @@ -0,0 +1,797 @@ +/* + * 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/model_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1beta1.ModelService.BatchImportModelEvaluationSlices]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse} + */ +public final class BatchImportModelEvaluationSlicesResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse) + BatchImportModelEvaluationSlicesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchImportModelEvaluationSlicesResponse.newBuilder() to construct. + private BatchImportModelEvaluationSlicesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchImportModelEvaluationSlicesResponse() { + importedModelEvaluationSlices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchImportModelEvaluationSlicesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchImportModelEvaluationSlicesResponse( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + importedModelEvaluationSlices_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + importedModelEvaluationSlices_.add(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)) { + importedModelEvaluationSlices_ = importedModelEvaluationSlices_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse.class, + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse.Builder + .class); + } + + public static final int IMPORTED_MODEL_EVALUATION_SLICES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList importedModelEvaluationSlices_; + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the importedModelEvaluationSlices. + */ + public com.google.protobuf.ProtocolStringList getImportedModelEvaluationSlicesList() { + return importedModelEvaluationSlices_; + } + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of importedModelEvaluationSlices. + */ + public int getImportedModelEvaluationSlicesCount() { + return importedModelEvaluationSlices_.size(); + } + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The importedModelEvaluationSlices at the given index. + */ + public java.lang.String getImportedModelEvaluationSlices(int index) { + return importedModelEvaluationSlices_.get(index); + } + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the importedModelEvaluationSlices at the given index. + */ + public com.google.protobuf.ByteString getImportedModelEvaluationSlicesBytes(int index) { + return importedModelEvaluationSlices_.getByteString(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 < importedModelEvaluationSlices_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 1, importedModelEvaluationSlices_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < importedModelEvaluationSlices_.size(); i++) { + dataSize += computeStringSizeNoTag(importedModelEvaluationSlices_.getRaw(i)); + } + size += dataSize; + size += 1 * getImportedModelEvaluationSlicesList().size(); + } + 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.BatchImportModelEvaluationSlicesResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse other = + (com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse) obj; + + if (!getImportedModelEvaluationSlicesList() + .equals(other.getImportedModelEvaluationSlicesList())) 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 (getImportedModelEvaluationSlicesCount() > 0) { + hash = (37 * hash) + IMPORTED_MODEL_EVALUATION_SLICES_FIELD_NUMBER; + hash = (53 * hash) + getImportedModelEvaluationSlicesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + 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.BatchImportModelEvaluationSlicesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + 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.BatchImportModelEvaluationSlicesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + 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.BatchImportModelEvaluationSlicesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + 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.BatchImportModelEvaluationSlicesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + 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.BatchImportModelEvaluationSlicesResponse + 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.BatchImportModelEvaluationSlicesResponse + 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.BatchImportModelEvaluationSlicesResponse 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 [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1beta1.ModelService.BatchImportModelEvaluationSlices]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse) + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse.class, + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse.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(); + importedModelEvaluationSlices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse build() { + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + buildPartial() { + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse result = + new com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + importedModelEvaluationSlices_ = importedModelEvaluationSlices_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.importedModelEvaluationSlices_ = importedModelEvaluationSlices_; + 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.BatchImportModelEvaluationSlicesResponse) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse other) { + if (other + == com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + .getDefaultInstance()) return this; + if (!other.importedModelEvaluationSlices_.isEmpty()) { + if (importedModelEvaluationSlices_.isEmpty()) { + importedModelEvaluationSlices_ = other.importedModelEvaluationSlices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureImportedModelEvaluationSlicesIsMutable(); + importedModelEvaluationSlices_.addAll(other.importedModelEvaluationSlices_); + } + 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.BatchImportModelEvaluationSlicesResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList importedModelEvaluationSlices_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureImportedModelEvaluationSlicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + importedModelEvaluationSlices_ = + new com.google.protobuf.LazyStringArrayList(importedModelEvaluationSlices_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the importedModelEvaluationSlices. + */ + public com.google.protobuf.ProtocolStringList getImportedModelEvaluationSlicesList() { + return importedModelEvaluationSlices_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of importedModelEvaluationSlices. + */ + public int getImportedModelEvaluationSlicesCount() { + return importedModelEvaluationSlices_.size(); + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The importedModelEvaluationSlices at the given index. + */ + public java.lang.String getImportedModelEvaluationSlices(int index) { + return importedModelEvaluationSlices_.get(index); + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the importedModelEvaluationSlices at the given index. + */ + public com.google.protobuf.ByteString getImportedModelEvaluationSlicesBytes(int index) { + return importedModelEvaluationSlices_.getByteString(index); + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The importedModelEvaluationSlices to set. + * @return This builder for chaining. + */ + public Builder setImportedModelEvaluationSlices(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportedModelEvaluationSlicesIsMutable(); + importedModelEvaluationSlices_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The importedModelEvaluationSlices to add. + * @return This builder for chaining. + */ + public Builder addImportedModelEvaluationSlices(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureImportedModelEvaluationSlicesIsMutable(); + importedModelEvaluationSlices_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The importedModelEvaluationSlices to add. + * @return This builder for chaining. + */ + public Builder addAllImportedModelEvaluationSlices( + java.lang.Iterable values) { + ensureImportedModelEvaluationSlicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, importedModelEvaluationSlices_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearImportedModelEvaluationSlices() { + importedModelEvaluationSlices_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+     * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the importedModelEvaluationSlices to add. + * @return This builder for chaining. + */ + public Builder addImportedModelEvaluationSlicesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureImportedModelEvaluationSlicesIsMutable(); + importedModelEvaluationSlices_.add(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.BatchImportModelEvaluationSlicesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse) + private static final com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchImportModelEvaluationSlicesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchImportModelEvaluationSlicesResponse(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.BatchImportModelEvaluationSlicesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesResponseOrBuilder.java new file mode 100644 index 000000000000..fae162c56e6b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/BatchImportModelEvaluationSlicesResponseOrBuilder.java @@ -0,0 +1,84 @@ +/* + * 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/model_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface BatchImportModelEvaluationSlicesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the importedModelEvaluationSlices. + */ + java.util.List getImportedModelEvaluationSlicesList(); + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of importedModelEvaluationSlices. + */ + int getImportedModelEvaluationSlicesCount(); + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The importedModelEvaluationSlices at the given index. + */ + java.lang.String getImportedModelEvaluationSlices(int index); + /** + * + * + *
+   * Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name].
+   * 
+ * + * + * repeated string imported_model_evaluation_slices = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the importedModelEvaluationSlices at the given index. + */ + com.google.protobuf.ByteString getImportedModelEvaluationSlicesBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceProto.java index 4a8c95eff036..5e55e20dbeaf 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceProto.java @@ -111,6 +111,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_ImportModelEvaluationRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_ImportModelEvaluationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -225,123 +233,138 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "7\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatform.goog" + "leapis.com/Model\022O\n\020model_evaluation\030\002 \001" + "(\01320.google.cloud.aiplatform.v1beta1.Mod" - + "elEvaluationB\003\340A\002\"\\\n\031GetModelEvaluationR" - + "equest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aiplatform" - + ".googleapis.com/ModelEvaluation\"\274\001\n\033List" - + "ModelEvaluationsRequest\0227\n\006parent\030\001 \001(\tB" - + "\'\340A\002\372A!\n\037aiplatform.googleapis.com/Model" - + "\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\np" - + "age_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.goo" - + "gle.protobuf.FieldMask\"\204\001\n\034ListModelEval" - + "uationsResponse\022K\n\021model_evaluations\030\001 \003" - + "(\01320.google.cloud.aiplatform.v1beta1.Mod" - + "elEvaluation\022\027\n\017next_page_token\030\002 \001(\t\"f\n" - + "\036GetModelEvaluationSliceRequest\022D\n\004name\030" - + "\001 \001(\tB6\340A\002\372A0\n.aiplatform.googleapis.com" - + "/ModelEvaluationSlice\"\313\001\n ListModelEvalu" - + "ationSlicesRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372" - + "A+\n)aiplatform.googleapis.com/ModelEvalu" - + "ation\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005" - + "\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132" - + "\032.google.protobuf.FieldMask\"\224\001\n!ListMode" - + "lEvaluationSlicesResponse\022V\n\027model_evalu" - + "ation_slices\030\001 \003(\01325.google.cloud.aiplat" - + "form.v1beta1.ModelEvaluationSlice\022\027\n\017nex" - + "t_page_token\030\002 \001(\t2\262\033\n\014ModelService\022\352\001\n\013" - + "UploadModel\0223.google.cloud.aiplatform.v1" - + "beta1.UploadModelRequest\032\035.google.longru" - + "nning.Operation\"\206\001\202\323\344\223\002;\"6/v1beta1/{pare" - + "nt=projects/*/locations/*}/models:upload" - + ":\001*\332A\014parent,model\312A3\n\023UploadModelRespon" - + "se\022\034UploadModelOperationMetadata\022\244\001\n\010Get" - + "Model\0220.google.cloud.aiplatform.v1beta1." - + "GetModelRequest\032&.google.cloud.aiplatfor" - + "m.v1beta1.Model\">\202\323\344\223\0021\022//v1beta1/{name=" - + "projects/*/locations/*/models/*}\332A\004name\022" - + "\267\001\n\nListModels\0222.google.cloud.aiplatform" - + ".v1beta1.ListModelsRequest\0323.google.clou" - + "d.aiplatform.v1beta1.ListModelsResponse\"" - + "@\202\323\344\223\0021\022//v1beta1/{parent=projects/*/loc" - + "ations/*}/models\332A\006parent\022\327\001\n\021ListModelV" - + "ersions\0229.google.cloud.aiplatform.v1beta" - + "1.ListModelVersionsRequest\032:.google.clou" - + "d.aiplatform.v1beta1.ListModelVersionsRe" - + "sponse\"K\202\323\344\223\002>\022" - + "25/v1beta1/{model.name=projects/*/locati" - + "ons/*/models/*}:\005model\332A\021model,update_ma" - + "sk\022\252\002\n\030UpdateExplanationDataset\022@.google" - + ".cloud.aiplatform.v1beta1.UpdateExplanat" - + "ionDatasetRequest\032\035.google.longrunning.O" - + "peration\"\254\001\202\323\344\223\002N\"I/v1beta1/{model=proje" - + "cts/*/locations/*/models/*}:updateExplan" - + "ationDataset:\001*\332A\005model\312AM\n UpdateExplan" - + "ationDatasetResponse\022)UpdateExplanationD" - + "atasetOperationMetadata\022\324\001\n\013DeleteModel\022" - + "3.google.cloud.aiplatform.v1beta1.Delete" - + "ModelRequest\032\035.google.longrunning.Operat" - + "ion\"q\202\323\344\223\0021*//v1beta1/{name=projects/*/l" - + "ocations/*/models/*}\332A\004name\312A0\n\025google.p" - + "rotobuf.Empty\022\027DeleteOperationMetadata\022\360" - + "\001\n\022DeleteModelVersion\022:.google.cloud.aip" - + "latform.v1beta1.DeleteModelVersionReques" - + "t\032\035.google.longrunning.Operation\"\177\202\323\344\223\002?" - + "*=/v1beta1/{name=projects/*/locations/*/" - + "models/*}:deleteVersion\332A\004name\312A0\n\025googl" - + "e.protobuf.Empty\022\027DeleteOperationMetadat" - + "a\022\341\001\n\023MergeVersionAliases\022;.google.cloud" - + ".aiplatform.v1beta1.MergeVersionAliasesR" - + "equest\032&.google.cloud.aiplatform.v1beta1" - + ".Model\"e\202\323\344\223\002H\"C/v1beta1/{name=projects/" - + "*/locations/*/models/*}:mergeVersionAlia" - + "ses:\001*\332A\024name,version_aliases\022\360\001\n\013Export" - + "Model\0223.google.cloud.aiplatform.v1beta1." - + "ExportModelRequest\032\035.google.longrunning." - + "Operation\"\214\001\202\323\344\223\002;\"6/v1beta1/{name=proje" - + "cts/*/locations/*/models/*}:export:\001*\332A\022" - + "name,output_config\312A3\n\023ExportModelRespon" - + "se\022\034ExportModelOperationMetadata\022\363\001\n\025Imp" - + "ortModelEvaluation\022=.google.cloud.aiplat" - + "form.v1beta1.ImportModelEvaluationReques" - + "t\0320.google.cloud.aiplatform.v1beta1.Mode" - + "lEvaluation\"i\202\323\344\223\002I\"D/v1beta1/{parent=pr" - + "ojects/*/locations/*/models/*}/evaluatio" - + "ns:import:\001*\332A\027parent,model_evaluation\022\320" - + "\001\n\022GetModelEvaluation\022:.google.cloud.aip" - + "latform.v1beta1.GetModelEvaluationReques" - + "t\0320.google.cloud.aiplatform.v1beta1.Mode" - + "lEvaluation\"L\202\323\344\223\002?\022=/v1beta1/{name=proj" - + "ects/*/locations/*/models/*/evaluations/" - + "*}\332A\004name\022\343\001\n\024ListModelEvaluations\022<.goo" - + "gle.cloud.aiplatform.v1beta1.ListModelEv" - + "aluationsRequest\032=.google.cloud.aiplatfo" - + "rm.v1beta1.ListModelEvaluationsResponse\"" - + "N\202\323\344\223\002?\022=/v1beta1/{parent=projects/*/loc" - + "ations/*/models/*}/evaluations\332A\006parent\022" - + "\350\001\n\027GetModelEvaluationSlice\022?.google.clo" - + "ud.aiplatform.v1beta1.GetModelEvaluation" - + "SliceRequest\0325.google.cloud.aiplatform.v" - + "1beta1.ModelEvaluationSlice\"U\202\323\344\223\002H\022F/v1" - + "beta1/{name=projects/*/locations/*/model" - + "s/*/evaluations/*/slices/*}\332A\004name\022\373\001\n\031L" - + "istModelEvaluationSlices\022A.google.cloud." - + "aiplatform.v1beta1.ListModelEvaluationSl" - + "icesRequest\032B.google.cloud.aiplatform.v1" - + "beta1.ListModelEvaluationSlicesResponse\"" - + "W\202\323\344\223\002H\022F/v1beta1/{parent=projects/*/loc" - + "ations/*/models/*/evaluations/*}/slices\332" - + "A\006parent\032M\312A\031aiplatform.googleapis.com\322A" - + ".https://www.googleapis.com/auth/cloud-p" - + "latformB\356\001\n#com.google.cloud.aiplatform." - + "v1beta1B\021ModelServiceProtoP\001ZIgoogle.gol" - + "ang.org/genproto/googleapis/cloud/aiplat" - + "form/v1beta1;aiplatform\252\002\037Google.Cloud.A" - + "IPlatform.V1Beta1\312\002\037Google\\Cloud\\AIPlatf" - + "orm\\V1beta1\352\002\"Google::Cloud::AIPlatform:" - + ":V1beta1b\006proto3" + + "elEvaluationB\003\340A\002\"\311\001\n\'BatchImportModelEv" + + "aluationSlicesRequest\022A\n\006parent\030\001 \001(\tB1\340" + + "A\002\372A+\n)aiplatform.googleapis.com/ModelEv" + + "aluation\022[\n\027model_evaluation_slices\030\002 \003(" + + "\01325.google.cloud.aiplatform.v1beta1.Mode" + + "lEvaluationSliceB\003\340A\002\"Y\n(BatchImportMode" + + "lEvaluationSlicesResponse\022-\n imported_mo" + + "del_evaluation_slices\030\001 \003(\tB\003\340A\003\"\\\n\031GetM" + + "odelEvaluationRequest\022?\n\004name\030\001 \001(\tB1\340A\002" + + "\372A+\n)aiplatform.googleapis.com/ModelEval" + + "uation\"\274\001\n\033ListModelEvaluationsRequest\0227" + + "\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatform.googl" + + "eapis.com/Model\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_" + + "size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_m" + + "ask\030\005 \001(\0132\032.google.protobuf.FieldMask\"\204\001" + + "\n\034ListModelEvaluationsResponse\022K\n\021model_" + + "evaluations\030\001 \003(\01320.google.cloud.aiplatf" + + "orm.v1beta1.ModelEvaluation\022\027\n\017next_page" + + "_token\030\002 \001(\t\"f\n\036GetModelEvaluationSliceR" + + "equest\022D\n\004name\030\001 \001(\tB6\340A\002\372A0\n.aiplatform" + + ".googleapis.com/ModelEvaluationSlice\"\313\001\n" + + " ListModelEvaluationSlicesRequest\022A\n\006par" + + "ent\030\001 \001(\tB1\340A\002\372A+\n)aiplatform.googleapis" + + ".com/ModelEvaluation\022\016\n\006filter\030\002 \001(\t\022\021\n\t" + + "page_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tr" + + "ead_mask\030\005 \001(\0132\032.google.protobuf.FieldMa" + + "sk\"\224\001\n!ListModelEvaluationSlicesResponse" + + "\022V\n\027model_evaluation_slices\030\001 \003(\01325.goog" + + "le.cloud.aiplatform.v1beta1.ModelEvaluat" + + "ionSlice\022\027\n\017next_page_token\030\002 \001(\t2\354\035\n\014Mo" + + "delService\022\352\001\n\013UploadModel\0223.google.clou" + + "d.aiplatform.v1beta1.UploadModelRequest\032" + + "\035.google.longrunning.Operation\"\206\001\202\323\344\223\002;\"" + + "6/v1beta1/{parent=projects/*/locations/*" + + "}/models:upload:\001*\332A\014parent,model\312A3\n\023Up" + + "loadModelResponse\022\034UploadModelOperationM" + + "etadata\022\244\001\n\010GetModel\0220.google.cloud.aipl" + + "atform.v1beta1.GetModelRequest\032&.google." + + "cloud.aiplatform.v1beta1.Model\">\202\323\344\223\0021\022/" + + "/v1beta1/{name=projects/*/locations/*/mo" + + "dels/*}\332A\004name\022\267\001\n\nListModels\0222.google.c" + + "loud.aiplatform.v1beta1.ListModelsReques" + + "t\0323.google.cloud.aiplatform.v1beta1.List" + + "ModelsResponse\"@\202\323\344\223\0021\022//v1beta1/{parent" + + "=projects/*/locations/*}/models\332A\006parent" + + "\022\327\001\n\021ListModelVersions\0229.google.cloud.ai" + + "platform.v1beta1.ListModelVersionsReques" + + "t\032:.google.cloud.aiplatform.v1beta1.List" + + "ModelVersionsResponse\"K\202\323\344\223\002>\02225/v1beta1/{model.name=pr" + + "ojects/*/locations/*/models/*}:\005model\332A\021" + + "model,update_mask\022\252\002\n\030UpdateExplanationD" + + "ataset\022@.google.cloud.aiplatform.v1beta1" + + ".UpdateExplanationDatasetRequest\032\035.googl" + + "e.longrunning.Operation\"\254\001\202\323\344\223\002N\"I/v1bet" + + "a1/{model=projects/*/locations/*/models/" + + "*}:updateExplanationDataset:\001*\332A\005model\312A" + + "M\n UpdateExplanationDatasetResponse\022)Upd" + + "ateExplanationDatasetOperationMetadata\022\324" + + "\001\n\013DeleteModel\0223.google.cloud.aiplatform" + + ".v1beta1.DeleteModelRequest\032\035.google.lon" + + "grunning.Operation\"q\202\323\344\223\0021*//v1beta1/{na" + + "me=projects/*/locations/*/models/*}\332A\004na" + + "me\312A0\n\025google.protobuf.Empty\022\027DeleteOper" + + "ationMetadata\022\360\001\n\022DeleteModelVersion\022:.g" + + "oogle.cloud.aiplatform.v1beta1.DeleteMod" + + "elVersionRequest\032\035.google.longrunning.Op" + + "eration\"\177\202\323\344\223\002?*=/v1beta1/{name=projects" + + "/*/locations/*/models/*}:deleteVersion\332A" + + "\004name\312A0\n\025google.protobuf.Empty\022\027DeleteO" + + "perationMetadata\022\341\001\n\023MergeVersionAliases" + + "\022;.google.cloud.aiplatform.v1beta1.Merge" + + "VersionAliasesRequest\032&.google.cloud.aip" + + "latform.v1beta1.Model\"e\202\323\344\223\002H\"C/v1beta1/" + + "{name=projects/*/locations/*/models/*}:m" + + "ergeVersionAliases:\001*\332A\024name,version_ali" + + "ases\022\360\001\n\013ExportModel\0223.google.cloud.aipl" + + "atform.v1beta1.ExportModelRequest\032\035.goog" + + "le.longrunning.Operation\"\214\001\202\323\344\223\002;\"6/v1be" + + "ta1/{name=projects/*/locations/*/models/" + + "*}:export:\001*\332A\022name,output_config\312A3\n\023Ex" + + "portModelResponse\022\034ExportModelOperationM" + + "etadata\022\363\001\n\025ImportModelEvaluation\022=.goog" + + "le.cloud.aiplatform.v1beta1.ImportModelE" + + "valuationRequest\0320.google.cloud.aiplatfo" + + "rm.v1beta1.ModelEvaluation\"i\202\323\344\223\002I\"D/v1b" + + "eta1/{parent=projects/*/locations/*/mode" + + "ls/*}/evaluations:import:\001*\332A\027parent,mod" + + "el_evaluation\022\267\002\n BatchImportModelEvalua" + + "tionSlices\022H.google.cloud.aiplatform.v1b" + + "eta1.BatchImportModelEvaluationSlicesReq" + + "uest\032I.google.cloud.aiplatform.v1beta1.B" + + "atchImportModelEvaluationSlicesResponse\"" + + "~\202\323\344\223\002W\"R/v1beta1/{parent=projects/*/loc" + + "ations/*/models/*/evaluations/*}/slices:" + + "batchImport:\001*\332A\036parent,model_evaluation" + + "_slices\022\320\001\n\022GetModelEvaluation\022:.google." + + "cloud.aiplatform.v1beta1.GetModelEvaluat" + + "ionRequest\0320.google.cloud.aiplatform.v1b" + + "eta1.ModelEvaluation\"L\202\323\344\223\002?\022=/v1beta1/{" + + "name=projects/*/locations/*/models/*/eva" + + "luations/*}\332A\004name\022\343\001\n\024ListModelEvaluati" + + "ons\022<.google.cloud.aiplatform.v1beta1.Li" + + "stModelEvaluationsRequest\032=.google.cloud" + + ".aiplatform.v1beta1.ListModelEvaluations" + + "Response\"N\202\323\344\223\002?\022=/v1beta1/{parent=proje" + + "cts/*/locations/*/models/*}/evaluations\332" + + "A\006parent\022\350\001\n\027GetModelEvaluationSlice\022?.g" + + "oogle.cloud.aiplatform.v1beta1.GetModelE" + + "valuationSliceRequest\0325.google.cloud.aip" + + "latform.v1beta1.ModelEvaluationSlice\"U\202\323" + + "\344\223\002H\022F/v1beta1/{name=projects/*/location" + + "s/*/models/*/evaluations/*/slices/*}\332A\004n" + + "ame\022\373\001\n\031ListModelEvaluationSlices\022A.goog" + + "le.cloud.aiplatform.v1beta1.ListModelEva" + + "luationSlicesRequest\032B.google.cloud.aipl" + + "atform.v1beta1.ListModelEvaluationSlices" + + "Response\"W\202\323\344\223\002H\022F/v1beta1/{parent=proje" + + "cts/*/locations/*/models/*/evaluations/*" + + "}/slices\332A\006parent\032M\312A\031aiplatform.googlea" + + "pis.com\322A.https://www.googleapis.com/aut" + + "h/cloud-platformB\356\001\n#com.google.cloud.ai" + + "platform.v1beta1B\021ModelServiceProtoP\001ZIg" + + "oogle.golang.org/genproto/googleapis/clo" + + "ud/aiplatform/v1beta1;aiplatform\252\002\037Googl" + + "e.Cloud.AIPlatform.V1Beta1\312\002\037Google\\Clou" + + "d\\AIPlatform\\V1beta1\352\002\"Google::Cloud::AI" + + "Platform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -528,8 +551,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Parent", "ModelEvaluation", }); - internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationRequest_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_descriptor = getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_descriptor, + new java.lang.String[] { + "Parent", "ModelEvaluationSlices", + }); + internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_descriptor, + new java.lang.String[] { + "ImportedModelEvaluationSlices", + }); + internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationRequest_descriptor = + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationRequest_descriptor, @@ -537,7 +576,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationsRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationsRequest_descriptor, @@ -545,7 +584,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationsResponse_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationsResponse_descriptor, @@ -553,7 +592,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ModelEvaluations", "NextPageToken", }); internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationSliceRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationSliceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationSliceRequest_descriptor, @@ -561,7 +600,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationSlicesRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationSlicesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationSlicesRequest_descriptor, @@ -569,7 +608,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationSlicesResponse_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationSlicesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationSlicesResponse_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model_service.proto index 177e39c7ae8a..37523dca7e9a 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model_service.proto @@ -166,6 +166,15 @@ service ModelService { option (google.api.method_signature) = "parent,model_evaluation"; } + // Imports a list of externally generated ModelEvaluationSlice. + rpc BatchImportModelEvaluationSlices(BatchImportModelEvaluationSlicesRequest) returns (BatchImportModelEvaluationSlicesResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices:batchImport" + body: "*" + }; + option (google.api.method_signature) = "parent,model_evaluation_slices"; + } + // Gets a ModelEvaluation. rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) { option (google.api.http) = { @@ -555,6 +564,28 @@ message ImportModelEvaluationRequest { ModelEvaluation model_evaluation = 2 [(google.api.field_behavior) = REQUIRED]; } +// Request message for [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1beta1.ModelService.BatchImportModelEvaluationSlices] +message BatchImportModelEvaluationSlicesRequest { + // Required. The name of the parent ModelEvaluation resource. + // Format: + // `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ModelEvaluation" + } + ]; + + // Required. Model evaluation slice resource to be imported. + repeated ModelEvaluationSlice model_evaluation_slices = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for [ModelService.BatchImportModelEvaluationSlices][google.cloud.aiplatform.v1beta1.ModelService.BatchImportModelEvaluationSlices] +message BatchImportModelEvaluationSlicesResponse { + // Output only. List of imported [ModelEvaluationSlice.name][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.name]. + repeated string imported_model_evaluation_slices = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Request message for [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1beta1.ModelService.GetModelEvaluation]. message GetModelEvaluationRequest { // Required. The name of the ModelEvaluation resource.