diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceClient.java index fa4ab3ec0f0..8778008d8ff 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceClient.java @@ -800,6 +800,112 @@ public final UnaryCallable deleteIndexCallable() return stub.deleteIndexCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Add/update Datapoints into an Index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+   *   UpsertDatapointsRequest request =
+   *       UpsertDatapointsRequest.newBuilder()
+   *           .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+   *           .addAllDatapoints(new ArrayList())
+   *           .build();
+   *   UpsertDatapointsResponse response = indexServiceClient.upsertDatapoints(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 UpsertDatapointsResponse upsertDatapoints(UpsertDatapointsRequest request) { + return upsertDatapointsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Add/update Datapoints into an Index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+   *   UpsertDatapointsRequest request =
+   *       UpsertDatapointsRequest.newBuilder()
+   *           .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+   *           .addAllDatapoints(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       indexServiceClient.upsertDatapointsCallable().futureCall(request);
+   *   // Do something.
+   *   UpsertDatapointsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + upsertDatapointsCallable() { + return stub.upsertDatapointsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove Datapoints from an Index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+   *   RemoveDatapointsRequest request =
+   *       RemoveDatapointsRequest.newBuilder()
+   *           .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+   *           .addAllDatapointIds(new ArrayList())
+   *           .build();
+   *   RemoveDatapointsResponse response = indexServiceClient.removeDatapoints(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 RemoveDatapointsResponse removeDatapoints(RemoveDatapointsRequest request) { + return removeDatapointsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove Datapoints from an Index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+   *   RemoveDatapointsRequest request =
+   *       RemoveDatapointsRequest.newBuilder()
+   *           .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+   *           .addAllDatapointIds(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       indexServiceClient.removeDatapointsCallable().futureCall(request);
+   *   // Do something.
+   *   RemoveDatapointsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeDatapointsCallable() { + return stub.removeDatapointsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceSettings.java index 6b1d481e868..ff553678023 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceSettings.java @@ -127,6 +127,18 @@ public UnaryCallSettings deleteIndexSettings() { return ((IndexServiceStubSettings) getStubSettings()).deleteIndexOperationSettings(); } + /** Returns the object with the settings used for calls to upsertDatapoints. */ + public UnaryCallSettings + upsertDatapointsSettings() { + return ((IndexServiceStubSettings) getStubSettings()).upsertDatapointsSettings(); + } + + /** Returns the object with the settings used for calls to removeDatapoints. */ + public UnaryCallSettings + removeDatapointsSettings() { + return ((IndexServiceStubSettings) getStubSettings()).removeDatapointsSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -296,6 +308,18 @@ public UnaryCallSettings.Builder deleteIndexSetti return getStubSettingsBuilder().deleteIndexOperationSettings(); } + /** Returns the builder for the settings used for calls to upsertDatapoints. */ + public UnaryCallSettings.Builder + upsertDatapointsSettings() { + return getStubSettingsBuilder().upsertDatapointsSettings(); + } + + /** Returns the builder for the settings used for calls to removeDatapoints. */ + public UnaryCallSettings.Builder + removeDatapointsSettings() { + return getStubSettingsBuilder().removeDatapointsSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> 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 0846d90c211..f0735d82356 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 @@ -1151,9 +1151,9 @@ public final UnaryCallable deleteModelVers * explicitly included. *

Example: `projects/{project}/locations/{location}/models/{model}{@literal @}1234` * @param versionAliases Required. The set of version aliases to merge. The alias should be at - * most 128 characters, and match `[a-z][a-z0-9-]{0,126}[a-z-0-9]`. Add the `-` prefix to an - * alias means removing that alias from the version. `-` is NOT counted in the 128 characters. - * Example: `-golden` means removing the `golden` alias from the version. + * most 128 characters, and match `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`. Add the `-` prefix to + * an alias means removing that alias from the version. `-` is NOT counted in the 128 + * characters. Example: `-golden` means removing the `golden` alias from the version. *

There is NO ordering in aliases, which means 1) The aliases returned from GetModel API * might not have the exactly same order from this MergeVersionAliases API. 2) Adding and * deleting the same alias in the request is not recommended, and the 2 operations will be @@ -1189,9 +1189,9 @@ public final Model mergeVersionAliases(ModelName name, List versionAlias * explicitly included. *

Example: `projects/{project}/locations/{location}/models/{model}{@literal @}1234` * @param versionAliases Required. The set of version aliases to merge. The alias should be at - * most 128 characters, and match `[a-z][a-z0-9-]{0,126}[a-z-0-9]`. Add the `-` prefix to an - * alias means removing that alias from the version. `-` is NOT counted in the 128 characters. - * Example: `-golden` means removing the `golden` alias from the version. + * most 128 characters, and match `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`. Add the `-` prefix to + * an alias means removing that alias from the version. `-` is NOT counted in the 128 + * characters. Example: `-golden` means removing the `golden` alias from the version. *

There is NO ordering in aliases, which means 1) The aliases returned from GetModel API * might not have the exactly same order from this MergeVersionAliases API. 2) Adding and * deleting the same alias in the request is not recommended, and the 2 operations will be 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 3f39baf58e1..cbc61de48bc 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 @@ -295,6 +295,9 @@ "ListLocations": { "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] }, + "RemoveDatapoints": { + "methods": ["removeDatapoints", "removeDatapointsCallable"] + }, "SetIamPolicy": { "methods": ["setIamPolicy", "setIamPolicyCallable"] }, @@ -303,6 +306,9 @@ }, "UpdateIndex": { "methods": ["updateIndexAsync", "updateIndexAsync", "updateIndexOperationCallable", "updateIndexCallable"] + }, + "UpsertDatapoints": { + "methods": ["upsertDatapoints", "upsertDatapointsCallable"] } } } diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcIndexServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcIndexServiceStub.java index e653f1bef0e..7980bacebd5 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcIndexServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcIndexServiceStub.java @@ -34,8 +34,12 @@ import com.google.cloud.aiplatform.v1.Index; import com.google.cloud.aiplatform.v1.ListIndexesRequest; import com.google.cloud.aiplatform.v1.ListIndexesResponse; +import com.google.cloud.aiplatform.v1.RemoveDatapointsRequest; +import com.google.cloud.aiplatform.v1.RemoveDatapointsResponse; import com.google.cloud.aiplatform.v1.UpdateIndexOperationMetadata; import com.google.cloud.aiplatform.v1.UpdateIndexRequest; +import com.google.cloud.aiplatform.v1.UpsertDatapointsRequest; +import com.google.cloud.aiplatform.v1.UpsertDatapointsResponse; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -105,6 +109,28 @@ public class GrpcIndexServiceStub extends IndexServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + upsertDatapointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.IndexService/UpsertDatapoints") + .setRequestMarshaller( + ProtoUtils.marshaller(UpsertDatapointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(UpsertDatapointsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeDatapointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.IndexService/RemoveDatapoints") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveDatapointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RemoveDatapointsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -164,6 +190,10 @@ public class GrpcIndexServiceStub extends IndexServiceStub { private final UnaryCallable deleteIndexCallable; private final OperationCallable deleteIndexOperationCallable; + private final UnaryCallable + upsertDatapointsCallable; + private final UnaryCallable + removeDatapointsCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -265,6 +295,28 @@ protected GrpcIndexServiceStub( return params.build(); }) .build(); + GrpcCallSettings + upsertDatapointsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(upsertDatapointsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("index", String.valueOf(request.getIndex())); + return params.build(); + }) + .build(); + GrpcCallSettings + removeDatapointsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeDatapointsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("index", String.valueOf(request.getIndex())); + return params.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -353,6 +405,12 @@ protected GrpcIndexServiceStub( settings.deleteIndexOperationSettings(), clientContext, operationsStub); + this.upsertDatapointsCallable = + callableFactory.createUnaryCallable( + upsertDatapointsTransportSettings, settings.upsertDatapointsSettings(), clientContext); + this.removeDatapointsCallable = + callableFactory.createUnaryCallable( + removeDatapointsTransportSettings, settings.removeDatapointsSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -430,6 +488,18 @@ public UnaryCallable deleteIndexCallable() { return deleteIndexOperationCallable; } + @Override + public UnaryCallable + upsertDatapointsCallable() { + return upsertDatapointsCallable; + } + + @Override + public UnaryCallable + removeDatapointsCallable() { + return removeDatapointsCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/IndexServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/IndexServiceStub.java index e53e746f1af..a33545d99f3 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/IndexServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/IndexServiceStub.java @@ -30,8 +30,12 @@ import com.google.cloud.aiplatform.v1.Index; import com.google.cloud.aiplatform.v1.ListIndexesRequest; import com.google.cloud.aiplatform.v1.ListIndexesResponse; +import com.google.cloud.aiplatform.v1.RemoveDatapointsRequest; +import com.google.cloud.aiplatform.v1.RemoveDatapointsResponse; import com.google.cloud.aiplatform.v1.UpdateIndexOperationMetadata; import com.google.cloud.aiplatform.v1.UpdateIndexRequest; +import com.google.cloud.aiplatform.v1.UpsertDatapointsRequest; +import com.google.cloud.aiplatform.v1.UpsertDatapointsResponse; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -98,6 +102,16 @@ public UnaryCallable deleteIndexCallable() { throw new UnsupportedOperationException("Not implemented: deleteIndexCallable()"); } + public UnaryCallable + upsertDatapointsCallable() { + throw new UnsupportedOperationException("Not implemented: upsertDatapointsCallable()"); + } + + public UnaryCallable + removeDatapointsCallable() { + throw new UnsupportedOperationException("Not implemented: removeDatapointsCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/IndexServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/IndexServiceStubSettings.java index dca0bdb7088..1d4c7b2118a 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/IndexServiceStubSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/IndexServiceStubSettings.java @@ -53,8 +53,12 @@ import com.google.cloud.aiplatform.v1.Index; import com.google.cloud.aiplatform.v1.ListIndexesRequest; import com.google.cloud.aiplatform.v1.ListIndexesResponse; +import com.google.cloud.aiplatform.v1.RemoveDatapointsRequest; +import com.google.cloud.aiplatform.v1.RemoveDatapointsResponse; import com.google.cloud.aiplatform.v1.UpdateIndexOperationMetadata; import com.google.cloud.aiplatform.v1.UpdateIndexRequest; +import com.google.cloud.aiplatform.v1.UpsertDatapointsRequest; +import com.google.cloud.aiplatform.v1.UpsertDatapointsResponse; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -127,6 +131,10 @@ public class IndexServiceStubSettings extends StubSettings deleteIndexSettings; private final OperationCallSettings deleteIndexOperationSettings; + private final UnaryCallSettings + upsertDatapointsSettings; + private final UnaryCallSettings + removeDatapointsSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -286,6 +294,18 @@ public UnaryCallSettings deleteIndexSettings() { return deleteIndexOperationSettings; } + /** Returns the object with the settings used for calls to upsertDatapoints. */ + public UnaryCallSettings + upsertDatapointsSettings() { + return upsertDatapointsSettings; + } + + /** Returns the object with the settings used for calls to removeDatapoints. */ + public UnaryCallSettings + removeDatapointsSettings() { + return removeDatapointsSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -396,6 +416,8 @@ protected IndexServiceStubSettings(Builder settingsBuilder) throws IOException { updateIndexOperationSettings = settingsBuilder.updateIndexOperationSettings().build(); deleteIndexSettings = settingsBuilder.deleteIndexSettings().build(); deleteIndexOperationSettings = settingsBuilder.deleteIndexOperationSettings().build(); + upsertDatapointsSettings = settingsBuilder.upsertDatapointsSettings().build(); + removeDatapointsSettings = settingsBuilder.removeDatapointsSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); @@ -421,6 +443,10 @@ public static class Builder extends StubSettings.Builder deleteIndexSettings; private final OperationCallSettings.Builder deleteIndexOperationSettings; + private final UnaryCallSettings.Builder + upsertDatapointsSettings; + private final UnaryCallSettings.Builder + removeDatapointsSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -464,6 +490,8 @@ protected Builder(ClientContext clientContext) { updateIndexOperationSettings = OperationCallSettings.newBuilder(); deleteIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteIndexOperationSettings = OperationCallSettings.newBuilder(); + upsertDatapointsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + removeDatapointsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -477,6 +505,8 @@ protected Builder(ClientContext clientContext) { listIndexesSettings, updateIndexSettings, deleteIndexSettings, + upsertDatapointsSettings, + removeDatapointsSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -496,6 +526,8 @@ protected Builder(IndexServiceStubSettings settings) { updateIndexOperationSettings = settings.updateIndexOperationSettings.toBuilder(); deleteIndexSettings = settings.deleteIndexSettings.toBuilder(); deleteIndexOperationSettings = settings.deleteIndexOperationSettings.toBuilder(); + upsertDatapointsSettings = settings.upsertDatapointsSettings.toBuilder(); + removeDatapointsSettings = settings.removeDatapointsSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); @@ -509,6 +541,8 @@ protected Builder(IndexServiceStubSettings settings) { listIndexesSettings, updateIndexSettings, deleteIndexSettings, + upsertDatapointsSettings, + removeDatapointsSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -555,6 +589,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .upsertDatapointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .removeDatapointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -720,6 +764,18 @@ public UnaryCallSettings.Builder deleteIndexSetti return deleteIndexOperationSettings; } + /** Returns the builder for the settings used for calls to upsertDatapoints. */ + public UnaryCallSettings.Builder + upsertDatapointsSettings() { + return upsertDatapointsSettings; + } + + /** Returns the builder for the settings used for calls to removeDatapoints. */ + public UnaryCallSettings.Builder + removeDatapointsSettings() { + return removeDatapointsSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceClient.java index 9ef0bd8ec35..f571458a098 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceClient.java @@ -802,6 +802,112 @@ public final UnaryCallable deleteIndexCallable() return stub.deleteIndexCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Add/update Datapoints into an Index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+   *   UpsertDatapointsRequest request =
+   *       UpsertDatapointsRequest.newBuilder()
+   *           .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+   *           .addAllDatapoints(new ArrayList())
+   *           .build();
+   *   UpsertDatapointsResponse response = indexServiceClient.upsertDatapoints(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 UpsertDatapointsResponse upsertDatapoints(UpsertDatapointsRequest request) { + return upsertDatapointsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Add/update Datapoints into an Index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+   *   UpsertDatapointsRequest request =
+   *       UpsertDatapointsRequest.newBuilder()
+   *           .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+   *           .addAllDatapoints(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       indexServiceClient.upsertDatapointsCallable().futureCall(request);
+   *   // Do something.
+   *   UpsertDatapointsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + upsertDatapointsCallable() { + return stub.upsertDatapointsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove Datapoints from an Index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+   *   RemoveDatapointsRequest request =
+   *       RemoveDatapointsRequest.newBuilder()
+   *           .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+   *           .addAllDatapointIds(new ArrayList())
+   *           .build();
+   *   RemoveDatapointsResponse response = indexServiceClient.removeDatapoints(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 RemoveDatapointsResponse removeDatapoints(RemoveDatapointsRequest request) { + return removeDatapointsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Remove Datapoints from an Index. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
+   * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) {
+   *   RemoveDatapointsRequest request =
+   *       RemoveDatapointsRequest.newBuilder()
+   *           .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString())
+   *           .addAllDatapointIds(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       indexServiceClient.removeDatapointsCallable().futureCall(request);
+   *   // Do something.
+   *   RemoveDatapointsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeDatapointsCallable() { + return stub.removeDatapointsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceSettings.java index d16ed7ff3af..fe62e551a68 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceSettings.java @@ -128,6 +128,18 @@ public UnaryCallSettings deleteIndexSettings() { return ((IndexServiceStubSettings) getStubSettings()).deleteIndexOperationSettings(); } + /** Returns the object with the settings used for calls to upsertDatapoints. */ + public UnaryCallSettings + upsertDatapointsSettings() { + return ((IndexServiceStubSettings) getStubSettings()).upsertDatapointsSettings(); + } + + /** Returns the object with the settings used for calls to removeDatapoints. */ + public UnaryCallSettings + removeDatapointsSettings() { + return ((IndexServiceStubSettings) getStubSettings()).removeDatapointsSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -297,6 +309,18 @@ public UnaryCallSettings.Builder deleteIndexSetti return getStubSettingsBuilder().deleteIndexOperationSettings(); } + /** Returns the builder for the settings used for calls to upsertDatapoints. */ + public UnaryCallSettings.Builder + upsertDatapointsSettings() { + return getStubSettingsBuilder().upsertDatapointsSettings(); + } + + /** Returns the builder for the settings used for calls to removeDatapoints. */ + public UnaryCallSettings.Builder + removeDatapointsSettings() { + return getStubSettingsBuilder().removeDatapointsSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> 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 96e594ca105..8c47bb258de 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 @@ -1295,9 +1295,9 @@ public final UnaryCallable deleteModelVers * explicitly included. *

Example: `projects/{project}/locations/{location}/models/{model}{@literal @}1234` * @param versionAliases Required. The set of version aliases to merge. The alias should be at - * most 128 characters, and match `[a-z][a-z0-9-]{0,126}[a-z-0-9]`. Add the `-` prefix to an - * alias means removing that alias from the version. `-` is NOT counted in the 128 characters. - * Example: `-golden` means removing the `golden` alias from the version. + * most 128 characters, and match `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`. Add the `-` prefix to + * an alias means removing that alias from the version. `-` is NOT counted in the 128 + * characters. Example: `-golden` means removing the `golden` alias from the version. *

There is NO ordering in aliases, which means 1) The aliases returned from GetModel API * might not have the exactly same order from this MergeVersionAliases API. 2) Adding and * deleting the same alias in the request is not recommended, and the 2 operations will be @@ -1333,9 +1333,9 @@ public final Model mergeVersionAliases(ModelName name, List versionAlias * explicitly included. *

Example: `projects/{project}/locations/{location}/models/{model}{@literal @}1234` * @param versionAliases Required. The set of version aliases to merge. The alias should be at - * most 128 characters, and match `[a-z][a-z0-9-]{0,126}[a-z-0-9]`. Add the `-` prefix to an - * alias means removing that alias from the version. `-` is NOT counted in the 128 characters. - * Example: `-golden` means removing the `golden` alias from the version. + * most 128 characters, and match `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`. Add the `-` prefix to + * an alias means removing that alias from the version. `-` is NOT counted in the 128 + * characters. Example: `-golden` means removing the `golden` alias from the version. *

There is NO ordering in aliases, which means 1) The aliases returned from GetModel API * might not have the exactly same order from this MergeVersionAliases API. 2) Adding and * deleting the same alias in the request is not recommended, and the 2 operations will be 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 929f6195871..4db13dbe841 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 @@ -337,6 +337,9 @@ "ListLocations": { "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] }, + "RemoveDatapoints": { + "methods": ["removeDatapoints", "removeDatapointsCallable"] + }, "SetIamPolicy": { "methods": ["setIamPolicy", "setIamPolicyCallable"] }, @@ -345,6 +348,9 @@ }, "UpdateIndex": { "methods": ["updateIndexAsync", "updateIndexAsync", "updateIndexOperationCallable", "updateIndexCallable"] + }, + "UpsertDatapoints": { + "methods": ["upsertDatapoints", "upsertDatapointsCallable"] } } } diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcIndexServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcIndexServiceStub.java index 006a1601888..b21f862e9ad 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcIndexServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcIndexServiceStub.java @@ -35,8 +35,12 @@ import com.google.cloud.aiplatform.v1beta1.Index; import com.google.cloud.aiplatform.v1beta1.ListIndexesRequest; import com.google.cloud.aiplatform.v1beta1.ListIndexesResponse; +import com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest; +import com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse; import com.google.cloud.aiplatform.v1beta1.UpdateIndexOperationMetadata; import com.google.cloud.aiplatform.v1beta1.UpdateIndexRequest; +import com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest; +import com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -107,6 +111,28 @@ public class GrpcIndexServiceStub extends IndexServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + upsertDatapointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.IndexService/UpsertDatapoints") + .setRequestMarshaller( + ProtoUtils.marshaller(UpsertDatapointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(UpsertDatapointsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + removeDatapointsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.IndexService/RemoveDatapoints") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveDatapointsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RemoveDatapointsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -166,6 +192,10 @@ public class GrpcIndexServiceStub extends IndexServiceStub { private final UnaryCallable deleteIndexCallable; private final OperationCallable deleteIndexOperationCallable; + private final UnaryCallable + upsertDatapointsCallable; + private final UnaryCallable + removeDatapointsCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -267,6 +297,28 @@ protected GrpcIndexServiceStub( return params.build(); }) .build(); + GrpcCallSettings + upsertDatapointsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(upsertDatapointsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("index", String.valueOf(request.getIndex())); + return params.build(); + }) + .build(); + GrpcCallSettings + removeDatapointsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeDatapointsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("index", String.valueOf(request.getIndex())); + return params.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -355,6 +407,12 @@ protected GrpcIndexServiceStub( settings.deleteIndexOperationSettings(), clientContext, operationsStub); + this.upsertDatapointsCallable = + callableFactory.createUnaryCallable( + upsertDatapointsTransportSettings, settings.upsertDatapointsSettings(), clientContext); + this.removeDatapointsCallable = + callableFactory.createUnaryCallable( + removeDatapointsTransportSettings, settings.removeDatapointsSettings(), clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -432,6 +490,18 @@ public UnaryCallable deleteIndexCallable() { return deleteIndexOperationCallable; } + @Override + public UnaryCallable + upsertDatapointsCallable() { + return upsertDatapointsCallable; + } + + @Override + public UnaryCallable + removeDatapointsCallable() { + return removeDatapointsCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/IndexServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/IndexServiceStub.java index 47bdbdb7634..66d64675464 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/IndexServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/IndexServiceStub.java @@ -31,8 +31,12 @@ import com.google.cloud.aiplatform.v1beta1.Index; import com.google.cloud.aiplatform.v1beta1.ListIndexesRequest; import com.google.cloud.aiplatform.v1beta1.ListIndexesResponse; +import com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest; +import com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse; import com.google.cloud.aiplatform.v1beta1.UpdateIndexOperationMetadata; import com.google.cloud.aiplatform.v1beta1.UpdateIndexRequest; +import com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest; +import com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -100,6 +104,16 @@ public UnaryCallable deleteIndexCallable() { throw new UnsupportedOperationException("Not implemented: deleteIndexCallable()"); } + public UnaryCallable + upsertDatapointsCallable() { + throw new UnsupportedOperationException("Not implemented: upsertDatapointsCallable()"); + } + + public UnaryCallable + removeDatapointsCallable() { + throw new UnsupportedOperationException("Not implemented: removeDatapointsCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/IndexServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/IndexServiceStubSettings.java index d778d0476ec..9cd8849ae18 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/IndexServiceStubSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/IndexServiceStubSettings.java @@ -53,8 +53,12 @@ import com.google.cloud.aiplatform.v1beta1.Index; import com.google.cloud.aiplatform.v1beta1.ListIndexesRequest; import com.google.cloud.aiplatform.v1beta1.ListIndexesResponse; +import com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest; +import com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse; import com.google.cloud.aiplatform.v1beta1.UpdateIndexOperationMetadata; import com.google.cloud.aiplatform.v1beta1.UpdateIndexRequest; +import com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest; +import com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -128,6 +132,10 @@ public class IndexServiceStubSettings extends StubSettings deleteIndexSettings; private final OperationCallSettings deleteIndexOperationSettings; + private final UnaryCallSettings + upsertDatapointsSettings; + private final UnaryCallSettings + removeDatapointsSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -287,6 +295,18 @@ public UnaryCallSettings deleteIndexSettings() { return deleteIndexOperationSettings; } + /** Returns the object with the settings used for calls to upsertDatapoints. */ + public UnaryCallSettings + upsertDatapointsSettings() { + return upsertDatapointsSettings; + } + + /** Returns the object with the settings used for calls to removeDatapoints. */ + public UnaryCallSettings + removeDatapointsSettings() { + return removeDatapointsSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -397,6 +417,8 @@ protected IndexServiceStubSettings(Builder settingsBuilder) throws IOException { updateIndexOperationSettings = settingsBuilder.updateIndexOperationSettings().build(); deleteIndexSettings = settingsBuilder.deleteIndexSettings().build(); deleteIndexOperationSettings = settingsBuilder.deleteIndexOperationSettings().build(); + upsertDatapointsSettings = settingsBuilder.upsertDatapointsSettings().build(); + removeDatapointsSettings = settingsBuilder.removeDatapointsSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); @@ -422,6 +444,10 @@ public static class Builder extends StubSettings.Builder deleteIndexSettings; private final OperationCallSettings.Builder deleteIndexOperationSettings; + private final UnaryCallSettings.Builder + upsertDatapointsSettings; + private final UnaryCallSettings.Builder + removeDatapointsSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -475,6 +501,8 @@ protected Builder(ClientContext clientContext) { updateIndexOperationSettings = OperationCallSettings.newBuilder(); deleteIndexSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteIndexOperationSettings = OperationCallSettings.newBuilder(); + upsertDatapointsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + removeDatapointsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -488,6 +516,8 @@ protected Builder(ClientContext clientContext) { listIndexesSettings, updateIndexSettings, deleteIndexSettings, + upsertDatapointsSettings, + removeDatapointsSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -507,6 +537,8 @@ protected Builder(IndexServiceStubSettings settings) { updateIndexOperationSettings = settings.updateIndexOperationSettings.toBuilder(); deleteIndexSettings = settings.deleteIndexSettings.toBuilder(); deleteIndexOperationSettings = settings.deleteIndexOperationSettings.toBuilder(); + upsertDatapointsSettings = settings.upsertDatapointsSettings.toBuilder(); + removeDatapointsSettings = settings.removeDatapointsSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); @@ -520,6 +552,8 @@ protected Builder(IndexServiceStubSettings settings) { listIndexesSettings, updateIndexSettings, deleteIndexSettings, + upsertDatapointsSettings, + removeDatapointsSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -566,6 +600,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + builder + .upsertDatapointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .removeDatapointsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -731,6 +775,18 @@ public UnaryCallSettings.Builder deleteIndexSetti return deleteIndexOperationSettings; } + /** Returns the builder for the settings used for calls to upsertDatapoints. */ + public UnaryCallSettings.Builder + upsertDatapointsSettings() { + return upsertDatapointsSettings; + } + + /** Returns the builder for the settings used for calls to removeDatapoints. */ + public UnaryCallSettings.Builder + removeDatapointsSettings() { + return removeDatapointsSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/IndexServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/IndexServiceClientTest.java index a472a117114..e83ee956a84 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/IndexServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/IndexServiceClientTest.java @@ -121,6 +121,7 @@ public void createIndexTest() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setIndexStats(IndexStats.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -179,6 +180,7 @@ public void createIndexTest2() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setIndexStats(IndexStats.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -237,6 +239,7 @@ public void getIndexTest() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setIndexStats(IndexStats.newBuilder().build()) .build(); mockIndexService.addResponse(expectedResponse); @@ -284,6 +287,7 @@ public void getIndexTest2() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setIndexStats(IndexStats.newBuilder().build()) .build(); mockIndexService.addResponse(expectedResponse); @@ -419,6 +423,7 @@ public void updateIndexTest() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setIndexStats(IndexStats.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -547,6 +552,94 @@ public void deleteIndexExceptionTest2() throws Exception { } } + @Test + public void upsertDatapointsTest() throws Exception { + UpsertDatapointsResponse expectedResponse = UpsertDatapointsResponse.newBuilder().build(); + mockIndexService.addResponse(expectedResponse); + + UpsertDatapointsRequest request = + UpsertDatapointsRequest.newBuilder() + .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString()) + .addAllDatapoints(new ArrayList()) + .build(); + + UpsertDatapointsResponse actualResponse = client.upsertDatapoints(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIndexService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpsertDatapointsRequest actualRequest = ((UpsertDatapointsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getIndex(), actualRequest.getIndex()); + Assert.assertEquals(request.getDatapointsList(), actualRequest.getDatapointsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void upsertDatapointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIndexService.addException(exception); + + try { + UpsertDatapointsRequest request = + UpsertDatapointsRequest.newBuilder() + .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString()) + .addAllDatapoints(new ArrayList()) + .build(); + client.upsertDatapoints(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeDatapointsTest() throws Exception { + RemoveDatapointsResponse expectedResponse = RemoveDatapointsResponse.newBuilder().build(); + mockIndexService.addResponse(expectedResponse); + + RemoveDatapointsRequest request = + RemoveDatapointsRequest.newBuilder() + .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString()) + .addAllDatapointIds(new ArrayList()) + .build(); + + RemoveDatapointsResponse actualResponse = client.removeDatapoints(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIndexService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveDatapointsRequest actualRequest = ((RemoveDatapointsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getIndex(), actualRequest.getIndex()); + Assert.assertEquals(request.getDatapointIdsList(), actualRequest.getDatapointIdsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeDatapointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIndexService.addException(exception); + + try { + RemoveDatapointsRequest request = + RemoveDatapointsRequest.newBuilder() + .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString()) + .addAllDatapointIds(new ArrayList()) + .build(); + client.removeDatapoints(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockIndexServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockIndexServiceImpl.java index 3261637c648..b1f90670848 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockIndexServiceImpl.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockIndexServiceImpl.java @@ -159,4 +159,46 @@ public void deleteIndex(DeleteIndexRequest request, StreamObserver re Exception.class.getName()))); } } + + @Override + public void upsertDatapoints( + UpsertDatapointsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UpsertDatapointsResponse) { + requests.add(request); + responseObserver.onNext(((UpsertDatapointsResponse) 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 UpsertDatapoints, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UpsertDatapointsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void removeDatapoints( + RemoveDatapointsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RemoveDatapointsResponse) { + requests.add(request); + responseObserver.onNext(((RemoveDatapointsResponse) 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 RemoveDatapoints, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RemoveDatapointsResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/IndexServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/IndexServiceClientTest.java index c7810750dc8..80fe3094726 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/IndexServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/IndexServiceClientTest.java @@ -121,6 +121,7 @@ public void createIndexTest() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setIndexStats(IndexStats.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -179,6 +180,7 @@ public void createIndexTest2() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setIndexStats(IndexStats.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -237,6 +239,7 @@ public void getIndexTest() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setIndexStats(IndexStats.newBuilder().build()) .build(); mockIndexService.addResponse(expectedResponse); @@ -284,6 +287,7 @@ public void getIndexTest2() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setIndexStats(IndexStats.newBuilder().build()) .build(); mockIndexService.addResponse(expectedResponse); @@ -419,6 +423,7 @@ public void updateIndexTest() throws Exception { .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) + .setIndexStats(IndexStats.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -547,6 +552,94 @@ public void deleteIndexExceptionTest2() throws Exception { } } + @Test + public void upsertDatapointsTest() throws Exception { + UpsertDatapointsResponse expectedResponse = UpsertDatapointsResponse.newBuilder().build(); + mockIndexService.addResponse(expectedResponse); + + UpsertDatapointsRequest request = + UpsertDatapointsRequest.newBuilder() + .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString()) + .addAllDatapoints(new ArrayList()) + .build(); + + UpsertDatapointsResponse actualResponse = client.upsertDatapoints(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIndexService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpsertDatapointsRequest actualRequest = ((UpsertDatapointsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getIndex(), actualRequest.getIndex()); + Assert.assertEquals(request.getDatapointsList(), actualRequest.getDatapointsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void upsertDatapointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIndexService.addException(exception); + + try { + UpsertDatapointsRequest request = + UpsertDatapointsRequest.newBuilder() + .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString()) + .addAllDatapoints(new ArrayList()) + .build(); + client.upsertDatapoints(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void removeDatapointsTest() throws Exception { + RemoveDatapointsResponse expectedResponse = RemoveDatapointsResponse.newBuilder().build(); + mockIndexService.addResponse(expectedResponse); + + RemoveDatapointsRequest request = + RemoveDatapointsRequest.newBuilder() + .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString()) + .addAllDatapointIds(new ArrayList()) + .build(); + + RemoveDatapointsResponse actualResponse = client.removeDatapoints(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIndexService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveDatapointsRequest actualRequest = ((RemoveDatapointsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getIndex(), actualRequest.getIndex()); + Assert.assertEquals(request.getDatapointIdsList(), actualRequest.getDatapointIdsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeDatapointsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIndexService.addException(exception); + + try { + RemoveDatapointsRequest request = + RemoveDatapointsRequest.newBuilder() + .setIndex(IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]").toString()) + .addAllDatapointIds(new ArrayList()) + .build(); + client.removeDatapoints(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockIndexServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockIndexServiceImpl.java index 24593209d1e..366c35241e8 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockIndexServiceImpl.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockIndexServiceImpl.java @@ -159,4 +159,46 @@ public void deleteIndex(DeleteIndexRequest request, StreamObserver re Exception.class.getName()))); } } + + @Override + public void upsertDatapoints( + UpsertDatapointsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UpsertDatapointsResponse) { + requests.add(request); + responseObserver.onNext(((UpsertDatapointsResponse) 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 UpsertDatapoints, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UpsertDatapointsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void removeDatapoints( + RemoveDatapointsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RemoveDatapointsResponse) { + requests.add(request); + responseObserver.onNext(((RemoveDatapointsResponse) 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 RemoveDatapoints, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RemoveDatapointsResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceGrpc.java index 1c331406b2e..fc00d0ab584 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceGrpc.java +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceGrpc.java @@ -248,6 +248,100 @@ private IndexServiceGrpc() {} return getDeleteIndexMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest, + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse> + getUpsertDatapointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpsertDatapoints", + requestType = com.google.cloud.aiplatform.v1.UpsertDatapointsRequest.class, + responseType = com.google.cloud.aiplatform.v1.UpsertDatapointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest, + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse> + getUpsertDatapointsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest, + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse> + getUpsertDatapointsMethod; + if ((getUpsertDatapointsMethod = IndexServiceGrpc.getUpsertDatapointsMethod) == null) { + synchronized (IndexServiceGrpc.class) { + if ((getUpsertDatapointsMethod = IndexServiceGrpc.getUpsertDatapointsMethod) == null) { + IndexServiceGrpc.getUpsertDatapointsMethod = + getUpsertDatapointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpsertDatapoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new IndexServiceMethodDescriptorSupplier("UpsertDatapoints")) + .build(); + } + } + } + return getUpsertDatapointsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest, + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse> + getRemoveDatapointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveDatapoints", + requestType = com.google.cloud.aiplatform.v1.RemoveDatapointsRequest.class, + responseType = com.google.cloud.aiplatform.v1.RemoveDatapointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest, + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse> + getRemoveDatapointsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest, + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse> + getRemoveDatapointsMethod; + if ((getRemoveDatapointsMethod = IndexServiceGrpc.getRemoveDatapointsMethod) == null) { + synchronized (IndexServiceGrpc.class) { + if ((getRemoveDatapointsMethod = IndexServiceGrpc.getRemoveDatapointsMethod) == null) { + IndexServiceGrpc.getRemoveDatapointsMethod = + getRemoveDatapointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveDatapoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new IndexServiceMethodDescriptorSupplier("RemoveDatapoints")) + .build(); + } + } + } + return getRemoveDatapointsMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static IndexServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -370,6 +464,36 @@ public void deleteIndex( getDeleteIndexMethod(), responseObserver); } + /** + * + * + *

+     * Add/update Datapoints into an Index.
+     * 
+ */ + public void upsertDatapoints( + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpsertDatapointsMethod(), responseObserver); + } + + /** + * + * + *
+     * Remove Datapoints from an Index.
+     * 
+ */ + public void removeDatapoints( + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRemoveDatapointsMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -404,6 +528,20 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.aiplatform.v1.DeleteIndexRequest, com.google.longrunning.Operation>(this, METHODID_DELETE_INDEX))) + .addMethod( + getUpsertDatapointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest, + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse>( + this, METHODID_UPSERT_DATAPOINTS))) + .addMethod( + getRemoveDatapointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest, + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse>( + this, METHODID_REMOVE_DATAPOINTS))) .build(); } } @@ -506,6 +644,40 @@ public void deleteIndex( request, responseObserver); } + + /** + * + * + *
+     * Add/update Datapoints into an Index.
+     * 
+ */ + public void upsertDatapoints( + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpsertDatapointsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Remove Datapoints from an Index.
+     * 
+ */ + public void removeDatapoints( + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveDatapointsMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -593,6 +765,32 @@ public com.google.longrunning.Operation deleteIndex( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteIndexMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Add/update Datapoints into an Index.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.UpsertDatapointsResponse upsertDatapoints( + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpsertDatapointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Remove Datapoints from an Index.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.RemoveDatapointsResponse removeDatapoints( + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveDatapointsMethod(), getCallOptions(), request); + } } /** @@ -681,6 +879,34 @@ protected IndexServiceFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteIndexMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Add/update Datapoints into an Index.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse> + upsertDatapoints(com.google.cloud.aiplatform.v1.UpsertDatapointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpsertDatapointsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Remove Datapoints from an Index.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse> + removeDatapoints(com.google.cloud.aiplatform.v1.RemoveDatapointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveDatapointsMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_INDEX = 0; @@ -688,6 +914,8 @@ protected IndexServiceFutureStub build( private static final int METHODID_LIST_INDEXES = 2; private static final int METHODID_UPDATE_INDEX = 3; private static final int METHODID_DELETE_INDEX = 4; + private static final int METHODID_UPSERT_DATAPOINTS = 5; + private static final int METHODID_REMOVE_DATAPOINTS = 6; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -732,6 +960,18 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.aiplatform.v1.DeleteIndexRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UPSERT_DATAPOINTS: + serviceImpl.upsertDatapoints( + (com.google.cloud.aiplatform.v1.UpsertDatapointsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_REMOVE_DATAPOINTS: + serviceImpl.removeDatapoints( + (com.google.cloud.aiplatform.v1.RemoveDatapointsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -801,6 +1041,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListIndexesMethod()) .addMethod(getUpdateIndexMethod()) .addMethod(getDeleteIndexMethod()) + .addMethod(getUpsertDatapointsMethod()) + .addMethod(getRemoveDatapointsMethod()) .build(); } } diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceGrpc.java index c8bff54dd7d..353a5d6b3d4 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceGrpc.java +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceGrpc.java @@ -255,6 +255,100 @@ private IndexServiceGrpc() {} return getDeleteIndexMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest, + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse> + getUpsertDatapointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpsertDatapoints", + requestType = com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest, + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse> + getUpsertDatapointsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest, + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse> + getUpsertDatapointsMethod; + if ((getUpsertDatapointsMethod = IndexServiceGrpc.getUpsertDatapointsMethod) == null) { + synchronized (IndexServiceGrpc.class) { + if ((getUpsertDatapointsMethod = IndexServiceGrpc.getUpsertDatapointsMethod) == null) { + IndexServiceGrpc.getUpsertDatapointsMethod = + getUpsertDatapointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpsertDatapoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new IndexServiceMethodDescriptorSupplier("UpsertDatapoints")) + .build(); + } + } + } + return getUpsertDatapointsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest, + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse> + getRemoveDatapointsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveDatapoints", + requestType = com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest, + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse> + getRemoveDatapointsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest, + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse> + getRemoveDatapointsMethod; + if ((getRemoveDatapointsMethod = IndexServiceGrpc.getRemoveDatapointsMethod) == null) { + synchronized (IndexServiceGrpc.class) { + if ((getRemoveDatapointsMethod = IndexServiceGrpc.getRemoveDatapointsMethod) == null) { + IndexServiceGrpc.getRemoveDatapointsMethod = + getRemoveDatapointsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveDatapoints")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new IndexServiceMethodDescriptorSupplier("RemoveDatapoints")) + .build(); + } + } + } + return getRemoveDatapointsMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static IndexServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -377,6 +471,36 @@ public void deleteIndex( getDeleteIndexMethod(), responseObserver); } + /** + * + * + *
+     * Add/update Datapoints into an Index.
+     * 
+ */ + public void upsertDatapoints( + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpsertDatapointsMethod(), responseObserver); + } + + /** + * + * + *
+     * Remove Datapoints from an Index.
+     * 
+ */ + public void removeDatapoints( + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRemoveDatapointsMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -411,6 +535,20 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.aiplatform.v1beta1.DeleteIndexRequest, com.google.longrunning.Operation>(this, METHODID_DELETE_INDEX))) + .addMethod( + getUpsertDatapointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest, + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse>( + this, METHODID_UPSERT_DATAPOINTS))) + .addMethod( + getRemoveDatapointsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest, + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse>( + this, METHODID_REMOVE_DATAPOINTS))) .build(); } } @@ -513,6 +651,40 @@ public void deleteIndex( request, responseObserver); } + + /** + * + * + *
+     * Add/update Datapoints into an Index.
+     * 
+ */ + public void upsertDatapoints( + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpsertDatapointsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Remove Datapoints from an Index.
+     * 
+ */ + public void removeDatapoints( + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveDatapointsMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -600,6 +772,32 @@ public com.google.longrunning.Operation deleteIndex( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteIndexMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Add/update Datapoints into an Index.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse upsertDatapoints( + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpsertDatapointsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Remove Datapoints from an Index.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse removeDatapoints( + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveDatapointsMethod(), getCallOptions(), request); + } } /** @@ -689,6 +887,34 @@ protected IndexServiceFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteIndexMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Add/update Datapoints into an Index.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse> + upsertDatapoints(com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpsertDatapointsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Remove Datapoints from an Index.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse> + removeDatapoints(com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveDatapointsMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_INDEX = 0; @@ -696,6 +922,8 @@ protected IndexServiceFutureStub build( private static final int METHODID_LIST_INDEXES = 2; private static final int METHODID_UPDATE_INDEX = 3; private static final int METHODID_DELETE_INDEX = 4; + private static final int METHODID_UPSERT_DATAPOINTS = 5; + private static final int METHODID_REMOVE_DATAPOINTS = 6; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -741,6 +969,20 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.aiplatform.v1beta1.DeleteIndexRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UPSERT_DATAPOINTS: + serviceImpl.upsertDatapoints( + (com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse>) + responseObserver); + break; + case METHODID_REMOVE_DATAPOINTS: + serviceImpl.removeDatapoints( + (com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -810,6 +1052,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListIndexesMethod()) .addMethod(getUpdateIndexMethod()) .addMethod(getDeleteIndexMethod()) + .addMethod(getUpsertDatapointsMethod()) + .addMethod(getRemoveDatapointsMethod()) .build(); } } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationParameters.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationParameters.java index c11535d903f..b8d60acde81 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationParameters.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationParameters.java @@ -464,7 +464,7 @@ public int getTopK() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -487,7 +487,7 @@ public boolean hasOutputIndices() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -512,7 +512,7 @@ public com.google.protobuf.ListValue getOutputIndices() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -1840,7 +1840,7 @@ public Builder clearTopK() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -1862,7 +1862,7 @@ public boolean hasOutputIndices() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -1890,7 +1890,7 @@ public com.google.protobuf.ListValue getOutputIndices() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -1920,7 +1920,7 @@ public Builder setOutputIndices(com.google.protobuf.ListValue value) { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -1947,7 +1947,7 @@ public Builder setOutputIndices(com.google.protobuf.ListValue.Builder builderFor * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -1981,7 +1981,7 @@ public Builder mergeOutputIndices(com.google.protobuf.ListValue value) { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -2009,7 +2009,7 @@ public Builder clearOutputIndices() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -2031,7 +2031,7 @@ public com.google.protobuf.ListValue.Builder getOutputIndicesBuilder() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -2057,7 +2057,7 @@ public com.google.protobuf.ListValueOrBuilder getOutputIndicesOrBuilder() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationParametersOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationParametersOrBuilder.java index 917225a9eac..0d021ca6a76 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationParametersOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationParametersOrBuilder.java @@ -200,7 +200,7 @@ public interface ExplanationParametersOrBuilder * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -220,7 +220,7 @@ public interface ExplanationParametersOrBuilder * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -240,7 +240,7 @@ public interface ExplanationParametersOrBuilder * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationProto.java index 030f8f19e8d..ff4d8dc3dd4 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationProto.java @@ -135,7 +135,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ers\030\001 \001(\01321.google.cloud.aiplatform.v1.E" + "xplanationParametersB\003\340A\002\022F\n\010metadata\030\002 " + "\001(\0132/.google.cloud.aiplatform.v1.Explana" - + "tionMetadataB\003\340A\002\"\363\002\n\025ExplanationParamet" + + "tionMetadataB\003\340A\001\"\363\002\n\025ExplanationParamet" + "ers\022\\\n\033sampled_shapley_attribution\030\001 \001(\013" + "25.google.cloud.aiplatform.v1.SampledSha" + "pleyAttributionH\000\022f\n integrated_gradient" diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationSpec.java index 392719a890a..94e5ed55c51 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationSpec.java @@ -198,11 +198,11 @@ public com.google.cloud.aiplatform.v1.ExplanationParametersOrBuilder getParamete * * *
-   * Required. Metadata describing the Model's input and output for explanation.
+   * Optional. Metadata describing the Model's input and output for explanation.
    * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the metadata field is set. @@ -215,11 +215,11 @@ public boolean hasMetadata() { * * *
-   * Required. Metadata describing the Model's input and output for explanation.
+   * Optional. Metadata describing the Model's input and output for explanation.
    * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The metadata. @@ -234,11 +234,11 @@ public com.google.cloud.aiplatform.v1.ExplanationMetadata getMetadata() { * * *
-   * Required. Metadata describing the Model's input and output for explanation.
+   * Optional. Metadata describing the Model's input and output for explanation.
    * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override @@ -816,11 +816,11 @@ public com.google.cloud.aiplatform.v1.ExplanationParametersOrBuilder getParamete * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the metadata field is set. @@ -832,11 +832,11 @@ public boolean hasMetadata() { * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The metadata. @@ -854,11 +854,11 @@ public com.google.cloud.aiplatform.v1.ExplanationMetadata getMetadata() { * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setMetadata(com.google.cloud.aiplatform.v1.ExplanationMetadata value) { @@ -878,11 +878,11 @@ public Builder setMetadata(com.google.cloud.aiplatform.v1.ExplanationMetadata va * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setMetadata( @@ -900,11 +900,11 @@ public Builder setMetadata( * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergeMetadata(com.google.cloud.aiplatform.v1.ExplanationMetadata value) { @@ -928,11 +928,11 @@ public Builder mergeMetadata(com.google.cloud.aiplatform.v1.ExplanationMetadata * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearMetadata() { @@ -950,11 +950,11 @@ public Builder clearMetadata() { * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.aiplatform.v1.ExplanationMetadata.Builder getMetadataBuilder() { @@ -966,11 +966,11 @@ public com.google.cloud.aiplatform.v1.ExplanationMetadata.Builder getMetadataBui * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.aiplatform.v1.ExplanationMetadataOrBuilder getMetadataOrBuilder() { @@ -986,11 +986,11 @@ public com.google.cloud.aiplatform.v1.ExplanationMetadataOrBuilder getMetadataOr * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationSpecOrBuilder.java index 49c2aa13814..af6ea3503b0 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ExplanationSpecOrBuilder.java @@ -68,11 +68,11 @@ public interface ExplanationSpecOrBuilder * * *
-   * Required. Metadata describing the Model's input and output for explanation.
+   * Optional. Metadata describing the Model's input and output for explanation.
    * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the metadata field is set. @@ -82,11 +82,11 @@ public interface ExplanationSpecOrBuilder * * *
-   * Required. Metadata describing the Model's input and output for explanation.
+   * Optional. Metadata describing the Model's input and output for explanation.
    * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The metadata. @@ -96,11 +96,11 @@ public interface ExplanationSpecOrBuilder * * *
-   * Required. Metadata describing the Model's input and output for explanation.
+   * Optional. Metadata describing the Model's input and output for explanation.
    * 
* * - * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ com.google.cloud.aiplatform.v1.ExplanationMetadataOrBuilder getMetadataOrBuilder(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Index.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Index.java index b254165888a..9e965a09ded 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Index.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Index.java @@ -45,6 +45,7 @@ private Index() { metadataSchemaUri_ = ""; deployedIndexes_ = java.util.Collections.emptyList(); etag_ = ""; + indexUpdateMethod_ = 0; } @java.lang.Override @@ -179,6 +180,29 @@ private Index( updateTime_ = subBuilder.buildPartial(); } + break; + } + case 114: + { + com.google.cloud.aiplatform.v1.IndexStats.Builder subBuilder = null; + if (indexStats_ != null) { + subBuilder = indexStats_.toBuilder(); + } + indexStats_ = + input.readMessage( + com.google.cloud.aiplatform.v1.IndexStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(indexStats_); + indexStats_ = subBuilder.buildPartial(); + } + + break; + } + case 128: + { + int rawValue = input.readEnum(); + + indexUpdateMethod_ = rawValue; break; } default: @@ -231,6 +255,172 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { com.google.cloud.aiplatform.v1.Index.Builder.class); } + /** + * + * + *
+   * The update method of an Index.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.Index.IndexUpdateMethod} + */ + public enum IndexUpdateMethod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be used.
+     * 
+ * + * INDEX_UPDATE_METHOD_UNSPECIFIED = 0; + */ + INDEX_UPDATE_METHOD_UNSPECIFIED(0), + /** + * + * + *
+     * BatchUpdate: user can call UpdateIndex with files on Cloud Storage of
+     * datapoints to update.
+     * 
+ * + * BATCH_UPDATE = 1; + */ + BATCH_UPDATE(1), + /** + * + * + *
+     * StreamUpdate: user can call UpsertDatapoints/DeleteDatapoints to update
+     * the Index and the updates will be applied in corresponding
+     * DeployedIndexes in nearly real-time.
+     * 
+ * + * STREAM_UPDATE = 2; + */ + STREAM_UPDATE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be used.
+     * 
+ * + * INDEX_UPDATE_METHOD_UNSPECIFIED = 0; + */ + public static final int INDEX_UPDATE_METHOD_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * BatchUpdate: user can call UpdateIndex with files on Cloud Storage of
+     * datapoints to update.
+     * 
+ * + * BATCH_UPDATE = 1; + */ + public static final int BATCH_UPDATE_VALUE = 1; + /** + * + * + *
+     * StreamUpdate: user can call UpsertDatapoints/DeleteDatapoints to update
+     * the Index and the updates will be applied in corresponding
+     * DeployedIndexes in nearly real-time.
+     * 
+ * + * STREAM_UPDATE = 2; + */ + public static final int STREAM_UPDATE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IndexUpdateMethod valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static IndexUpdateMethod forNumber(int value) { + switch (value) { + case 0: + return INDEX_UPDATE_METHOD_UNSPECIFIED; + case 1: + return BATCH_UPDATE; + case 2: + return STREAM_UPDATE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public IndexUpdateMethod findValueByNumber(int number) { + return IndexUpdateMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.Index.getDescriptor().getEnumTypes().get(0); + } + + private static final IndexUpdateMethod[] VALUES = values(); + + public static IndexUpdateMethod valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private IndexUpdateMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.Index.IndexUpdateMethod) + } + public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** @@ -868,6 +1058,104 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } + public static final int INDEX_STATS_FIELD_NUMBER = 14; + private com.google.cloud.aiplatform.v1.IndexStats indexStats_; + /** + * + * + *
+   * Output only. Stats of the index resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the indexStats field is set. + */ + @java.lang.Override + public boolean hasIndexStats() { + return indexStats_ != null; + } + /** + * + * + *
+   * Output only. Stats of the index resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The indexStats. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexStats getIndexStats() { + return indexStats_ == null + ? com.google.cloud.aiplatform.v1.IndexStats.getDefaultInstance() + : indexStats_; + } + /** + * + * + *
+   * Output only. Stats of the index resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexStatsOrBuilder getIndexStatsOrBuilder() { + return getIndexStats(); + } + + public static final int INDEX_UPDATE_METHOD_FIELD_NUMBER = 16; + private int indexUpdateMethod_; + /** + * + * + *
+   * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+   * used by default.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for indexUpdateMethod. + */ + @java.lang.Override + public int getIndexUpdateMethodValue() { + return indexUpdateMethod_; + } + /** + * + * + *
+   * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+   * used by default.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The indexUpdateMethod. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Index.IndexUpdateMethod getIndexUpdateMethod() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.Index.IndexUpdateMethod result = + com.google.cloud.aiplatform.v1.Index.IndexUpdateMethod.valueOf(indexUpdateMethod_); + return result == null + ? com.google.cloud.aiplatform.v1.Index.IndexUpdateMethod.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -911,6 +1199,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(11, getUpdateTime()); } + if (indexStats_ != null) { + output.writeMessage(14, getIndexStats()); + } + if (indexUpdateMethod_ + != com.google.cloud.aiplatform.v1.Index.IndexUpdateMethod.INDEX_UPDATE_METHOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(16, indexUpdateMethod_); + } unknownFields.writeTo(output); } @@ -957,6 +1253,14 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); } + if (indexStats_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getIndexStats()); + } + if (indexUpdateMethod_ + != com.google.cloud.aiplatform.v1.Index.IndexUpdateMethod.INDEX_UPDATE_METHOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, indexUpdateMethod_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -991,6 +1295,11 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } + if (hasIndexStats() != other.hasIndexStats()) return false; + if (hasIndexStats()) { + if (!getIndexStats().equals(other.getIndexStats())) return false; + } + if (indexUpdateMethod_ != other.indexUpdateMethod_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1032,6 +1341,12 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } + if (hasIndexStats()) { + hash = (37 * hash) + INDEX_STATS_FIELD_NUMBER; + hash = (53 * hash) + getIndexStats().hashCode(); + } + hash = (37 * hash) + INDEX_UPDATE_METHOD_FIELD_NUMBER; + hash = (53 * hash) + indexUpdateMethod_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1234,6 +1549,14 @@ public Builder clear() { updateTime_ = null; updateTimeBuilder_ = null; } + if (indexStatsBuilder_ == null) { + indexStats_ = null; + } else { + indexStats_ = null; + indexStatsBuilder_ = null; + } + indexUpdateMethod_ = 0; + return this; } @@ -1292,6 +1615,12 @@ public com.google.cloud.aiplatform.v1.Index buildPartial() { } else { result.updateTime_ = updateTimeBuilder_.build(); } + if (indexStatsBuilder_ == null) { + result.indexStats_ = indexStats_; + } else { + result.indexStats_ = indexStatsBuilder_.build(); + } + result.indexUpdateMethod_ = indexUpdateMethod_; onBuilt(); return result; } @@ -1398,6 +1727,12 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.Index other) { if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } + if (other.hasIndexStats()) { + mergeIndexStats(other.getIndexStats()); + } + if (other.indexUpdateMethod_ != 0) { + setIndexUpdateMethodValue(other.getIndexUpdateMethodValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3281,6 +3616,319 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return updateTimeBuilder_; } + private com.google.cloud.aiplatform.v1.IndexStats indexStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexStats, + com.google.cloud.aiplatform.v1.IndexStats.Builder, + com.google.cloud.aiplatform.v1.IndexStatsOrBuilder> + indexStatsBuilder_; + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the indexStats field is set. + */ + public boolean hasIndexStats() { + return indexStatsBuilder_ != null || indexStats_ != null; + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The indexStats. + */ + public com.google.cloud.aiplatform.v1.IndexStats getIndexStats() { + if (indexStatsBuilder_ == null) { + return indexStats_ == null + ? com.google.cloud.aiplatform.v1.IndexStats.getDefaultInstance() + : indexStats_; + } else { + return indexStatsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setIndexStats(com.google.cloud.aiplatform.v1.IndexStats value) { + if (indexStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexStats_ = value; + onChanged(); + } else { + indexStatsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setIndexStats( + com.google.cloud.aiplatform.v1.IndexStats.Builder builderForValue) { + if (indexStatsBuilder_ == null) { + indexStats_ = builderForValue.build(); + onChanged(); + } else { + indexStatsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeIndexStats(com.google.cloud.aiplatform.v1.IndexStats value) { + if (indexStatsBuilder_ == null) { + if (indexStats_ != null) { + indexStats_ = + com.google.cloud.aiplatform.v1.IndexStats.newBuilder(indexStats_) + .mergeFrom(value) + .buildPartial(); + } else { + indexStats_ = value; + } + onChanged(); + } else { + indexStatsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearIndexStats() { + if (indexStatsBuilder_ == null) { + indexStats_ = null; + onChanged(); + } else { + indexStats_ = null; + indexStatsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.IndexStats.Builder getIndexStatsBuilder() { + + onChanged(); + return getIndexStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.IndexStatsOrBuilder getIndexStatsOrBuilder() { + if (indexStatsBuilder_ != null) { + return indexStatsBuilder_.getMessageOrBuilder(); + } else { + return indexStats_ == null + ? com.google.cloud.aiplatform.v1.IndexStats.getDefaultInstance() + : indexStats_; + } + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexStats, + com.google.cloud.aiplatform.v1.IndexStats.Builder, + com.google.cloud.aiplatform.v1.IndexStatsOrBuilder> + getIndexStatsFieldBuilder() { + if (indexStatsBuilder_ == null) { + indexStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexStats, + com.google.cloud.aiplatform.v1.IndexStats.Builder, + com.google.cloud.aiplatform.v1.IndexStatsOrBuilder>( + getIndexStats(), getParentForChildren(), isClean()); + indexStats_ = null; + } + return indexStatsBuilder_; + } + + private int indexUpdateMethod_ = 0; + /** + * + * + *
+     * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+     * used by default.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for indexUpdateMethod. + */ + @java.lang.Override + public int getIndexUpdateMethodValue() { + return indexUpdateMethod_; + } + /** + * + * + *
+     * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+     * used by default.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for indexUpdateMethod to set. + * @return This builder for chaining. + */ + public Builder setIndexUpdateMethodValue(int value) { + + indexUpdateMethod_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+     * used by default.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The indexUpdateMethod. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Index.IndexUpdateMethod getIndexUpdateMethod() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1.Index.IndexUpdateMethod result = + com.google.cloud.aiplatform.v1.Index.IndexUpdateMethod.valueOf(indexUpdateMethod_); + return result == null + ? com.google.cloud.aiplatform.v1.Index.IndexUpdateMethod.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+     * used by default.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The indexUpdateMethod to set. + * @return This builder for chaining. + */ + public Builder setIndexUpdateMethod( + com.google.cloud.aiplatform.v1.Index.IndexUpdateMethod value) { + if (value == null) { + throw new NullPointerException(); + } + + indexUpdateMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+     * used by default.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearIndexUpdateMethod() { + + indexUpdateMethod_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapoint.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapoint.java new file mode 100644 index 00000000000..71fb8ec983c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapoint.java @@ -0,0 +1,3846 @@ +/* + * 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/index.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * A datapoint of Index.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint} + */ +public final class IndexDatapoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.IndexDatapoint) + IndexDatapointOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexDatapoint.newBuilder() to construct. + private IndexDatapoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexDatapoint() { + datapointId_ = ""; + featureVector_ = emptyFloatList(); + restricts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndexDatapoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IndexDatapoint( + 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(); + + datapointId_ = s; + break; + } + case 21: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + featureVector_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + featureVector_.addFloat(input.readFloat()); + break; + } + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + featureVector_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + featureVector_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + restricts_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction>(); + mutable_bitField0_ |= 0x00000002; + } + restricts_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.parser(), + extensionRegistry)); + break; + } + case 42: + { + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder subBuilder = null; + if (crowdingTag_ != null) { + subBuilder = crowdingTag_.toBuilder(); + } + crowdingTag_ = + input.readMessage( + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(crowdingTag_); + crowdingTag_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + featureVector_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + restricts_ = java.util.Collections.unmodifiableList(restricts_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.IndexDatapoint.class, + com.google.cloud.aiplatform.v1.IndexDatapoint.Builder.class); + } + + public interface RestrictionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.IndexDatapoint.Restriction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The namespace of this restriction. eg: color.
+     * 
+ * + * string namespace = 1; + * + * @return The namespace. + */ + java.lang.String getNamespace(); + /** + * + * + *
+     * The namespace of this restriction. eg: color.
+     * 
+ * + * string namespace = 1; + * + * @return The bytes for namespace. + */ + com.google.protobuf.ByteString getNamespaceBytes(); + + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @return A list containing the allowList. + */ + java.util.List getAllowListList(); + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @return The count of allowList. + */ + int getAllowListCount(); + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @param index The index of the element to return. + * @return The allowList at the given index. + */ + java.lang.String getAllowList(int index); + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @param index The index of the value to return. + * @return The bytes of the allowList at the given index. + */ + com.google.protobuf.ByteString getAllowListBytes(int index); + + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @return A list containing the denyList. + */ + java.util.List getDenyListList(); + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @return The count of denyList. + */ + int getDenyListCount(); + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @param index The index of the element to return. + * @return The denyList at the given index. + */ + java.lang.String getDenyList(int index); + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @param index The index of the value to return. + * @return The bytes of the denyList at the given index. + */ + com.google.protobuf.ByteString getDenyListBytes(int index); + } + /** + * + * + *
+   * Restriction of a datapoint which describe its attributes(tokens) from each
+   * of several attribute categories(namespaces).
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint.Restriction} + */ + public static final class Restriction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.IndexDatapoint.Restriction) + RestrictionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Restriction.newBuilder() to construct. + private Restriction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Restriction() { + namespace_ = ""; + allowList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + denyList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Restriction(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Restriction( + 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(); + + namespace_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + allowList_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + allowList_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + denyList_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + denyList_.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)) { + allowList_ = allowList_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + denyList_ = denyList_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.class, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder.class); + } + + public static final int NAMESPACE_FIELD_NUMBER = 1; + private volatile java.lang.Object namespace_; + /** + * + * + *
+     * The namespace of this restriction. eg: color.
+     * 
+ * + * string namespace = 1; + * + * @return The namespace. + */ + @java.lang.Override + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + 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(); + namespace_ = s; + return s; + } + } + /** + * + * + *
+     * The namespace of this restriction. eg: color.
+     * 
+ * + * string namespace = 1; + * + * @return The bytes for namespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_LIST_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList allowList_; + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @return A list containing the allowList. + */ + public com.google.protobuf.ProtocolStringList getAllowListList() { + return allowList_; + } + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @return The count of allowList. + */ + public int getAllowListCount() { + return allowList_.size(); + } + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @param index The index of the element to return. + * @return The allowList at the given index. + */ + public java.lang.String getAllowList(int index) { + return allowList_.get(index); + } + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @param index The index of the value to return. + * @return The bytes of the allowList at the given index. + */ + public com.google.protobuf.ByteString getAllowListBytes(int index) { + return allowList_.getByteString(index); + } + + public static final int DENY_LIST_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList denyList_; + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @return A list containing the denyList. + */ + public com.google.protobuf.ProtocolStringList getDenyListList() { + return denyList_; + } + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @return The count of denyList. + */ + public int getDenyListCount() { + return denyList_.size(); + } + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @param index The index of the element to return. + * @return The denyList at the given index. + */ + public java.lang.String getDenyList(int index) { + return denyList_.get(index); + } + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @param index The index of the value to return. + * @return The bytes of the denyList at the given index. + */ + public com.google.protobuf.ByteString getDenyListBytes(int index) { + return denyList_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_); + } + for (int i = 0; i < allowList_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, allowList_.getRaw(i)); + } + for (int i = 0; i < denyList_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, denyList_.getRaw(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(namespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_); + } + { + int dataSize = 0; + for (int i = 0; i < allowList_.size(); i++) { + dataSize += computeStringSizeNoTag(allowList_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowListList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < denyList_.size(); i++) { + dataSize += computeStringSizeNoTag(denyList_.getRaw(i)); + } + size += dataSize; + size += 1 * getDenyListList().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.IndexDatapoint.Restriction)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction other = + (com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction) obj; + + if (!getNamespace().equals(other.getNamespace())) return false; + if (!getAllowListList().equals(other.getAllowListList())) return false; + if (!getDenyListList().equals(other.getDenyListList())) 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) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + if (getAllowListCount() > 0) { + hash = (37 * hash) + ALLOW_LIST_FIELD_NUMBER; + hash = (53 * hash) + getAllowListList().hashCode(); + } + if (getDenyListCount() > 0) { + hash = (37 * hash) + DENY_LIST_FIELD_NUMBER; + hash = (53 * hash) + getDenyListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction 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; + } + /** + * + * + *
+     * Restriction of a datapoint which describe its attributes(tokens) from each
+     * of several attribute categories(namespaces).
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint.Restriction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.IndexDatapoint.Restriction) + com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.class, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.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(); + namespace_ = ""; + + allowList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + denyList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction build() { + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction buildPartial() { + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction result = + new com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction(this); + int from_bitField0_ = bitField0_; + result.namespace_ = namespace_; + if (((bitField0_ & 0x00000001) != 0)) { + allowList_ = allowList_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowList_ = allowList_; + if (((bitField0_ & 0x00000002) != 0)) { + denyList_ = denyList_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.denyList_ = denyList_; + 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.IndexDatapoint.Restriction) { + return mergeFrom((com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction other) { + if (other == com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.getDefaultInstance()) + return this; + if (!other.getNamespace().isEmpty()) { + namespace_ = other.namespace_; + onChanged(); + } + if (!other.allowList_.isEmpty()) { + if (allowList_.isEmpty()) { + allowList_ = other.allowList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowListIsMutable(); + allowList_.addAll(other.allowList_); + } + onChanged(); + } + if (!other.denyList_.isEmpty()) { + if (denyList_.isEmpty()) { + denyList_ = other.denyList_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDenyListIsMutable(); + denyList_.addAll(other.denyList_); + } + 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.IndexDatapoint.Restriction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object namespace_ = ""; + /** + * + * + *
+       * The namespace of this restriction. eg: color.
+       * 
+ * + * string namespace = 1; + * + * @return The namespace. + */ + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The namespace of this restriction. eg: color.
+       * 
+ * + * string namespace = 1; + * + * @return The bytes for namespace. + */ + public com.google.protobuf.ByteString getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The namespace of this restriction. eg: color.
+       * 
+ * + * string namespace = 1; + * + * @param value The namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + namespace_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The namespace of this restriction. eg: color.
+       * 
+ * + * string namespace = 1; + * + * @return This builder for chaining. + */ + public Builder clearNamespace() { + + namespace_ = getDefaultInstance().getNamespace(); + onChanged(); + return this; + } + /** + * + * + *
+       * The namespace of this restriction. eg: color.
+       * 
+ * + * string namespace = 1; + * + * @param value The bytes for namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + namespace_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList allowList_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAllowListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowList_ = new com.google.protobuf.LazyStringArrayList(allowList_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @return A list containing the allowList. + */ + public com.google.protobuf.ProtocolStringList getAllowListList() { + return allowList_.getUnmodifiableView(); + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @return The count of allowList. + */ + public int getAllowListCount() { + return allowList_.size(); + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @param index The index of the element to return. + * @return The allowList at the given index. + */ + public java.lang.String getAllowList(int index) { + return allowList_.get(index); + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @param index The index of the value to return. + * @return The bytes of the allowList at the given index. + */ + public com.google.protobuf.ByteString getAllowListBytes(int index) { + return allowList_.getByteString(index); + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @param index The index to set the value at. + * @param value The allowList to set. + * @return This builder for chaining. + */ + public Builder setAllowList(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowListIsMutable(); + allowList_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @param value The allowList to add. + * @return This builder for chaining. + */ + public Builder addAllowList(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowListIsMutable(); + allowList_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @param values The allowList to add. + * @return This builder for chaining. + */ + public Builder addAllAllowList(java.lang.Iterable values) { + ensureAllowListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowList_); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @return This builder for chaining. + */ + public Builder clearAllowList() { + allowList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @param value The bytes of the allowList to add. + * @return This builder for chaining. + */ + public Builder addAllowListBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowListIsMutable(); + allowList_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList denyList_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDenyListIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + denyList_ = new com.google.protobuf.LazyStringArrayList(denyList_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @return A list containing the denyList. + */ + public com.google.protobuf.ProtocolStringList getDenyListList() { + return denyList_.getUnmodifiableView(); + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @return The count of denyList. + */ + public int getDenyListCount() { + return denyList_.size(); + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @param index The index of the element to return. + * @return The denyList at the given index. + */ + public java.lang.String getDenyList(int index) { + return denyList_.get(index); + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @param index The index of the value to return. + * @return The bytes of the denyList at the given index. + */ + public com.google.protobuf.ByteString getDenyListBytes(int index) { + return denyList_.getByteString(index); + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @param index The index to set the value at. + * @param value The denyList to set. + * @return This builder for chaining. + */ + public Builder setDenyList(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDenyListIsMutable(); + denyList_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @param value The denyList to add. + * @return This builder for chaining. + */ + public Builder addDenyList(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDenyListIsMutable(); + denyList_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @param values The denyList to add. + * @return This builder for chaining. + */ + public Builder addAllDenyList(java.lang.Iterable values) { + ensureDenyListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, denyList_); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @return This builder for chaining. + */ + public Builder clearDenyList() { + denyList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @param value The bytes of the denyList to add. + * @return This builder for chaining. + */ + public Builder addDenyListBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDenyListIsMutable(); + denyList_.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.IndexDatapoint.Restriction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.IndexDatapoint.Restriction) + private static final com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction(); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Restriction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Restriction(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.IndexDatapoint.Restriction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CrowdingTagOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The crowdingAttribute. + */ + java.lang.String getCrowdingAttribute(); + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The bytes for crowdingAttribute. + */ + com.google.protobuf.ByteString getCrowdingAttributeBytes(); + } + /** + * + * + *
+   * Crowding tag is a constraint on a neighbor list produced by nearest
+   * neighbor search requiring that no more than some value k' of the k
+   * neighbors returned have the same value of crowding_attribute.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag} + */ + public static final class CrowdingTag extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) + CrowdingTagOrBuilder { + private static final long serialVersionUID = 0L; + // Use CrowdingTag.newBuilder() to construct. + private CrowdingTag(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CrowdingTag() { + crowdingAttribute_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CrowdingTag(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CrowdingTag( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + crowdingAttribute_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.class, + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder.class); + } + + public static final int CROWDING_ATTRIBUTE_FIELD_NUMBER = 1; + private volatile java.lang.Object crowdingAttribute_; + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The crowdingAttribute. + */ + @java.lang.Override + public java.lang.String getCrowdingAttribute() { + java.lang.Object ref = crowdingAttribute_; + 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(); + crowdingAttribute_ = s; + return s; + } + } + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The bytes for crowdingAttribute. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCrowdingAttributeBytes() { + java.lang.Object ref = crowdingAttribute_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + crowdingAttribute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crowdingAttribute_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, crowdingAttribute_); + } + 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(crowdingAttribute_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, crowdingAttribute_); + } + 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.IndexDatapoint.CrowdingTag)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag other = + (com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) obj; + + if (!getCrowdingAttribute().equals(other.getCrowdingAttribute())) 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) + CROWDING_ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getCrowdingAttribute().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag 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; + } + /** + * + * + *
+     * Crowding tag is a constraint on a neighbor list produced by nearest
+     * neighbor search requiring that no more than some value k' of the k
+     * neighbors returned have the same value of crowding_attribute.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.class, + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.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(); + crowdingAttribute_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag build() { + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag buildPartial() { + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag result = + new com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag(this); + result.crowdingAttribute_ = crowdingAttribute_; + 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.IndexDatapoint.CrowdingTag) { + return mergeFrom((com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag other) { + if (other == com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.getDefaultInstance()) + return this; + if (!other.getCrowdingAttribute().isEmpty()) { + crowdingAttribute_ = other.crowdingAttribute_; + 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.IndexDatapoint.CrowdingTag parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object crowdingAttribute_ = ""; + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @return The crowdingAttribute. + */ + public java.lang.String getCrowdingAttribute() { + java.lang.Object ref = crowdingAttribute_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + crowdingAttribute_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @return The bytes for crowdingAttribute. + */ + public com.google.protobuf.ByteString getCrowdingAttributeBytes() { + java.lang.Object ref = crowdingAttribute_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + crowdingAttribute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @param value The crowdingAttribute to set. + * @return This builder for chaining. + */ + public Builder setCrowdingAttribute(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + crowdingAttribute_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @return This builder for chaining. + */ + public Builder clearCrowdingAttribute() { + + crowdingAttribute_ = getDefaultInstance().getCrowdingAttribute(); + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @param value The bytes for crowdingAttribute to set. + * @return This builder for chaining. + */ + public Builder setCrowdingAttributeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + crowdingAttribute_ = 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.IndexDatapoint.CrowdingTag) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag) + private static final com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag(); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CrowdingTag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CrowdingTag(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.IndexDatapoint.CrowdingTag getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DATAPOINT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object datapointId_; + /** + * + * + *
+   * Required. Unique identifier of the datapoint.
+   * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datapointId. + */ + @java.lang.Override + public java.lang.String getDatapointId() { + java.lang.Object ref = datapointId_; + 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(); + datapointId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Unique identifier of the datapoint.
+   * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datapointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatapointIdBytes() { + java.lang.Object ref = datapointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datapointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEATURE_VECTOR_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.FloatList featureVector_; + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureVector. + */ + @java.lang.Override + public java.util.List getFeatureVectorList() { + return featureVector_; + } + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureVector. + */ + public int getFeatureVectorCount() { + return featureVector_.size(); + } + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureVector at the given index. + */ + public float getFeatureVector(int index) { + return featureVector_.getFloat(index); + } + + private int featureVectorMemoizedSerializedSize = -1; + + public static final int RESTRICTS_FIELD_NUMBER = 4; + private java.util.List restricts_; + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getRestrictsList() { + return restricts_; + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder> + getRestrictsOrBuilderList() { + return restricts_; + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getRestrictsCount() { + return restricts_.size(); + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction getRestricts(int index) { + return restricts_.get(index); + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder getRestrictsOrBuilder( + int index) { + return restricts_.get(index); + } + + public static final int CROWDING_TAG_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowdingTag_; + /** + * + * + *
+   * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+   * crowding can be configured during query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the crowdingTag field is set. + */ + @java.lang.Override + public boolean hasCrowdingTag() { + return crowdingTag_ != null; + } + /** + * + * + *
+   * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+   * crowding can be configured during query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The crowdingTag. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag getCrowdingTag() { + return crowdingTag_ == null + ? com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.getDefaultInstance() + : crowdingTag_; + } + /** + * + * + *
+   * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+   * crowding can be configured during query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTagOrBuilder + getCrowdingTagOrBuilder() { + return getCrowdingTag(); + } + + 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 { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datapointId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, datapointId_); + } + if (getFeatureVectorList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(featureVectorMemoizedSerializedSize); + } + for (int i = 0; i < featureVector_.size(); i++) { + output.writeFloatNoTag(featureVector_.getFloat(i)); + } + for (int i = 0; i < restricts_.size(); i++) { + output.writeMessage(4, restricts_.get(i)); + } + if (crowdingTag_ != null) { + output.writeMessage(5, getCrowdingTag()); + } + 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(datapointId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, datapointId_); + } + { + int dataSize = 0; + dataSize = 4 * getFeatureVectorList().size(); + size += dataSize; + if (!getFeatureVectorList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + featureVectorMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < restricts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, restricts_.get(i)); + } + if (crowdingTag_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCrowdingTag()); + } + 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.IndexDatapoint)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.IndexDatapoint other = + (com.google.cloud.aiplatform.v1.IndexDatapoint) obj; + + if (!getDatapointId().equals(other.getDatapointId())) return false; + if (!getFeatureVectorList().equals(other.getFeatureVectorList())) return false; + if (!getRestrictsList().equals(other.getRestrictsList())) return false; + if (hasCrowdingTag() != other.hasCrowdingTag()) return false; + if (hasCrowdingTag()) { + if (!getCrowdingTag().equals(other.getCrowdingTag())) 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) + DATAPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatapointId().hashCode(); + if (getFeatureVectorCount() > 0) { + hash = (37 * hash) + FEATURE_VECTOR_FIELD_NUMBER; + hash = (53 * hash) + getFeatureVectorList().hashCode(); + } + if (getRestrictsCount() > 0) { + hash = (37 * hash) + RESTRICTS_FIELD_NUMBER; + hash = (53 * hash) + getRestrictsList().hashCode(); + } + if (hasCrowdingTag()) { + hash = (37 * hash) + CROWDING_TAG_FIELD_NUMBER; + hash = (53 * hash) + getCrowdingTag().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint 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.IndexDatapoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint 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.IndexDatapoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint 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.IndexDatapoint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint 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.IndexDatapoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint 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.IndexDatapoint 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.IndexDatapoint 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.IndexDatapoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A datapoint of Index.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.IndexDatapoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.IndexDatapoint) + com.google.cloud.aiplatform.v1.IndexDatapointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.IndexDatapoint.class, + com.google.cloud.aiplatform.v1.IndexDatapoint.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.IndexDatapoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRestrictsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + datapointId_ = ""; + + featureVector_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + if (restrictsBuilder_ == null) { + restricts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + restrictsBuilder_.clear(); + } + if (crowdingTagBuilder_ == null) { + crowdingTag_ = null; + } else { + crowdingTag_ = null; + crowdingTagBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.IndexDatapoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint build() { + com.google.cloud.aiplatform.v1.IndexDatapoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint buildPartial() { + com.google.cloud.aiplatform.v1.IndexDatapoint result = + new com.google.cloud.aiplatform.v1.IndexDatapoint(this); + int from_bitField0_ = bitField0_; + result.datapointId_ = datapointId_; + if (((bitField0_ & 0x00000001) != 0)) { + featureVector_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.featureVector_ = featureVector_; + if (restrictsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + restricts_ = java.util.Collections.unmodifiableList(restricts_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.restricts_ = restricts_; + } else { + result.restricts_ = restrictsBuilder_.build(); + } + if (crowdingTagBuilder_ == null) { + result.crowdingTag_ = crowdingTag_; + } else { + result.crowdingTag_ = crowdingTagBuilder_.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.IndexDatapoint) { + return mergeFrom((com.google.cloud.aiplatform.v1.IndexDatapoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.IndexDatapoint other) { + if (other == com.google.cloud.aiplatform.v1.IndexDatapoint.getDefaultInstance()) return this; + if (!other.getDatapointId().isEmpty()) { + datapointId_ = other.datapointId_; + onChanged(); + } + if (!other.featureVector_.isEmpty()) { + if (featureVector_.isEmpty()) { + featureVector_ = other.featureVector_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeatureVectorIsMutable(); + featureVector_.addAll(other.featureVector_); + } + onChanged(); + } + if (restrictsBuilder_ == null) { + if (!other.restricts_.isEmpty()) { + if (restricts_.isEmpty()) { + restricts_ = other.restricts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRestrictsIsMutable(); + restricts_.addAll(other.restricts_); + } + onChanged(); + } + } else { + if (!other.restricts_.isEmpty()) { + if (restrictsBuilder_.isEmpty()) { + restrictsBuilder_.dispose(); + restrictsBuilder_ = null; + restricts_ = other.restricts_; + bitField0_ = (bitField0_ & ~0x00000002); + restrictsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRestrictsFieldBuilder() + : null; + } else { + restrictsBuilder_.addAllMessages(other.restricts_); + } + } + } + if (other.hasCrowdingTag()) { + mergeCrowdingTag(other.getCrowdingTag()); + } + 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.IndexDatapoint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.IndexDatapoint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object datapointId_ = ""; + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datapointId. + */ + public java.lang.String getDatapointId() { + java.lang.Object ref = datapointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datapointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datapointId. + */ + public com.google.protobuf.ByteString getDatapointIdBytes() { + java.lang.Object ref = datapointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datapointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The datapointId to set. + * @return This builder for chaining. + */ + public Builder setDatapointId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datapointId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatapointId() { + + datapointId_ = getDefaultInstance().getDatapointId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for datapointId to set. + * @return This builder for chaining. + */ + public Builder setDatapointIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datapointId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.FloatList featureVector_ = emptyFloatList(); + + private void ensureFeatureVectorIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + featureVector_ = mutableCopy(featureVector_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureVector. + */ + public java.util.List getFeatureVectorList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(featureVector_) + : featureVector_; + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureVector. + */ + public int getFeatureVectorCount() { + return featureVector_.size(); + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureVector at the given index. + */ + public float getFeatureVector(int index) { + return featureVector_.getFloat(index); + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The featureVector to set. + * @return This builder for chaining. + */ + public Builder setFeatureVector(int index, float value) { + ensureFeatureVectorIsMutable(); + featureVector_.setFloat(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The featureVector to add. + * @return This builder for chaining. + */ + public Builder addFeatureVector(float value) { + ensureFeatureVectorIsMutable(); + featureVector_.addFloat(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The featureVector to add. + * @return This builder for chaining. + */ + public Builder addAllFeatureVector(java.lang.Iterable values) { + ensureFeatureVectorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, featureVector_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFeatureVector() { + featureVector_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private java.util.List restricts_ = + java.util.Collections.emptyList(); + + private void ensureRestrictsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + restricts_ = + new java.util.ArrayList( + restricts_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder, + com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder> + restrictsBuilder_; + + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getRestrictsList() { + if (restrictsBuilder_ == null) { + return java.util.Collections.unmodifiableList(restricts_); + } else { + return restrictsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getRestrictsCount() { + if (restrictsBuilder_ == null) { + return restricts_.size(); + } else { + return restrictsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction getRestricts(int index) { + if (restrictsBuilder_ == null) { + return restricts_.get(index); + } else { + return restrictsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRestricts( + int index, com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction value) { + if (restrictsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictsIsMutable(); + restricts_.set(index, value); + onChanged(); + } else { + restrictsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRestricts( + int index, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder builderForValue) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.set(index, builderForValue.build()); + onChanged(); + } else { + restrictsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRestricts(com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction value) { + if (restrictsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictsIsMutable(); + restricts_.add(value); + onChanged(); + } else { + restrictsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRestricts( + int index, com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction value) { + if (restrictsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictsIsMutable(); + restricts_.add(index, value); + onChanged(); + } else { + restrictsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRestricts( + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder builderForValue) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.add(builderForValue.build()); + onChanged(); + } else { + restrictsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRestricts( + int index, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder builderForValue) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.add(index, builderForValue.build()); + onChanged(); + } else { + restrictsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllRestricts( + java.lang.Iterable + values) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restricts_); + onChanged(); + } else { + restrictsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRestricts() { + if (restrictsBuilder_ == null) { + restricts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + restrictsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeRestricts(int index) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.remove(index); + onChanged(); + } else { + restrictsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder getRestrictsBuilder( + int index) { + return getRestrictsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder getRestrictsOrBuilder( + int index) { + if (restrictsBuilder_ == null) { + return restricts_.get(index); + } else { + return restrictsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder> + getRestrictsOrBuilderList() { + if (restrictsBuilder_ != null) { + return restrictsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(restricts_); + } + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder addRestrictsBuilder() { + return getRestrictsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder addRestrictsBuilder( + int index) { + return getRestrictsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getRestrictsBuilderList() { + return getRestrictsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder, + com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder> + getRestrictsFieldBuilder() { + if (restrictsBuilder_ == null) { + restrictsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction, + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction.Builder, + com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder>( + restricts_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + restricts_ = null; + } + return restrictsBuilder_; + } + + private com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowdingTag_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag, + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder, + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTagOrBuilder> + crowdingTagBuilder_; + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the crowdingTag field is set. + */ + public boolean hasCrowdingTag() { + return crowdingTagBuilder_ != null || crowdingTag_ != null; + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The crowdingTag. + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag getCrowdingTag() { + if (crowdingTagBuilder_ == null) { + return crowdingTag_ == null + ? com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.getDefaultInstance() + : crowdingTag_; + } else { + return crowdingTagBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCrowdingTag(com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag value) { + if (crowdingTagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + crowdingTag_ = value; + onChanged(); + } else { + crowdingTagBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCrowdingTag( + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder builderForValue) { + if (crowdingTagBuilder_ == null) { + crowdingTag_ = builderForValue.build(); + onChanged(); + } else { + crowdingTagBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCrowdingTag( + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag value) { + if (crowdingTagBuilder_ == null) { + if (crowdingTag_ != null) { + crowdingTag_ = + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.newBuilder(crowdingTag_) + .mergeFrom(value) + .buildPartial(); + } else { + crowdingTag_ = value; + } + onChanged(); + } else { + crowdingTagBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCrowdingTag() { + if (crowdingTagBuilder_ == null) { + crowdingTag_ = null; + onChanged(); + } else { + crowdingTag_ = null; + crowdingTagBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder + getCrowdingTagBuilder() { + + onChanged(); + return getCrowdingTagFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTagOrBuilder + getCrowdingTagOrBuilder() { + if (crowdingTagBuilder_ != null) { + return crowdingTagBuilder_.getMessageOrBuilder(); + } else { + return crowdingTag_ == null + ? com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.getDefaultInstance() + : crowdingTag_; + } + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag, + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder, + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTagOrBuilder> + getCrowdingTagFieldBuilder() { + if (crowdingTagBuilder_ == null) { + crowdingTagBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag, + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag.Builder, + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTagOrBuilder>( + getCrowdingTag(), getParentForChildren(), isClean()); + crowdingTag_ = null; + } + return crowdingTagBuilder_; + } + + @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.IndexDatapoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.IndexDatapoint) + private static final com.google.cloud.aiplatform.v1.IndexDatapoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.IndexDatapoint(); + } + + public static com.google.cloud.aiplatform.v1.IndexDatapoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexDatapoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IndexDatapoint(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.IndexDatapoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapointOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapointOrBuilder.java new file mode 100644 index 00000000000..65bbfec8ee1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexDatapointOrBuilder.java @@ -0,0 +1,213 @@ +/* + * 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/index.proto + +package com.google.cloud.aiplatform.v1; + +public interface IndexDatapointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.IndexDatapoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Unique identifier of the datapoint.
+   * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datapointId. + */ + java.lang.String getDatapointId(); + /** + * + * + *
+   * Required. Unique identifier of the datapoint.
+   * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datapointId. + */ + com.google.protobuf.ByteString getDatapointIdBytes(); + + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureVector. + */ + java.util.List getFeatureVectorList(); + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureVector. + */ + int getFeatureVectorCount(); + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureVector at the given index. + */ + float getFeatureVector(int index); + + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getRestrictsList(); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.IndexDatapoint.Restriction getRestricts(int index); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getRestrictsCount(); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getRestrictsOrBuilderList(); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.IndexDatapoint.RestrictionOrBuilder getRestrictsOrBuilder( + int index); + + /** + * + * + *
+   * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+   * crowding can be configured during query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the crowdingTag field is set. + */ + boolean hasCrowdingTag(); + /** + * + * + *
+   * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+   * crowding can be configured during query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The crowdingTag. + */ + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag getCrowdingTag(); + /** + * + * + *
+   * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+   * crowding can be configured during query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.IndexDatapoint.CrowdingTagOrBuilder getCrowdingTagOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexOrBuilder.java index 5a3bcc4baa2..eeec98ba1a9 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexOrBuilder.java @@ -453,4 +453,76 @@ java.lang.String getLabelsOrDefault( * */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Stats of the index resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the indexStats field is set. + */ + boolean hasIndexStats(); + /** + * + * + *
+   * Output only. Stats of the index resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The indexStats. + */ + com.google.cloud.aiplatform.v1.IndexStats getIndexStats(); + /** + * + * + *
+   * Output only. Stats of the index resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.IndexStatsOrBuilder getIndexStatsOrBuilder(); + + /** + * + * + *
+   * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+   * used by default.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for indexUpdateMethod. + */ + int getIndexUpdateMethodValue(); + /** + * + * + *
+   * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+   * used by default.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The indexUpdateMethod. + */ + com.google.cloud.aiplatform.v1.Index.IndexUpdateMethod getIndexUpdateMethod(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexProto.java index cf17b72bfbc..47589cfeed7 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexProto.java @@ -35,6 +35,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_Index_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_Index_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_IndexStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_IndexStats_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -50,7 +66,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ce.proto\0323google/cloud/aiplatform/v1/dep" + "loyed_index_ref.proto\032\034google/protobuf/s" + "truct.proto\032\037google/protobuf/timestamp.p" - + "roto\"\252\004\n\005Index\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014dis" + + "roto\"\242\006\n\005Index\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014dis" + "play_name\030\002 \001(\tB\003\340A\002\022\023\n\013description\030\003 \001(" + "\t\022 \n\023metadata_schema_uri\030\004 \001(\tB\003\340A\005\022(\n\010m" + "etadata\030\006 \001(\0132\026.google.protobuf.Value\022K\n" @@ -60,16 +76,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "aiplatform.v1.Index.LabelsEntry\0224\n\013creat" + "e_time\030\n \001(\0132\032.google.protobuf.Timestamp" + "B\003\340A\003\0224\n\013update_time\030\013 \001(\0132\032.google.prot" - + "obuf.TimestampB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:]\352AZ\n\037aiplatf" - + "orm.googleapis.com/Index\0227projects/{proj" - + "ect}/locations/{location}/indexes/{index" - + "}B\316\001\n\036com.google.cloud.aiplatform.v1B\nIn" - + "dexProtoP\001ZDgoogle.golang.org/genproto/g" - + "oogleapis/cloud/aiplatform/v1;aiplatform" - + "\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Google\\C" - + "loud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPl" - + "atform::V1b\006proto3" + + "obuf.TimestampB\003\340A\003\022@\n\013index_stats\030\016 \001(\013" + + "2&.google.cloud.aiplatform.v1.IndexStats" + + "B\003\340A\003\022U\n\023index_update_method\030\020 \001(\01623.goo" + + "gle.cloud.aiplatform.v1.Index.IndexUpdat" + + "eMethodB\003\340A\005\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t" + + "\022\r\n\005value\030\002 \001(\t:\0028\001\"]\n\021IndexUpdateMethod" + + "\022#\n\037INDEX_UPDATE_METHOD_UNSPECIFIED\020\000\022\020\n" + + "\014BATCH_UPDATE\020\001\022\021\n\rSTREAM_UPDATE\020\002:]\352AZ\n" + + "\037aiplatform.googleapis.com/Index\0227projec" + + "ts/{project}/locations/{location}/indexe" + + "s/{index}\"\337\002\n\016IndexDatapoint\022\031\n\014datapoin" + + "t_id\030\001 \001(\tB\003\340A\002\022\033\n\016feature_vector\030\002 \003(\002B" + + "\003\340A\002\022N\n\trestricts\030\004 \003(\01326.google.cloud.a" + + "iplatform.v1.IndexDatapoint.RestrictionB" + + "\003\340A\001\022Q\n\014crowding_tag\030\005 \001(\01326.google.clou" + + "d.aiplatform.v1.IndexDatapoint.CrowdingT" + + "agB\003\340A\001\032G\n\013Restriction\022\021\n\tnamespace\030\001 \001(" + + "\t\022\022\n\nallow_list\030\002 \003(\t\022\021\n\tdeny_list\030\003 \003(\t" + + "\032)\n\013CrowdingTag\022\032\n\022crowding_attribute\030\001 " + + "\001(\t\"C\n\nIndexStats\022\032\n\rvectors_count\030\001 \001(\003" + + "B\003\340A\003\022\031\n\014shards_count\030\002 \001(\005B\003\340A\003B\316\001\n\036com" + + ".google.cloud.aiplatform.v1B\nIndexProtoP" + + "\001ZDgoogle.golang.org/genproto/googleapis" + + "/cloud/aiplatform/v1;aiplatform\252\002\032Google" + + ".Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPl" + + "atform\\V1\352\002\035Google::Cloud::AIPlatform::V" + + "1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -97,6 +130,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Labels", "CreateTime", "UpdateTime", + "IndexStats", + "IndexUpdateMethod", }); internal_static_google_cloud_aiplatform_v1_Index_LabelsEntry_descriptor = internal_static_google_cloud_aiplatform_v1_Index_descriptor.getNestedTypes().get(0); @@ -106,6 +141,42 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor, + new java.lang.String[] { + "DatapointId", "FeatureVector", "Restricts", "CrowdingTag", + }); + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_descriptor = + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_Restriction_descriptor, + new java.lang.String[] { + "Namespace", "AllowList", "DenyList", + }); + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor = + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_IndexDatapoint_CrowdingTag_descriptor, + new java.lang.String[] { + "CrowdingAttribute", + }); + internal_static_google_cloud_aiplatform_v1_IndexStats_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_IndexStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_IndexStats_descriptor, + new java.lang.String[] { + "VectorsCount", "ShardsCount", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceProto.java index 7d30149684d..54ee72f0278 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexServiceProto.java @@ -59,6 +59,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_DeleteIndexRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_DeleteIndexRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpsertDatapointsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpsertDatapointsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_UpsertDatapointsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_UpsertDatapointsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_RemoveDatapointsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_RemoveDatapointsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_RemoveDatapointsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_RemoveDatapointsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_NearestNeighborSearchOperationMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -117,60 +133,78 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\002 \001(\0132B.google.cloud.aiplatform.v1.Neare" + "stNeighborSearchOperationMetadata\"K\n\022Del" + "eteIndexRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037a" - + "iplatform.googleapis.com/Index\"\311\006\n&Neare" - + "stNeighborSearchOperationMetadata\022{\n\030con" - + "tent_validation_stats\030\001 \003(\0132Y.google.clo" - + "ud.aiplatform.v1.NearestNeighborSearchOp" - + "erationMetadata.ContentValidationStats\022\030" - + "\n\020data_bytes_count\030\002 \001(\003\032\262\003\n\013RecordError" - + "\022r\n\nerror_type\030\001 \001(\0162^.google.cloud.aipl" - + "atform.v1.NearestNeighborSearchOperation" - + "Metadata.RecordError.RecordErrorType\022\025\n\r" - + "error_message\030\002 \001(\t\022\026\n\016source_gcs_uri\030\003 " - + "\001(\t\022\024\n\014embedding_id\030\004 \001(\t\022\022\n\nraw_record\030" - + "\005 \001(\t\"\325\001\n\017RecordErrorType\022\032\n\026ERROR_TYPE_" - + "UNSPECIFIED\020\000\022\016\n\nEMPTY_LINE\020\001\022\027\n\023INVALID" - + "_JSON_SYNTAX\020\002\022\026\n\022INVALID_CSV_SYNTAX\020\003\022\027" - + "\n\023INVALID_AVRO_SYNTAX\020\004\022\030\n\024INVALID_EMBED" - + "DING_ID\020\005\022\033\n\027EMBEDDING_SIZE_MISMATCH\020\006\022\025" - + "\n\021NAMESPACE_MISSING\020\007\032\322\001\n\026ContentValidat" - + "ionStats\022\026\n\016source_gcs_uri\030\001 \001(\t\022\032\n\022vali" - + "d_record_count\030\002 \001(\003\022\034\n\024invalid_record_c" - + "ount\030\003 \001(\003\022f\n\016partial_errors\030\004 \003(\0132N.goo" - + "gle.cloud.aiplatform.v1.NearestNeighborS" - + "earchOperationMetadata.RecordError2\242\010\n\014I" - + "ndexService\022\317\001\n\013CreateIndex\022..google.clo" - + "ud.aiplatform.v1.CreateIndexRequest\032\035.go" - + "ogle.longrunning.Operation\"q\202\323\344\223\0024\"+/v1/" - + "{parent=projects/*/locations/*}/indexes:" - + "\005index\332A\014parent,index\312A%\n\005Index\022\034CreateI" - + "ndexOperationMetadata\022\226\001\n\010GetIndex\022+.goo" - + "gle.cloud.aiplatform.v1.GetIndexRequest\032" - + "!.google.cloud.aiplatform.v1.Index\":\202\323\344\223" - + "\002-\022+/v1/{name=projects/*/locations/*/ind" - + "exes/*}\332A\004name\022\254\001\n\013ListIndexes\022..google." - + "cloud.aiplatform.v1.ListIndexesRequest\032/" - + ".google.cloud.aiplatform.v1.ListIndexesR" - + "esponse\"<\202\323\344\223\002-\022+/v1/{parent=projects/*/" - + "locations/*}/indexes\332A\006parent\022\332\001\n\013Update" - + "Index\022..google.cloud.aiplatform.v1.Updat" - + "eIndexRequest\032\035.google.longrunning.Opera" - + "tion\"|\202\323\344\223\002:21/v1/{index.name=projects/*" - + "/locations/*/indexes/*}:\005index\332A\021index,u" - + "pdate_mask\312A%\n\005Index\022\034UpdateIndexOperati" - + "onMetadata\022\313\001\n\013DeleteIndex\022..google.clou" - + "d.aiplatform.v1.DeleteIndexRequest\032\035.goo" - + "gle.longrunning.Operation\"m\202\323\344\223\002-*+/v1/{" - + "name=projects/*/locations/*/indexes/*}\332A" - + "\004name\312A0\n\025google.protobuf.Empty\022\027DeleteO" - + "perationMetadata\032M\312A\031aiplatform.googleap" - + "is.com\322A.https://www.googleapis.com/auth" - + "/cloud-platformB\325\001\n\036com.google.cloud.aip" - + "latform.v1B\021IndexServiceProtoP\001ZDgoogle." - + "golang.org/genproto/googleapis/cloud/aip" - + "latform/v1;aiplatform\252\002\032Google.Cloud.AIP" - + "latform.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352" - + "\002\035Google::Cloud::AIPlatform::V1b\006proto3" + + "iplatform.googleapis.com/Index\"\221\001\n\027Upser" + + "tDatapointsRequest\0226\n\005index\030\001 \001(\tB\'\340A\002\372A" + + "!\n\037aiplatform.googleapis.com/Index\022>\n\nda" + + "tapoints\030\002 \003(\0132*.google.cloud.aiplatform" + + ".v1.IndexDatapoint\"\032\n\030UpsertDatapointsRe" + + "sponse\"h\n\027RemoveDatapointsRequest\0226\n\005ind" + + "ex\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatform.googleapis." + + "com/Index\022\025\n\rdatapoint_ids\030\002 \003(\t\"\032\n\030Remo" + + "veDatapointsResponse\"\311\006\n&NearestNeighbor" + + "SearchOperationMetadata\022{\n\030content_valid" + + "ation_stats\030\001 \003(\0132Y.google.cloud.aiplatf" + + "orm.v1.NearestNeighborSearchOperationMet" + + "adata.ContentValidationStats\022\030\n\020data_byt" + + "es_count\030\002 \001(\003\032\262\003\n\013RecordError\022r\n\nerror_" + + "type\030\001 \001(\0162^.google.cloud.aiplatform.v1." + + "NearestNeighborSearchOperationMetadata.R" + + "ecordError.RecordErrorType\022\025\n\rerror_mess" + + "age\030\002 \001(\t\022\026\n\016source_gcs_uri\030\003 \001(\t\022\024\n\014emb" + + "edding_id\030\004 \001(\t\022\022\n\nraw_record\030\005 \001(\t\"\325\001\n\017" + + "RecordErrorType\022\032\n\026ERROR_TYPE_UNSPECIFIE" + + "D\020\000\022\016\n\nEMPTY_LINE\020\001\022\027\n\023INVALID_JSON_SYNT" + + "AX\020\002\022\026\n\022INVALID_CSV_SYNTAX\020\003\022\027\n\023INVALID_" + + "AVRO_SYNTAX\020\004\022\030\n\024INVALID_EMBEDDING_ID\020\005\022" + + "\033\n\027EMBEDDING_SIZE_MISMATCH\020\006\022\025\n\021NAMESPAC" + + "E_MISSING\020\007\032\322\001\n\026ContentValidationStats\022\026" + + "\n\016source_gcs_uri\030\001 \001(\t\022\032\n\022valid_record_c" + + "ount\030\002 \001(\003\022\034\n\024invalid_record_count\030\003 \001(\003" + + "\022f\n\016partial_errors\030\004 \003(\0132N.google.cloud." + + "aiplatform.v1.NearestNeighborSearchOpera" + + "tionMetadata.RecordError2\266\013\n\014IndexServic" + + "e\022\317\001\n\013CreateIndex\022..google.cloud.aiplatf" + + "orm.v1.CreateIndexRequest\032\035.google.longr" + + "unning.Operation\"q\202\323\344\223\0024\"+/v1/{parent=pr" + + "ojects/*/locations/*}/indexes:\005index\332A\014p" + + "arent,index\312A%\n\005Index\022\034CreateIndexOperat" + + "ionMetadata\022\226\001\n\010GetIndex\022+.google.cloud." + + "aiplatform.v1.GetIndexRequest\032!.google.c" + + "loud.aiplatform.v1.Index\":\202\323\344\223\002-\022+/v1/{n" + + "ame=projects/*/locations/*/indexes/*}\332A\004" + + "name\022\254\001\n\013ListIndexes\022..google.cloud.aipl" + + "atform.v1.ListIndexesRequest\032/.google.cl" + + "oud.aiplatform.v1.ListIndexesResponse\"<\202" + + "\323\344\223\002-\022+/v1/{parent=projects/*/locations/" + + "*}/indexes\332A\006parent\022\332\001\n\013UpdateIndex\022..go" + + "ogle.cloud.aiplatform.v1.UpdateIndexRequ" + + "est\032\035.google.longrunning.Operation\"|\202\323\344\223" + + "\002:21/v1/{index.name=projects/*/locations" + + "/*/indexes/*}:\005index\332A\021index,update_mask" + + "\312A%\n\005Index\022\034UpdateIndexOperationMetadata" + + "\022\313\001\n\013DeleteIndex\022..google.cloud.aiplatfo" + + "rm.v1.DeleteIndexRequest\032\035.google.longru" + + "nning.Operation\"m\202\323\344\223\002-*+/v1/{name=proje" + + "cts/*/locations/*/indexes/*}\332A\004name\312A0\n\025" + + "google.protobuf.Empty\022\027DeleteOperationMe" + + "tadata\022\307\001\n\020UpsertDatapoints\0223.google.clo" + + "ud.aiplatform.v1.UpsertDatapointsRequest" + + "\0324.google.cloud.aiplatform.v1.UpsertData" + + "pointsResponse\"H\202\323\344\223\002B\"=/v1/{index=proje" + + "cts/*/locations/*/indexes/*}:upsertDatap" + + "oints:\001*\022\307\001\n\020RemoveDatapoints\0223.google.c" + + "loud.aiplatform.v1.RemoveDatapointsReque" + + "st\0324.google.cloud.aiplatform.v1.RemoveDa" + + "tapointsResponse\"H\202\323\344\223\002B\"=/v1/{index=pro" + + "jects/*/locations/*/indexes/*}:removeDat" + + "apoints:\001*\032M\312A\031aiplatform.googleapis.com" + + "\322A.https://www.googleapis.com/auth/cloud" + + "-platformB\325\001\n\036com.google.cloud.aiplatfor" + + "m.v1B\021IndexServiceProtoP\001ZDgoogle.golang" + + ".org/genproto/googleapis/cloud/aiplatfor" + + "m/v1;aiplatform\252\002\032Google.Cloud.AIPlatfor" + + "m.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Goog" + + "le::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -249,8 +283,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); - internal_static_google_cloud_aiplatform_v1_NearestNeighborSearchOperationMetadata_descriptor = + internal_static_google_cloud_aiplatform_v1_UpsertDatapointsRequest_descriptor = getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1_UpsertDatapointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpsertDatapointsRequest_descriptor, + new java.lang.String[] { + "Index", "Datapoints", + }); + internal_static_google_cloud_aiplatform_v1_UpsertDatapointsResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1_UpsertDatapointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_UpsertDatapointsResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_aiplatform_v1_RemoveDatapointsRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_aiplatform_v1_RemoveDatapointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_RemoveDatapointsRequest_descriptor, + new java.lang.String[] { + "Index", "DatapointIds", + }); + internal_static_google_cloud_aiplatform_v1_RemoveDatapointsResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_aiplatform_v1_RemoveDatapointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_RemoveDatapointsResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_aiplatform_v1_NearestNeighborSearchOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_aiplatform_v1_NearestNeighborSearchOperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_NearestNeighborSearchOperationMetadata_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexStats.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexStats.java new file mode 100644 index 00000000000..5a031cbe0c8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexStats.java @@ -0,0 +1,636 @@ +/* + * 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/index.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Stats of the Index.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.IndexStats} + */ +public final class IndexStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.IndexStats) + IndexStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexStats.newBuilder() to construct. + private IndexStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndexStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IndexStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + vectorsCount_ = input.readInt64(); + break; + } + case 16: + { + shardsCount_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.IndexStats.class, + com.google.cloud.aiplatform.v1.IndexStats.Builder.class); + } + + public static final int VECTORS_COUNT_FIELD_NUMBER = 1; + private long vectorsCount_; + /** + * + * + *
+   * Output only. The number of vectors in the Index.
+   * 
+ * + * int64 vectors_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vectorsCount. + */ + @java.lang.Override + public long getVectorsCount() { + return vectorsCount_; + } + + public static final int SHARDS_COUNT_FIELD_NUMBER = 2; + private int shardsCount_; + /** + * + * + *
+   * Output only. The number of shards in the Index.
+   * 
+ * + * int32 shards_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The shardsCount. + */ + @java.lang.Override + public int getShardsCount() { + return shardsCount_; + } + + 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 (vectorsCount_ != 0L) { + output.writeInt64(1, vectorsCount_); + } + if (shardsCount_ != 0) { + output.writeInt32(2, shardsCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (vectorsCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, vectorsCount_); + } + if (shardsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, shardsCount_); + } + 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.IndexStats)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.IndexStats other = + (com.google.cloud.aiplatform.v1.IndexStats) obj; + + if (getVectorsCount() != other.getVectorsCount()) return false; + if (getShardsCount() != other.getShardsCount()) 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) + VECTORS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getVectorsCount()); + hash = (37 * hash) + SHARDS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getShardsCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.IndexStats parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexStats 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.IndexStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexStats 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.IndexStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.IndexStats 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.IndexStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.IndexStats 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.IndexStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.IndexStats 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.IndexStats 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.IndexStats 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.IndexStats 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; + } + /** + * + * + *
+   * Stats of the Index.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.IndexStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.IndexStats) + com.google.cloud.aiplatform.v1.IndexStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.IndexStats.class, + com.google.cloud.aiplatform.v1.IndexStats.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.IndexStats.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(); + vectorsCount_ = 0L; + + shardsCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IndexProto + .internal_static_google_cloud_aiplatform_v1_IndexStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexStats getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.IndexStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexStats build() { + com.google.cloud.aiplatform.v1.IndexStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexStats buildPartial() { + com.google.cloud.aiplatform.v1.IndexStats result = + new com.google.cloud.aiplatform.v1.IndexStats(this); + result.vectorsCount_ = vectorsCount_; + result.shardsCount_ = shardsCount_; + 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.IndexStats) { + return mergeFrom((com.google.cloud.aiplatform.v1.IndexStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.IndexStats other) { + if (other == com.google.cloud.aiplatform.v1.IndexStats.getDefaultInstance()) return this; + if (other.getVectorsCount() != 0L) { + setVectorsCount(other.getVectorsCount()); + } + if (other.getShardsCount() != 0) { + setShardsCount(other.getShardsCount()); + } + 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.IndexStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1.IndexStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long vectorsCount_; + /** + * + * + *
+     * Output only. The number of vectors in the Index.
+     * 
+ * + * int64 vectors_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vectorsCount. + */ + @java.lang.Override + public long getVectorsCount() { + return vectorsCount_; + } + /** + * + * + *
+     * Output only. The number of vectors in the Index.
+     * 
+ * + * int64 vectors_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The vectorsCount to set. + * @return This builder for chaining. + */ + public Builder setVectorsCount(long value) { + + vectorsCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of vectors in the Index.
+     * 
+ * + * int64 vectors_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVectorsCount() { + + vectorsCount_ = 0L; + onChanged(); + return this; + } + + private int shardsCount_; + /** + * + * + *
+     * Output only. The number of shards in the Index.
+     * 
+ * + * int32 shards_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The shardsCount. + */ + @java.lang.Override + public int getShardsCount() { + return shardsCount_; + } + /** + * + * + *
+     * Output only. The number of shards in the Index.
+     * 
+ * + * int32 shards_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The shardsCount to set. + * @return This builder for chaining. + */ + public Builder setShardsCount(int value) { + + shardsCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of shards in the Index.
+     * 
+ * + * int32 shards_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearShardsCount() { + + shardsCount_ = 0; + 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.IndexStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.IndexStats) + private static final com.google.cloud.aiplatform.v1.IndexStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.IndexStats(); + } + + public static com.google.cloud.aiplatform.v1.IndexStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IndexStats(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.IndexStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexStatsOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexStatsOrBuilder.java new file mode 100644 index 00000000000..415d28c65ec --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexStatsOrBuilder.java @@ -0,0 +1,51 @@ +/* + * 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/index.proto + +package com.google.cloud.aiplatform.v1; + +public interface IndexStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.IndexStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The number of vectors in the Index.
+   * 
+ * + * int64 vectors_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vectorsCount. + */ + long getVectorsCount(); + + /** + * + * + *
+   * Output only. The number of shards in the Index.
+   * 
+ * + * int32 shards_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The shardsCount. + */ + int getShardsCount(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSavedQueriesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSavedQueriesResponse.java index 06000abbdc7..9648dd14e81 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSavedQueriesResponse.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSavedQueriesResponse.java @@ -136,8 +136,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -150,8 +149,7 @@ public java.util.List getSavedQueries * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -165,8 +163,7 @@ public java.util.List getSavedQueries * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -179,8 +176,7 @@ public int getSavedQueriesCount() { * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -193,8 +189,7 @@ public com.google.cloud.aiplatform.v1.SavedQuery getSavedQueries(int index) { * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -651,8 +646,7 @@ private void ensureSavedQueriesIsMutable() { * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -668,8 +662,7 @@ public java.util.List getSavedQueries * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -685,8 +678,7 @@ public int getSavedQueriesCount() { * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -702,8 +694,7 @@ public com.google.cloud.aiplatform.v1.SavedQuery getSavedQueries(int index) { * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -725,8 +716,7 @@ public Builder setSavedQueries(int index, com.google.cloud.aiplatform.v1.SavedQu * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -746,8 +736,7 @@ public Builder setSavedQueries( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -769,8 +758,7 @@ public Builder addSavedQueries(com.google.cloud.aiplatform.v1.SavedQuery value) * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -792,8 +780,7 @@ public Builder addSavedQueries(int index, com.google.cloud.aiplatform.v1.SavedQu * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -813,8 +800,7 @@ public Builder addSavedQueries( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -834,8 +820,7 @@ public Builder addSavedQueries( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -855,8 +840,7 @@ public Builder addAllSavedQueries( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -875,8 +859,7 @@ public Builder clearSavedQueries() { * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -895,8 +878,7 @@ public Builder removeSavedQueries(int index) { * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -908,8 +890,7 @@ public com.google.cloud.aiplatform.v1.SavedQuery.Builder getSavedQueriesBuilder( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -925,8 +906,7 @@ public com.google.cloud.aiplatform.v1.SavedQueryOrBuilder getSavedQueriesOrBuild * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -943,8 +923,7 @@ public com.google.cloud.aiplatform.v1.SavedQueryOrBuilder getSavedQueriesOrBuild * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -957,8 +936,7 @@ public com.google.cloud.aiplatform.v1.SavedQuery.Builder addSavedQueriesBuilder( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -971,8 +949,7 @@ public com.google.cloud.aiplatform.v1.SavedQuery.Builder addSavedQueriesBuilder( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSavedQueriesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSavedQueriesResponseOrBuilder.java index 10837c9d269..a78ca83151e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSavedQueriesResponseOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListSavedQueriesResponseOrBuilder.java @@ -27,8 +27,7 @@ public interface ListSavedQueriesResponseOrBuilder * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -38,8 +37,7 @@ public interface ListSavedQueriesResponseOrBuilder * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -49,8 +47,7 @@ public interface ListSavedQueriesResponseOrBuilder * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -60,8 +57,7 @@ public interface ListSavedQueriesResponseOrBuilder * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; @@ -72,8 +68,7 @@ public interface ListSavedQueriesResponseOrBuilder * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1.SavedQuery saved_queries = 1; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MergeVersionAliasesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MergeVersionAliasesRequest.java index bfa334968ea..13952f8fb94 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MergeVersionAliasesRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MergeVersionAliasesRequest.java @@ -193,7 +193,7 @@ public com.google.protobuf.ByteString getNameBytes() { *
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -217,7 +217,7 @@ public com.google.protobuf.ProtocolStringList getVersionAliasesList() {
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -241,7 +241,7 @@ public int getVersionAliasesCount() {
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -266,7 +266,7 @@ public java.lang.String getVersionAliases(int index) {
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -782,7 +782,7 @@ private void ensureVersionAliasesIsMutable() {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -806,7 +806,7 @@ public com.google.protobuf.ProtocolStringList getVersionAliasesList() {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -830,7 +830,7 @@ public int getVersionAliasesCount() {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -855,7 +855,7 @@ public java.lang.String getVersionAliases(int index) {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -880,7 +880,7 @@ public com.google.protobuf.ByteString getVersionAliasesBytes(int index) {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -912,7 +912,7 @@ public Builder setVersionAliases(int index, java.lang.String value) {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -943,7 +943,7 @@ public Builder addVersionAliases(java.lang.String value) {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -971,7 +971,7 @@ public Builder addAllVersionAliases(java.lang.Iterable values)
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -998,7 +998,7 @@ public Builder clearVersionAliases() {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MergeVersionAliasesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MergeVersionAliasesRequestOrBuilder.java
index 967cd771532..ed0f12a4002 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MergeVersionAliasesRequestOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/MergeVersionAliasesRequestOrBuilder.java
@@ -62,7 +62,7 @@ public interface MergeVersionAliasesRequestOrBuilder
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -84,7 +84,7 @@ public interface MergeVersionAliasesRequestOrBuilder
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -106,7 +106,7 @@ public interface MergeVersionAliasesRequestOrBuilder
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -129,7 +129,7 @@ public interface MergeVersionAliasesRequestOrBuilder
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelMonitoringAlertConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelMonitoringAlertConfig.java
index 378fd52e6b9..ceef018345e 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelMonitoringAlertConfig.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelMonitoringAlertConfig.java
@@ -18,15 +18,7 @@
 
 package com.google.cloud.aiplatform.v1;
 
-/**
- *
- *
- * 
- * Next ID: 3
- * 
- * - * Protobuf type {@code google.cloud.aiplatform.v1.ModelMonitoringAlertConfig} - */ +/** Protobuf type {@code google.cloud.aiplatform.v1.ModelMonitoringAlertConfig} */ public final class ModelMonitoringAlertConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ModelMonitoringAlertConfig) @@ -1252,15 +1244,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } - /** - * - * - *
-   * Next ID: 3
-   * 
- * - * Protobuf type {@code google.cloud.aiplatform.v1.ModelMonitoringAlertConfig} - */ + /** Protobuf type {@code google.cloud.aiplatform.v1.ModelMonitoringAlertConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ModelMonitoringAlertConfig) diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelMonitoringObjectiveConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelMonitoringObjectiveConfig.java index 3e94aa02d55..2035311a3e4 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelMonitoringObjectiveConfig.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelMonitoringObjectiveConfig.java @@ -22,7 +22,8 @@ * * *
- * Next ID: 8
+ * The objective configuration for model monitoring, including the information
+ * needed to detect anomalies for one particular model.
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1.ModelMonitoringObjectiveConfig} @@ -9335,7 +9336,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Next ID: 8
+   * The objective configuration for model monitoring, including the information
+   * needed to detect anomalies for one particular model.
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1.ModelMonitoringObjectiveConfig} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RemoveDatapointsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RemoveDatapointsRequest.java new file mode 100644 index 00000000000..5e66fab3b17 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RemoveDatapointsRequest.java @@ -0,0 +1,947 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1.IndexService.RemoveDatapoints]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.RemoveDatapointsRequest} + */ +public final class RemoveDatapointsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.RemoveDatapointsRequest) + RemoveDatapointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveDatapointsRequest.newBuilder() to construct. + private RemoveDatapointsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveDatapointsRequest() { + index_ = ""; + datapointIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveDatapointsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RemoveDatapointsRequest( + 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(); + + index_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + datapointIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + datapointIds_.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)) { + datapointIds_ = datapointIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_RemoveDatapointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_RemoveDatapointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest.class, + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest.Builder.class); + } + + public static final int INDEX_FIELD_NUMBER = 1; + private volatile java.lang.Object index_; + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + @java.lang.Override + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATAPOINT_IDS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList datapointIds_; + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @return A list containing the datapointIds. + */ + public com.google.protobuf.ProtocolStringList getDatapointIdsList() { + return datapointIds_; + } + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @return The count of datapointIds. + */ + public int getDatapointIdsCount() { + return datapointIds_.size(); + } + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index of the element to return. + * @return The datapointIds at the given index. + */ + public java.lang.String getDatapointIds(int index) { + return datapointIds_.get(index); + } + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the datapointIds at the given index. + */ + public com.google.protobuf.ByteString getDatapointIdsBytes(int index) { + return datapointIds_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, index_); + } + for (int i = 0; i < datapointIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, datapointIds_.getRaw(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(index_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, index_); + } + { + int dataSize = 0; + for (int i = 0; i < datapointIds_.size(); i++) { + dataSize += computeStringSizeNoTag(datapointIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getDatapointIdsList().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.RemoveDatapointsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest other = + (com.google.cloud.aiplatform.v1.RemoveDatapointsRequest) obj; + + if (!getIndex().equals(other.getIndex())) return false; + if (!getDatapointIdsList().equals(other.getDatapointIdsList())) 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) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + if (getDatapointIdsCount() > 0) { + hash = (37 * hash) + DATAPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDatapointIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsRequest 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.RemoveDatapointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsRequest 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.RemoveDatapointsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsRequest 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.RemoveDatapointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsRequest 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.RemoveDatapointsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsRequest 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.RemoveDatapointsRequest 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.RemoveDatapointsRequest 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.RemoveDatapointsRequest 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 [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1.IndexService.RemoveDatapoints]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.RemoveDatapointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.RemoveDatapointsRequest) + com.google.cloud.aiplatform.v1.RemoveDatapointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_RemoveDatapointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_RemoveDatapointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest.class, + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.RemoveDatapointsRequest.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(); + index_ = ""; + + datapointIds_ = 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.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_RemoveDatapointsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RemoveDatapointsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.RemoveDatapointsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RemoveDatapointsRequest build() { + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RemoveDatapointsRequest buildPartial() { + com.google.cloud.aiplatform.v1.RemoveDatapointsRequest result = + new com.google.cloud.aiplatform.v1.RemoveDatapointsRequest(this); + int from_bitField0_ = bitField0_; + result.index_ = index_; + if (((bitField0_ & 0x00000001) != 0)) { + datapointIds_ = datapointIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.datapointIds_ = datapointIds_; + 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.RemoveDatapointsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.RemoveDatapointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.RemoveDatapointsRequest other) { + if (other == com.google.cloud.aiplatform.v1.RemoveDatapointsRequest.getDefaultInstance()) + return this; + if (!other.getIndex().isEmpty()) { + index_ = other.index_; + onChanged(); + } + if (!other.datapointIds_.isEmpty()) { + if (datapointIds_.isEmpty()) { + datapointIds_ = other.datapointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDatapointIdsIsMutable(); + datapointIds_.addAll(other.datapointIds_); + } + 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.RemoveDatapointsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.RemoveDatapointsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + index_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + + index_ = getDefaultInstance().getIndex(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for index to set. + * @return This builder for chaining. + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + index_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList datapointIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDatapointIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + datapointIds_ = new com.google.protobuf.LazyStringArrayList(datapointIds_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @return A list containing the datapointIds. + */ + public com.google.protobuf.ProtocolStringList getDatapointIdsList() { + return datapointIds_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @return The count of datapointIds. + */ + public int getDatapointIdsCount() { + return datapointIds_.size(); + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index of the element to return. + * @return The datapointIds at the given index. + */ + public java.lang.String getDatapointIds(int index) { + return datapointIds_.get(index); + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the datapointIds at the given index. + */ + public com.google.protobuf.ByteString getDatapointIdsBytes(int index) { + return datapointIds_.getByteString(index); + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index to set the value at. + * @param value The datapointIds to set. + * @return This builder for chaining. + */ + public Builder setDatapointIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatapointIdsIsMutable(); + datapointIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @param value The datapointIds to add. + * @return This builder for chaining. + */ + public Builder addDatapointIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatapointIdsIsMutable(); + datapointIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @param values The datapointIds to add. + * @return This builder for chaining. + */ + public Builder addAllDatapointIds(java.lang.Iterable values) { + ensureDatapointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datapointIds_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @return This builder for chaining. + */ + public Builder clearDatapointIds() { + datapointIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @param value The bytes of the datapointIds to add. + * @return This builder for chaining. + */ + public Builder addDatapointIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDatapointIdsIsMutable(); + datapointIds_.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.RemoveDatapointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.RemoveDatapointsRequest) + private static final com.google.cloud.aiplatform.v1.RemoveDatapointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.RemoveDatapointsRequest(); + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveDatapointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoveDatapointsRequest(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.RemoveDatapointsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RemoveDatapointsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RemoveDatapointsRequestOrBuilder.java new file mode 100644 index 00000000000..9b39d00f7fc --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RemoveDatapointsRequestOrBuilder.java @@ -0,0 +1,109 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface RemoveDatapointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.RemoveDatapointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + java.lang.String getIndex(); + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + com.google.protobuf.ByteString getIndexBytes(); + + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @return A list containing the datapointIds. + */ + java.util.List getDatapointIdsList(); + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @return The count of datapointIds. + */ + int getDatapointIdsCount(); + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index of the element to return. + * @return The datapointIds at the given index. + */ + java.lang.String getDatapointIds(int index); + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the datapointIds at the given index. + */ + com.google.protobuf.ByteString getDatapointIdsBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RemoveDatapointsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RemoveDatapointsResponse.java new file mode 100644 index 00000000000..209ba0cd7f3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RemoveDatapointsResponse.java @@ -0,0 +1,459 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1.IndexService.RemoveDatapoints]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.RemoveDatapointsResponse} + */ +public final class RemoveDatapointsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.RemoveDatapointsResponse) + RemoveDatapointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveDatapointsResponse.newBuilder() to construct. + private RemoveDatapointsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveDatapointsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveDatapointsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RemoveDatapointsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_RemoveDatapointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_RemoveDatapointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse.class, + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.RemoveDatapointsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse other = + (com.google.cloud.aiplatform.v1.RemoveDatapointsResponse) obj; + + 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsResponse 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.RemoveDatapointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsResponse 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.RemoveDatapointsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsResponse 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.RemoveDatapointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsResponse 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.RemoveDatapointsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsResponse 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.RemoveDatapointsResponse 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.RemoveDatapointsResponse 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.RemoveDatapointsResponse 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 [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1.IndexService.RemoveDatapoints]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.RemoveDatapointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.RemoveDatapointsResponse) + com.google.cloud.aiplatform.v1.RemoveDatapointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_RemoveDatapointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_RemoveDatapointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse.class, + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.RemoveDatapointsResponse.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(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_RemoveDatapointsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RemoveDatapointsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.RemoveDatapointsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RemoveDatapointsResponse build() { + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.RemoveDatapointsResponse buildPartial() { + com.google.cloud.aiplatform.v1.RemoveDatapointsResponse result = + new com.google.cloud.aiplatform.v1.RemoveDatapointsResponse(this); + 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.RemoveDatapointsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.RemoveDatapointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.RemoveDatapointsResponse other) { + if (other == com.google.cloud.aiplatform.v1.RemoveDatapointsResponse.getDefaultInstance()) + return this; + 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.RemoveDatapointsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.RemoveDatapointsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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.RemoveDatapointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.RemoveDatapointsResponse) + private static final com.google.cloud.aiplatform.v1.RemoveDatapointsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.RemoveDatapointsResponse(); + } + + public static com.google.cloud.aiplatform.v1.RemoveDatapointsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveDatapointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoveDatapointsResponse(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.RemoveDatapointsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RemoveDatapointsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RemoveDatapointsResponseOrBuilder.java new file mode 100644 index 00000000000..77ea7b79982 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/RemoveDatapointsResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface RemoveDatapointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.RemoveDatapointsResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SamplingStrategy.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SamplingStrategy.java index da766f1d92b..f938abfde2d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SamplingStrategy.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SamplingStrategy.java @@ -24,7 +24,6 @@ *
  * Sampling Strategy for logging, can be for both training and prediction
  * dataset.
- * Next ID: 2
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1.SamplingStrategy} @@ -915,7 +914,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Sampling Strategy for logging, can be for both training and prediction
    * dataset.
-   * Next ID: 2
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1.SamplingStrategy} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SavedQuery.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SavedQuery.java index 30d25df4608..f8453feeafd 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SavedQuery.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SavedQuery.java @@ -590,7 +590,7 @@ public int getAnnotationSpecCount() { * * *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * Used to perform a consistent read-modify-write update. If not set, a blind
    * "overwrite" update happens.
    * 
* @@ -614,7 +614,7 @@ public java.lang.String getEtag() { * * *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * Used to perform a consistent read-modify-write update. If not set, a blind
    * "overwrite" update happens.
    * 
* @@ -2276,7 +2276,7 @@ public Builder clearAnnotationSpecCount() { * * *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * Used to perform a consistent read-modify-write update. If not set, a blind
      * "overwrite" update happens.
      * 
* @@ -2299,7 +2299,7 @@ public java.lang.String getEtag() { * * *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * Used to perform a consistent read-modify-write update. If not set, a blind
      * "overwrite" update happens.
      * 
* @@ -2322,7 +2322,7 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * Used to perform a consistent read-modify-write update. If not set, a blind
      * "overwrite" update happens.
      * 
* @@ -2344,7 +2344,7 @@ public Builder setEtag(java.lang.String value) { * * *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * Used to perform a consistent read-modify-write update. If not set, a blind
      * "overwrite" update happens.
      * 
* @@ -2362,7 +2362,7 @@ public Builder clearEtag() { * * *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * Used to perform a consistent read-modify-write update. If not set, a blind
      * "overwrite" update happens.
      * 
* diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SavedQueryOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SavedQueryOrBuilder.java index b4c37e34c89..a1e62ee1e7f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SavedQueryOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SavedQueryOrBuilder.java @@ -277,7 +277,7 @@ public interface SavedQueryOrBuilder * * *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * Used to perform a consistent read-modify-write update. If not set, a blind
    * "overwrite" update happens.
    * 
* @@ -290,7 +290,7 @@ public interface SavedQueryOrBuilder * * *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * Used to perform a consistent read-modify-write update. If not set, a blind
    * "overwrite" update happens.
    * 
* diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SuggestTrialsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SuggestTrialsRequest.java index c0a3d6efd81..0bf2bd2b6f4 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SuggestTrialsRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SuggestTrialsRequest.java @@ -187,7 +187,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * Required. The number of suggestions requested.
+   * Required. The number of suggestions requested. It must be positive.
    * 
* * int32 suggestion_count = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -729,7 +729,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. The number of suggestions requested.
+     * Required. The number of suggestions requested. It must be positive.
      * 
* * int32 suggestion_count = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -744,7 +744,7 @@ public int getSuggestionCount() { * * *
-     * Required. The number of suggestions requested.
+     * Required. The number of suggestions requested. It must be positive.
      * 
* * int32 suggestion_count = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -762,7 +762,7 @@ public Builder setSuggestionCount(int value) { * * *
-     * Required. The number of suggestions requested.
+     * Required. The number of suggestions requested. It must be positive.
      * 
* * int32 suggestion_count = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SuggestTrialsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SuggestTrialsRequestOrBuilder.java index d3d2eb25635..28706d2dacf 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SuggestTrialsRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/SuggestTrialsRequestOrBuilder.java @@ -58,7 +58,7 @@ public interface SuggestTrialsRequestOrBuilder * * *
-   * Required. The number of suggestions requested.
+   * Required. The number of suggestions requested. It must be positive.
    * 
* * int32 suggestion_count = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ThresholdConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ThresholdConfig.java index d12d424ca43..48b6c9536d2 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ThresholdConfig.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ThresholdConfig.java @@ -23,7 +23,6 @@ * *
  * The config for feature monitoring threshold.
- * Next ID: 3
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1.ThresholdConfig} @@ -387,7 +386,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * The config for feature monitoring threshold.
-   * Next ID: 3
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1.ThresholdConfig} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpsertDatapointsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpsertDatapointsRequest.java new file mode 100644 index 00000000000..f92d3d82956 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpsertDatapointsRequest.java @@ -0,0 +1,1163 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1.IndexService.UpsertDatapoints]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpsertDatapointsRequest} + */ +public final class UpsertDatapointsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpsertDatapointsRequest) + UpsertDatapointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpsertDatapointsRequest.newBuilder() to construct. + private UpsertDatapointsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpsertDatapointsRequest() { + index_ = ""; + datapoints_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpsertDatapointsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpsertDatapointsRequest( + 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(); + + index_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + datapoints_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + datapoints_.add( + input.readMessage( + com.google.cloud.aiplatform.v1.IndexDatapoint.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)) { + datapoints_ = java.util.Collections.unmodifiableList(datapoints_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_UpsertDatapointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_UpsertDatapointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest.class, + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest.Builder.class); + } + + public static final int INDEX_FIELD_NUMBER = 1; + private volatile java.lang.Object index_; + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + @java.lang.Override + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATAPOINTS_FIELD_NUMBER = 2; + private java.util.List datapoints_; + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + @java.lang.Override + public java.util.List getDatapointsList() { + return datapoints_; + } + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + @java.lang.Override + public java.util.List + getDatapointsOrBuilderList() { + return datapoints_; + } + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + @java.lang.Override + public int getDatapointsCount() { + return datapoints_.size(); + } + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapoint getDatapoints(int index) { + return datapoints_.get(index); + } + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.IndexDatapointOrBuilder getDatapointsOrBuilder(int index) { + return datapoints_.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(index_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, index_); + } + for (int i = 0; i < datapoints_.size(); i++) { + output.writeMessage(2, datapoints_.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(index_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, index_); + } + for (int i = 0; i < datapoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, datapoints_.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.UpsertDatapointsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest other = + (com.google.cloud.aiplatform.v1.UpsertDatapointsRequest) obj; + + if (!getIndex().equals(other.getIndex())) return false; + if (!getDatapointsList().equals(other.getDatapointsList())) 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) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + if (getDatapointsCount() > 0) { + hash = (37 * hash) + DATAPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getDatapointsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsRequest 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.UpsertDatapointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsRequest 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.UpsertDatapointsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsRequest 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.UpsertDatapointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsRequest 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.UpsertDatapointsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsRequest 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.UpsertDatapointsRequest 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.UpsertDatapointsRequest 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.UpsertDatapointsRequest 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 [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1.IndexService.UpsertDatapoints]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpsertDatapointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpsertDatapointsRequest) + com.google.cloud.aiplatform.v1.UpsertDatapointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_UpsertDatapointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_UpsertDatapointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest.class, + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpsertDatapointsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDatapointsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + index_ = ""; + + if (datapointsBuilder_ == null) { + datapoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + datapointsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_UpsertDatapointsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpsertDatapointsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpsertDatapointsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpsertDatapointsRequest build() { + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpsertDatapointsRequest buildPartial() { + com.google.cloud.aiplatform.v1.UpsertDatapointsRequest result = + new com.google.cloud.aiplatform.v1.UpsertDatapointsRequest(this); + int from_bitField0_ = bitField0_; + result.index_ = index_; + if (datapointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + datapoints_ = java.util.Collections.unmodifiableList(datapoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.datapoints_ = datapoints_; + } else { + result.datapoints_ = datapointsBuilder_.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.UpsertDatapointsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpsertDatapointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpsertDatapointsRequest other) { + if (other == com.google.cloud.aiplatform.v1.UpsertDatapointsRequest.getDefaultInstance()) + return this; + if (!other.getIndex().isEmpty()) { + index_ = other.index_; + onChanged(); + } + if (datapointsBuilder_ == null) { + if (!other.datapoints_.isEmpty()) { + if (datapoints_.isEmpty()) { + datapoints_ = other.datapoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDatapointsIsMutable(); + datapoints_.addAll(other.datapoints_); + } + onChanged(); + } + } else { + if (!other.datapoints_.isEmpty()) { + if (datapointsBuilder_.isEmpty()) { + datapointsBuilder_.dispose(); + datapointsBuilder_ = null; + datapoints_ = other.datapoints_; + bitField0_ = (bitField0_ & ~0x00000001); + datapointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDatapointsFieldBuilder() + : null; + } else { + datapointsBuilder_.addAllMessages(other.datapoints_); + } + } + } + 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.UpsertDatapointsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UpsertDatapointsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + index_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + + index_ = getDefaultInstance().getIndex(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for index to set. + * @return This builder for chaining. + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + index_ = value; + onChanged(); + return this; + } + + private java.util.List datapoints_ = + java.util.Collections.emptyList(); + + private void ensureDatapointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + datapoints_ = + new java.util.ArrayList(datapoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexDatapoint, + com.google.cloud.aiplatform.v1.IndexDatapoint.Builder, + com.google.cloud.aiplatform.v1.IndexDatapointOrBuilder> + datapointsBuilder_; + + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public java.util.List getDatapointsList() { + if (datapointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(datapoints_); + } else { + return datapointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public int getDatapointsCount() { + if (datapointsBuilder_ == null) { + return datapoints_.size(); + } else { + return datapointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint getDatapoints(int index) { + if (datapointsBuilder_ == null) { + return datapoints_.get(index); + } else { + return datapointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public Builder setDatapoints(int index, com.google.cloud.aiplatform.v1.IndexDatapoint value) { + if (datapointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatapointsIsMutable(); + datapoints_.set(index, value); + onChanged(); + } else { + datapointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public Builder setDatapoints( + int index, com.google.cloud.aiplatform.v1.IndexDatapoint.Builder builderForValue) { + if (datapointsBuilder_ == null) { + ensureDatapointsIsMutable(); + datapoints_.set(index, builderForValue.build()); + onChanged(); + } else { + datapointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public Builder addDatapoints(com.google.cloud.aiplatform.v1.IndexDatapoint value) { + if (datapointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatapointsIsMutable(); + datapoints_.add(value); + onChanged(); + } else { + datapointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public Builder addDatapoints(int index, com.google.cloud.aiplatform.v1.IndexDatapoint value) { + if (datapointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatapointsIsMutable(); + datapoints_.add(index, value); + onChanged(); + } else { + datapointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public Builder addDatapoints( + com.google.cloud.aiplatform.v1.IndexDatapoint.Builder builderForValue) { + if (datapointsBuilder_ == null) { + ensureDatapointsIsMutable(); + datapoints_.add(builderForValue.build()); + onChanged(); + } else { + datapointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public Builder addDatapoints( + int index, com.google.cloud.aiplatform.v1.IndexDatapoint.Builder builderForValue) { + if (datapointsBuilder_ == null) { + ensureDatapointsIsMutable(); + datapoints_.add(index, builderForValue.build()); + onChanged(); + } else { + datapointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public Builder addAllDatapoints( + java.lang.Iterable values) { + if (datapointsBuilder_ == null) { + ensureDatapointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datapoints_); + onChanged(); + } else { + datapointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public Builder clearDatapoints() { + if (datapointsBuilder_ == null) { + datapoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + datapointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public Builder removeDatapoints(int index) { + if (datapointsBuilder_ == null) { + ensureDatapointsIsMutable(); + datapoints_.remove(index); + onChanged(); + } else { + datapointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint.Builder getDatapointsBuilder(int index) { + return getDatapointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public com.google.cloud.aiplatform.v1.IndexDatapointOrBuilder getDatapointsOrBuilder( + int index) { + if (datapointsBuilder_ == null) { + return datapoints_.get(index); + } else { + return datapointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public java.util.List + getDatapointsOrBuilderList() { + if (datapointsBuilder_ != null) { + return datapointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(datapoints_); + } + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint.Builder addDatapointsBuilder() { + return getDatapointsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.IndexDatapoint.getDefaultInstance()); + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public com.google.cloud.aiplatform.v1.IndexDatapoint.Builder addDatapointsBuilder(int index) { + return getDatapointsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.IndexDatapoint.getDefaultInstance()); + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + public java.util.List + getDatapointsBuilderList() { + return getDatapointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexDatapoint, + com.google.cloud.aiplatform.v1.IndexDatapoint.Builder, + com.google.cloud.aiplatform.v1.IndexDatapointOrBuilder> + getDatapointsFieldBuilder() { + if (datapointsBuilder_ == null) { + datapointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.IndexDatapoint, + com.google.cloud.aiplatform.v1.IndexDatapoint.Builder, + com.google.cloud.aiplatform.v1.IndexDatapointOrBuilder>( + datapoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + datapoints_ = null; + } + return datapointsBuilder_; + } + + @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.UpsertDatapointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpsertDatapointsRequest) + private static final com.google.cloud.aiplatform.v1.UpsertDatapointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpsertDatapointsRequest(); + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpsertDatapointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpsertDatapointsRequest(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.UpsertDatapointsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpsertDatapointsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpsertDatapointsRequestOrBuilder.java new file mode 100644 index 00000000000..622de5f7333 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpsertDatapointsRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpsertDatapointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpsertDatapointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + java.lang.String getIndex(); + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + com.google.protobuf.ByteString getIndexBytes(); + + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + java.util.List getDatapointsList(); + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + com.google.cloud.aiplatform.v1.IndexDatapoint getDatapoints(int index); + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + int getDatapointsCount(); + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + java.util.List + getDatapointsOrBuilderList(); + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.IndexDatapoint datapoints = 2; + */ + com.google.cloud.aiplatform.v1.IndexDatapointOrBuilder getDatapointsOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpsertDatapointsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpsertDatapointsResponse.java new file mode 100644 index 00000000000..7853d6b253a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpsertDatapointsResponse.java @@ -0,0 +1,459 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1.IndexService.UpsertDatapoints]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpsertDatapointsResponse} + */ +public final class UpsertDatapointsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.UpsertDatapointsResponse) + UpsertDatapointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpsertDatapointsResponse.newBuilder() to construct. + private UpsertDatapointsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpsertDatapointsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpsertDatapointsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpsertDatapointsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_UpsertDatapointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_UpsertDatapointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse.class, + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.UpsertDatapointsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse other = + (com.google.cloud.aiplatform.v1.UpsertDatapointsResponse) obj; + + 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsResponse 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.UpsertDatapointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsResponse 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.UpsertDatapointsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsResponse 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.UpsertDatapointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsResponse 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.UpsertDatapointsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsResponse 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.UpsertDatapointsResponse 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.UpsertDatapointsResponse 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.UpsertDatapointsResponse 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 [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1.IndexService.UpsertDatapoints]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.UpsertDatapointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.UpsertDatapointsResponse) + com.google.cloud.aiplatform.v1.UpsertDatapointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_UpsertDatapointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_UpsertDatapointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse.class, + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.UpsertDatapointsResponse.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(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1_UpsertDatapointsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpsertDatapointsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.UpsertDatapointsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpsertDatapointsResponse build() { + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.UpsertDatapointsResponse buildPartial() { + com.google.cloud.aiplatform.v1.UpsertDatapointsResponse result = + new com.google.cloud.aiplatform.v1.UpsertDatapointsResponse(this); + 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.UpsertDatapointsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.UpsertDatapointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.UpsertDatapointsResponse other) { + if (other == com.google.cloud.aiplatform.v1.UpsertDatapointsResponse.getDefaultInstance()) + return this; + 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.UpsertDatapointsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1.UpsertDatapointsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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.UpsertDatapointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.UpsertDatapointsResponse) + private static final com.google.cloud.aiplatform.v1.UpsertDatapointsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.UpsertDatapointsResponse(); + } + + public static com.google.cloud.aiplatform.v1.UpsertDatapointsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpsertDatapointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpsertDatapointsResponse(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.UpsertDatapointsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpsertDatapointsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpsertDatapointsResponseOrBuilder.java new file mode 100644 index 00000000000..39d5342163a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/UpsertDatapointsResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface UpsertDatapointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.UpsertDatapointsResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/dataset_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/dataset_service.proto index 71b332a8c8b..c26f60e331e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/dataset_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/dataset_service.proto @@ -399,8 +399,7 @@ message ListSavedQueriesRequest { // Response message for [DatasetService.ListSavedQueries][google.cloud.aiplatform.v1.DatasetService.ListSavedQueries]. message ListSavedQueriesResponse { - // A list of SavedQueries that matches the specified filter in the - // request. + // A list of SavedQueries that match the specified filter in the request. repeated SavedQuery saved_queries = 1; // The standard List next-page token. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/explanation.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/explanation.proto index e0a41838803..0c00d8a2268 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/explanation.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/explanation.proto @@ -182,8 +182,8 @@ message ExplanationSpec { // Required. Parameters that configure explaining of the Model's predictions. ExplanationParameters parameters = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Metadata describing the Model's input and output for explanation. - ExplanationMetadata metadata = 2 [(google.api.field_behavior) = REQUIRED]; + // Optional. Metadata describing the Model's input and output for explanation. + ExplanationMetadata metadata = 2 [(google.api.field_behavior) = OPTIONAL]; } // Parameters to configure explaining for Model's predictions. @@ -224,7 +224,7 @@ message ExplanationParameters { // explaining. // // If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs. - // If neither top_k nor output_indeices is populated, returns the argmax + // If neither top_k nor output_indices is populated, returns the argmax // index of the outputs. // // Only applicable to Models that predict multiple outputs (e,g, multi-class diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index.proto index adf329aab5b..69fde66a709 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index.proto @@ -38,6 +38,21 @@ message Index { pattern: "projects/{project}/locations/{location}/indexes/{index}" }; + // The update method of an Index. + enum IndexUpdateMethod { + // Should not be used. + INDEX_UPDATE_METHOD_UNSPECIFIED = 0; + + // BatchUpdate: user can call UpdateIndex with files on Cloud Storage of + // datapoints to update. + BATCH_UPDATE = 1; + + // StreamUpdate: user can call UpsertDatapoints/DeleteDatapoints to update + // the Index and the updates will be applied in corresponding + // DeployedIndexes in nearly real-time. + STREAM_UPDATE = 2; + } + // Output only. The resource name of the Index. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -93,4 +108,65 @@ message Index { // in the Index. Result of any successfully completed Operation on the Index // is reflected in it. google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Stats of the index resource. + IndexStats index_stats = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be + // used by default. + IndexUpdateMethod index_update_method = 16 [(google.api.field_behavior) = IMMUTABLE]; +} + +// A datapoint of Index. +message IndexDatapoint { + // Restriction of a datapoint which describe its attributes(tokens) from each + // of several attribute categories(namespaces). + message Restriction { + // The namespace of this restriction. eg: color. + string namespace = 1; + + // The attributes to allow in this namespace. eg: 'red' + repeated string allow_list = 2; + + // The attributes to deny in this namespace. eg: 'blue' + repeated string deny_list = 3; + } + + // Crowding tag is a constraint on a neighbor list produced by nearest + // neighbor search requiring that no more than some value k' of the k + // neighbors returned have the same value of crowding_attribute. + message CrowdingTag { + // The attribute value used for crowding. The maximum number of neighbors + // to return per crowding attribute value + // (per_crowding_attribute_num_neighbors) is configured per-query. This + // field is ignored if per_crowding_attribute_num_neighbors is larger than + // the total number of neighbors to return for a given query. + string crowding_attribute = 1; + } + + // Required. Unique identifier of the datapoint. + string datapoint_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Feature embedding vector. An array of numbers with the length of + // [NearestNeighborSearchConfig.dimensions]. + repeated float feature_vector = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. List of Restrict of the datapoint, used to perform "restricted searches" + // where boolean rule are used to filter the subset of the database eligible + // for matching. + // See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering + repeated Restriction restricts = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. CrowdingTag of the datapoint, the number of neighbors to return in each + // crowding can be configured during query. + CrowdingTag crowding_tag = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Stats of the Index. +message IndexStats { + // Output only. The number of vectors in the Index. + int64 vectors_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of shards in the Index. + int32 shards_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index_service.proto index f3812b982c3..0f6c632567b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index_service.proto @@ -93,6 +93,22 @@ service IndexService { metadata_type: "DeleteOperationMetadata" }; } + + // Add/update Datapoints into an Index. + rpc UpsertDatapoints(UpsertDatapointsRequest) returns (UpsertDatapointsResponse) { + option (google.api.http) = { + post: "/v1/{index=projects/*/locations/*/indexes/*}:upsertDatapoints" + body: "*" + }; + } + + // Remove Datapoints from an Index. + rpc RemoveDatapoints(RemoveDatapointsRequest) returns (RemoveDatapointsResponse) { + option (google.api.http) = { + post: "/v1/{index=projects/*/locations/*/indexes/*}:removeDatapoints" + body: "*" + }; + } } // Request message for [IndexService.CreateIndex][google.cloud.aiplatform.v1.IndexService.CreateIndex]. @@ -201,6 +217,48 @@ message DeleteIndexRequest { ]; } +// Request message for [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1.IndexService.UpsertDatapoints] +message UpsertDatapointsRequest { + // Required. The name of the Index resource to be updated. + // Format: + // `projects/{project}/locations/{location}/indexes/{index}` + string index = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Index" + } + ]; + + // A list of datapoints to be created/updated. + repeated IndexDatapoint datapoints = 2; +} + +// Response message for [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1.IndexService.UpsertDatapoints] +message UpsertDatapointsResponse { + +} + +// Request message for [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1.IndexService.RemoveDatapoints] +message RemoveDatapointsRequest { + // Required. The name of the Index resource to be updated. + // Format: + // `projects/{project}/locations/{location}/indexes/{index}` + string index = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Index" + } + ]; + + // A list of datapoint ids to be deleted. + repeated string datapoint_ids = 2; +} + +// Response message for [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1.IndexService.RemoveDatapoints] +message RemoveDatapointsResponse { + +} + // Runtime operation metadata with regard to Matching Engine Index. message NearestNeighborSearchOperationMetadata { message RecordError { diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_monitoring.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_monitoring.proto index 8c806403cc3..039161dde60 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_monitoring.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_monitoring.proto @@ -27,7 +27,8 @@ option java_package = "com.google.cloud.aiplatform.v1"; option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; option ruby_package = "Google::Cloud::AIPlatform::V1"; -// Next ID: 8 +// The objective configuration for model monitoring, including the information +// needed to detect anomalies for one particular model. message ModelMonitoringObjectiveConfig { // Training Dataset information. message TrainingDataset { @@ -162,7 +163,6 @@ message ModelMonitoringObjectiveConfig { ExplanationConfig explanation_config = 5; } -// Next ID: 3 message ModelMonitoringAlertConfig { // The config for email alert. message EmailAlertConfig { @@ -184,7 +184,6 @@ message ModelMonitoringAlertConfig { } // The config for feature monitoring threshold. -// Next ID: 3 message ThresholdConfig { oneof threshold { // Specify a threshold value that can trigger the alert. @@ -201,7 +200,6 @@ message ThresholdConfig { // Sampling Strategy for logging, can be for both training and prediction // dataset. -// Next ID: 2 message SamplingStrategy { // Requests are randomly selected. message RandomSampleConfig { 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 ca892b3aec7..9ea6c56c4a8 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 @@ -439,7 +439,7 @@ message MergeVersionAliasesRequest { // Required. The set of version aliases to merge. // The alias should be at most 128 characters, and match - // `[a-z][a-z0-9-]{0,126}[a-z-0-9]`. + // `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`. // Add the `-` prefix to an alias means removing that alias from the version. // `-` is NOT counted in the 128 characters. Example: `-golden` means removing // the `golden` alias from the version. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/saved_query.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/saved_query.proto index 0c660fcc622..5332222d262 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/saved_query.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/saved_query.proto @@ -59,6 +59,7 @@ message SavedQuery { // Required. Problem type of the SavedQuery. // Allowed values: + // // * IMAGE_CLASSIFICATION_SINGLE_LABEL // * IMAGE_CLASSIFICATION_MULTI_LABEL // * IMAGE_BOUNDING_POLY @@ -74,7 +75,7 @@ message SavedQuery { // Output only. Number of AnnotationSpecs in the context of the SavedQuery. int32 annotation_spec_count = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Used to perform consistent read-modify-write updates. If not set, a blind + // Used to perform a consistent read-modify-write update. If not set, a blind // "overwrite" update happens. string etag = 8; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/vizier_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/vizier_service.proto index 57e74d7fa81..70cc7a7a269 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/vizier_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/vizier_service.proto @@ -285,7 +285,7 @@ message SuggestTrialsRequest { } ]; - // Required. The number of suggestions requested. + // Required. The number of suggestions requested. It must be positive. int32 suggestion_count = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The identifier of the client that is requesting the suggestion. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationParameters.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationParameters.java index f939a42aed6..ffa7b53c302 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationParameters.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationParameters.java @@ -545,7 +545,7 @@ public int getTopK() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -568,7 +568,7 @@ public boolean hasOutputIndices() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -593,7 +593,7 @@ public com.google.protobuf.ListValue getOutputIndices() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -2188,7 +2188,7 @@ public Builder clearTopK() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -2210,7 +2210,7 @@ public boolean hasOutputIndices() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -2238,7 +2238,7 @@ public com.google.protobuf.ListValue getOutputIndices() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -2268,7 +2268,7 @@ public Builder setOutputIndices(com.google.protobuf.ListValue value) { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -2295,7 +2295,7 @@ public Builder setOutputIndices(com.google.protobuf.ListValue.Builder builderFor * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -2329,7 +2329,7 @@ public Builder mergeOutputIndices(com.google.protobuf.ListValue value) { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -2357,7 +2357,7 @@ public Builder clearOutputIndices() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -2379,7 +2379,7 @@ public com.google.protobuf.ListValue.Builder getOutputIndicesBuilder() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -2405,7 +2405,7 @@ public com.google.protobuf.ListValueOrBuilder getOutputIndicesOrBuilder() { * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationParametersOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationParametersOrBuilder.java index b7383209ce0..a2e5956c47f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationParametersOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationParametersOrBuilder.java @@ -242,7 +242,7 @@ public interface ExplanationParametersOrBuilder * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -262,7 +262,7 @@ public interface ExplanationParametersOrBuilder * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). @@ -282,7 +282,7 @@ public interface ExplanationParametersOrBuilder * must be an ndarray of integers, with the same shape of the output it's * explaining. * If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - * If neither top_k nor output_indeices is populated, returns the argmax + * If neither top_k nor output_indices is populated, returns the argmax * index of the outputs. * Only applicable to Models that predict multiple outputs (e,g, multi-class * Models that predict multiple classes). diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationProto.java index b44b1052944..10c90e07a77 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationProto.java @@ -145,7 +145,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\01326.google.cloud.aiplatform.v1beta1.Expl" + "anationParametersB\003\340A\002\022K\n\010metadata\030\002 \001(\013" + "24.google.cloud.aiplatform.v1beta1.Expla" - + "nationMetadataB\003\340A\002\"\301\003\n\025ExplanationParam" + + "nationMetadataB\003\340A\001\"\301\003\n\025ExplanationParam" + "eters\022a\n\033sampled_shapley_attribution\030\001 \001" + "(\0132:.google.cloud.aiplatform.v1beta1.Sam" + "pledShapleyAttributionH\000\022k\n integrated_g" diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationSpec.java index c472d9b70a1..7cd52027232 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationSpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationSpec.java @@ -199,11 +199,11 @@ public com.google.cloud.aiplatform.v1beta1.ExplanationParameters getParameters() * * *
-   * Required. Metadata describing the Model's input and output for explanation.
+   * Optional. Metadata describing the Model's input and output for explanation.
    * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the metadata field is set. @@ -216,11 +216,11 @@ public boolean hasMetadata() { * * *
-   * Required. Metadata describing the Model's input and output for explanation.
+   * Optional. Metadata describing the Model's input and output for explanation.
    * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The metadata. @@ -235,11 +235,11 @@ public com.google.cloud.aiplatform.v1beta1.ExplanationMetadata getMetadata() { * * *
-   * Required. Metadata describing the Model's input and output for explanation.
+   * Optional. Metadata describing the Model's input and output for explanation.
    * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override @@ -822,11 +822,11 @@ public Builder clearParameters() { * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the metadata field is set. @@ -838,11 +838,11 @@ public boolean hasMetadata() { * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The metadata. @@ -860,11 +860,11 @@ public com.google.cloud.aiplatform.v1beta1.ExplanationMetadata getMetadata() { * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setMetadata(com.google.cloud.aiplatform.v1beta1.ExplanationMetadata value) { @@ -884,11 +884,11 @@ public Builder setMetadata(com.google.cloud.aiplatform.v1beta1.ExplanationMetada * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setMetadata( @@ -906,11 +906,11 @@ public Builder setMetadata( * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergeMetadata(com.google.cloud.aiplatform.v1beta1.ExplanationMetadata value) { @@ -934,11 +934,11 @@ public Builder mergeMetadata(com.google.cloud.aiplatform.v1beta1.ExplanationMeta * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearMetadata() { @@ -956,11 +956,11 @@ public Builder clearMetadata() { * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.aiplatform.v1beta1.ExplanationMetadata.Builder getMetadataBuilder() { @@ -972,11 +972,11 @@ public com.google.cloud.aiplatform.v1beta1.ExplanationMetadata.Builder getMetada * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.aiplatform.v1beta1.ExplanationMetadataOrBuilder getMetadataOrBuilder() { @@ -992,11 +992,11 @@ public com.google.cloud.aiplatform.v1beta1.ExplanationMetadataOrBuilder getMetad * * *
-     * Required. Metadata describing the Model's input and output for explanation.
+     * Optional. Metadata describing the Model's input and output for explanation.
      * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationSpecOrBuilder.java index ce4ad3420b0..3649a719ca5 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationSpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ExplanationSpecOrBuilder.java @@ -68,11 +68,11 @@ public interface ExplanationSpecOrBuilder * * *
-   * Required. Metadata describing the Model's input and output for explanation.
+   * Optional. Metadata describing the Model's input and output for explanation.
    * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the metadata field is set. @@ -82,11 +82,11 @@ public interface ExplanationSpecOrBuilder * * *
-   * Required. Metadata describing the Model's input and output for explanation.
+   * Optional. Metadata describing the Model's input and output for explanation.
    * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The metadata. @@ -96,11 +96,11 @@ public interface ExplanationSpecOrBuilder * * *
-   * Required. Metadata describing the Model's input and output for explanation.
+   * Optional. Metadata describing the Model's input and output for explanation.
    * 
* * - * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.aiplatform.v1beta1.ExplanationMetadata metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ com.google.cloud.aiplatform.v1beta1.ExplanationMetadataOrBuilder getMetadataOrBuilder(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Index.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Index.java index e720a62a961..b8b24e39c05 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Index.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Index.java @@ -45,6 +45,7 @@ private Index() { metadataSchemaUri_ = ""; deployedIndexes_ = java.util.Collections.emptyList(); etag_ = ""; + indexUpdateMethod_ = 0; } @java.lang.Override @@ -180,6 +181,29 @@ private Index( updateTime_ = subBuilder.buildPartial(); } + break; + } + case 114: + { + com.google.cloud.aiplatform.v1beta1.IndexStats.Builder subBuilder = null; + if (indexStats_ != null) { + subBuilder = indexStats_.toBuilder(); + } + indexStats_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.IndexStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(indexStats_); + indexStats_ = subBuilder.buildPartial(); + } + + break; + } + case 128: + { + int rawValue = input.readEnum(); + + indexUpdateMethod_ = rawValue; break; } default: @@ -232,6 +256,172 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { com.google.cloud.aiplatform.v1beta1.Index.Builder.class); } + /** + * + * + *
+   * The update method of an Index.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod} + */ + public enum IndexUpdateMethod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should not be used.
+     * 
+ * + * INDEX_UPDATE_METHOD_UNSPECIFIED = 0; + */ + INDEX_UPDATE_METHOD_UNSPECIFIED(0), + /** + * + * + *
+     * BatchUpdate: user can call UpdateIndex with files on Cloud Storage of
+     * datapoints to update.
+     * 
+ * + * BATCH_UPDATE = 1; + */ + BATCH_UPDATE(1), + /** + * + * + *
+     * StreamUpdate: user can call UpsertDatapoints/DeleteDatapoints to update
+     * the Index and the updates will be applied in corresponding
+     * DeployedIndexes in nearly real-time.
+     * 
+ * + * STREAM_UPDATE = 2; + */ + STREAM_UPDATE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should not be used.
+     * 
+ * + * INDEX_UPDATE_METHOD_UNSPECIFIED = 0; + */ + public static final int INDEX_UPDATE_METHOD_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * BatchUpdate: user can call UpdateIndex with files on Cloud Storage of
+     * datapoints to update.
+     * 
+ * + * BATCH_UPDATE = 1; + */ + public static final int BATCH_UPDATE_VALUE = 1; + /** + * + * + *
+     * StreamUpdate: user can call UpsertDatapoints/DeleteDatapoints to update
+     * the Index and the updates will be applied in corresponding
+     * DeployedIndexes in nearly real-time.
+     * 
+ * + * STREAM_UPDATE = 2; + */ + public static final int STREAM_UPDATE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static IndexUpdateMethod valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static IndexUpdateMethod forNumber(int value) { + switch (value) { + case 0: + return INDEX_UPDATE_METHOD_UNSPECIFIED; + case 1: + return BATCH_UPDATE; + case 2: + return STREAM_UPDATE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public IndexUpdateMethod findValueByNumber(int number) { + return IndexUpdateMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.Index.getDescriptor().getEnumTypes().get(0); + } + + private static final IndexUpdateMethod[] VALUES = values(); + + public static IndexUpdateMethod valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private IndexUpdateMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod) + } + public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** @@ -870,6 +1060,104 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } + public static final int INDEX_STATS_FIELD_NUMBER = 14; + private com.google.cloud.aiplatform.v1beta1.IndexStats indexStats_; + /** + * + * + *
+   * Output only. Stats of the index resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the indexStats field is set. + */ + @java.lang.Override + public boolean hasIndexStats() { + return indexStats_ != null; + } + /** + * + * + *
+   * Output only. Stats of the index resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The indexStats. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexStats getIndexStats() { + return indexStats_ == null + ? com.google.cloud.aiplatform.v1beta1.IndexStats.getDefaultInstance() + : indexStats_; + } + /** + * + * + *
+   * Output only. Stats of the index resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexStatsOrBuilder getIndexStatsOrBuilder() { + return getIndexStats(); + } + + public static final int INDEX_UPDATE_METHOD_FIELD_NUMBER = 16; + private int indexUpdateMethod_; + /** + * + * + *
+   * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+   * used by default.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for indexUpdateMethod. + */ + @java.lang.Override + public int getIndexUpdateMethodValue() { + return indexUpdateMethod_; + } + /** + * + * + *
+   * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+   * used by default.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The indexUpdateMethod. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod getIndexUpdateMethod() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod result = + com.google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod.valueOf(indexUpdateMethod_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -913,6 +1201,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(11, getUpdateTime()); } + if (indexStats_ != null) { + output.writeMessage(14, getIndexStats()); + } + if (indexUpdateMethod_ + != com.google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod + .INDEX_UPDATE_METHOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(16, indexUpdateMethod_); + } unknownFields.writeTo(output); } @@ -959,6 +1256,15 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); } + if (indexStats_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getIndexStats()); + } + if (indexUpdateMethod_ + != com.google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod + .INDEX_UPDATE_METHOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, indexUpdateMethod_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -994,6 +1300,11 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } + if (hasIndexStats() != other.hasIndexStats()) return false; + if (hasIndexStats()) { + if (!getIndexStats().equals(other.getIndexStats())) return false; + } + if (indexUpdateMethod_ != other.indexUpdateMethod_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1035,6 +1346,12 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } + if (hasIndexStats()) { + hash = (37 * hash) + INDEX_STATS_FIELD_NUMBER; + hash = (53 * hash) + getIndexStats().hashCode(); + } + hash = (37 * hash) + INDEX_UPDATE_METHOD_FIELD_NUMBER; + hash = (53 * hash) + indexUpdateMethod_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1238,6 +1555,14 @@ public Builder clear() { updateTime_ = null; updateTimeBuilder_ = null; } + if (indexStatsBuilder_ == null) { + indexStats_ = null; + } else { + indexStats_ = null; + indexStatsBuilder_ = null; + } + indexUpdateMethod_ = 0; + return this; } @@ -1297,6 +1622,12 @@ public com.google.cloud.aiplatform.v1beta1.Index buildPartial() { } else { result.updateTime_ = updateTimeBuilder_.build(); } + if (indexStatsBuilder_ == null) { + result.indexStats_ = indexStats_; + } else { + result.indexStats_ = indexStatsBuilder_.build(); + } + result.indexUpdateMethod_ = indexUpdateMethod_; onBuilt(); return result; } @@ -1403,6 +1734,12 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Index other) { if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } + if (other.hasIndexStats()) { + mergeIndexStats(other.getIndexStats()); + } + if (other.indexUpdateMethod_ != 0) { + setIndexUpdateMethodValue(other.getIndexUpdateMethodValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3288,6 +3625,319 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return updateTimeBuilder_; } + private com.google.cloud.aiplatform.v1beta1.IndexStats indexStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexStats, + com.google.cloud.aiplatform.v1beta1.IndexStats.Builder, + com.google.cloud.aiplatform.v1beta1.IndexStatsOrBuilder> + indexStatsBuilder_; + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the indexStats field is set. + */ + public boolean hasIndexStats() { + return indexStatsBuilder_ != null || indexStats_ != null; + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The indexStats. + */ + public com.google.cloud.aiplatform.v1beta1.IndexStats getIndexStats() { + if (indexStatsBuilder_ == null) { + return indexStats_ == null + ? com.google.cloud.aiplatform.v1beta1.IndexStats.getDefaultInstance() + : indexStats_; + } else { + return indexStatsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setIndexStats(com.google.cloud.aiplatform.v1beta1.IndexStats value) { + if (indexStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexStats_ = value; + onChanged(); + } else { + indexStatsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setIndexStats( + com.google.cloud.aiplatform.v1beta1.IndexStats.Builder builderForValue) { + if (indexStatsBuilder_ == null) { + indexStats_ = builderForValue.build(); + onChanged(); + } else { + indexStatsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeIndexStats(com.google.cloud.aiplatform.v1beta1.IndexStats value) { + if (indexStatsBuilder_ == null) { + if (indexStats_ != null) { + indexStats_ = + com.google.cloud.aiplatform.v1beta1.IndexStats.newBuilder(indexStats_) + .mergeFrom(value) + .buildPartial(); + } else { + indexStats_ = value; + } + onChanged(); + } else { + indexStatsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearIndexStats() { + if (indexStatsBuilder_ == null) { + indexStats_ = null; + onChanged(); + } else { + indexStats_ = null; + indexStatsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.IndexStats.Builder getIndexStatsBuilder() { + + onChanged(); + return getIndexStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.IndexStatsOrBuilder getIndexStatsOrBuilder() { + if (indexStatsBuilder_ != null) { + return indexStatsBuilder_.getMessageOrBuilder(); + } else { + return indexStats_ == null + ? com.google.cloud.aiplatform.v1beta1.IndexStats.getDefaultInstance() + : indexStats_; + } + } + /** + * + * + *
+     * Output only. Stats of the index resource.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexStats, + com.google.cloud.aiplatform.v1beta1.IndexStats.Builder, + com.google.cloud.aiplatform.v1beta1.IndexStatsOrBuilder> + getIndexStatsFieldBuilder() { + if (indexStatsBuilder_ == null) { + indexStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexStats, + com.google.cloud.aiplatform.v1beta1.IndexStats.Builder, + com.google.cloud.aiplatform.v1beta1.IndexStatsOrBuilder>( + getIndexStats(), getParentForChildren(), isClean()); + indexStats_ = null; + } + return indexStatsBuilder_; + } + + private int indexUpdateMethod_ = 0; + /** + * + * + *
+     * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+     * used by default.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for indexUpdateMethod. + */ + @java.lang.Override + public int getIndexUpdateMethodValue() { + return indexUpdateMethod_; + } + /** + * + * + *
+     * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+     * used by default.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for indexUpdateMethod to set. + * @return This builder for chaining. + */ + public Builder setIndexUpdateMethodValue(int value) { + + indexUpdateMethod_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+     * used by default.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The indexUpdateMethod. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod getIndexUpdateMethod() { + @SuppressWarnings("deprecation") + com.google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod result = + com.google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod.valueOf(indexUpdateMethod_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+     * used by default.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The indexUpdateMethod to set. + * @return This builder for chaining. + */ + public Builder setIndexUpdateMethod( + com.google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod value) { + if (value == null) { + throw new NullPointerException(); + } + + indexUpdateMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+     * used by default.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearIndexUpdateMethod() { + + indexUpdateMethod_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapoint.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapoint.java new file mode 100644 index 00000000000..2d12a572f29 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapoint.java @@ -0,0 +1,3867 @@ +/* + * 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/index.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * A datapoint of Index.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint} + */ +public final class IndexDatapoint extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint) + IndexDatapointOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexDatapoint.newBuilder() to construct. + private IndexDatapoint(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexDatapoint() { + datapointId_ = ""; + featureVector_ = emptyFloatList(); + restricts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndexDatapoint(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IndexDatapoint( + 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(); + + datapointId_ = s; + break; + } + case 21: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + featureVector_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + featureVector_.addFloat(input.readFloat()); + break; + } + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + featureVector_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + featureVector_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + restricts_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction>(); + mutable_bitField0_ |= 0x00000002; + } + restricts_.add( + input.readMessage( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.parser(), + extensionRegistry)); + break; + } + case 42: + { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder subBuilder = + null; + if (crowdingTag_ != null) { + subBuilder = crowdingTag_.toBuilder(); + } + crowdingTag_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(crowdingTag_); + crowdingTag_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + featureVector_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + restricts_ = java.util.Collections.unmodifiableList(restricts_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.class, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder.class); + } + + public interface RestrictionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The namespace of this restriction. eg: color.
+     * 
+ * + * string namespace = 1; + * + * @return The namespace. + */ + java.lang.String getNamespace(); + /** + * + * + *
+     * The namespace of this restriction. eg: color.
+     * 
+ * + * string namespace = 1; + * + * @return The bytes for namespace. + */ + com.google.protobuf.ByteString getNamespaceBytes(); + + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @return A list containing the allowList. + */ + java.util.List getAllowListList(); + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @return The count of allowList. + */ + int getAllowListCount(); + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @param index The index of the element to return. + * @return The allowList at the given index. + */ + java.lang.String getAllowList(int index); + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @param index The index of the value to return. + * @return The bytes of the allowList at the given index. + */ + com.google.protobuf.ByteString getAllowListBytes(int index); + + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @return A list containing the denyList. + */ + java.util.List getDenyListList(); + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @return The count of denyList. + */ + int getDenyListCount(); + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @param index The index of the element to return. + * @return The denyList at the given index. + */ + java.lang.String getDenyList(int index); + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @param index The index of the value to return. + * @return The bytes of the denyList at the given index. + */ + com.google.protobuf.ByteString getDenyListBytes(int index); + } + /** + * + * + *
+   * Restriction of a datapoint which describe its attributes(tokens) from each
+   * of several attribute categories(namespaces).
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction} + */ + public static final class Restriction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction) + RestrictionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Restriction.newBuilder() to construct. + private Restriction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Restriction() { + namespace_ = ""; + allowList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + denyList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Restriction(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Restriction( + 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(); + + namespace_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + allowList_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + allowList_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + denyList_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + denyList_.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)) { + allowList_ = allowList_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + denyList_ = denyList_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.class, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder.class); + } + + public static final int NAMESPACE_FIELD_NUMBER = 1; + private volatile java.lang.Object namespace_; + /** + * + * + *
+     * The namespace of this restriction. eg: color.
+     * 
+ * + * string namespace = 1; + * + * @return The namespace. + */ + @java.lang.Override + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + 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(); + namespace_ = s; + return s; + } + } + /** + * + * + *
+     * The namespace of this restriction. eg: color.
+     * 
+ * + * string namespace = 1; + * + * @return The bytes for namespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_LIST_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList allowList_; + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @return A list containing the allowList. + */ + public com.google.protobuf.ProtocolStringList getAllowListList() { + return allowList_; + } + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @return The count of allowList. + */ + public int getAllowListCount() { + return allowList_.size(); + } + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @param index The index of the element to return. + * @return The allowList at the given index. + */ + public java.lang.String getAllowList(int index) { + return allowList_.get(index); + } + /** + * + * + *
+     * The attributes to allow in this namespace. eg: 'red'
+     * 
+ * + * repeated string allow_list = 2; + * + * @param index The index of the value to return. + * @return The bytes of the allowList at the given index. + */ + public com.google.protobuf.ByteString getAllowListBytes(int index) { + return allowList_.getByteString(index); + } + + public static final int DENY_LIST_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList denyList_; + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @return A list containing the denyList. + */ + public com.google.protobuf.ProtocolStringList getDenyListList() { + return denyList_; + } + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @return The count of denyList. + */ + public int getDenyListCount() { + return denyList_.size(); + } + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @param index The index of the element to return. + * @return The denyList at the given index. + */ + public java.lang.String getDenyList(int index) { + return denyList_.get(index); + } + /** + * + * + *
+     * The attributes to deny in this namespace. eg: 'blue'
+     * 
+ * + * repeated string deny_list = 3; + * + * @param index The index of the value to return. + * @return The bytes of the denyList at the given index. + */ + public com.google.protobuf.ByteString getDenyListBytes(int index) { + return denyList_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_); + } + for (int i = 0; i < allowList_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, allowList_.getRaw(i)); + } + for (int i = 0; i < denyList_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, denyList_.getRaw(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(namespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_); + } + { + int dataSize = 0; + for (int i = 0; i < allowList_.size(); i++) { + dataSize += computeStringSizeNoTag(allowList_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowListList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < denyList_.size(); i++) { + dataSize += computeStringSizeNoTag(denyList_.getRaw(i)); + } + size += dataSize; + size += 1 * getDenyListList().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.IndexDatapoint.Restriction)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction other = + (com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction) obj; + + if (!getNamespace().equals(other.getNamespace())) return false; + if (!getAllowListList().equals(other.getAllowListList())) return false; + if (!getDenyListList().equals(other.getDenyListList())) 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) + NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getNamespace().hashCode(); + if (getAllowListCount() > 0) { + hash = (37 * hash) + ALLOW_LIST_FIELD_NUMBER; + hash = (53 * hash) + getAllowListList().hashCode(); + } + if (getDenyListCount() > 0) { + hash = (37 * hash) + DENY_LIST_FIELD_NUMBER; + hash = (53 * hash) + getDenyListList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction 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.IndexDatapoint.Restriction 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; + } + /** + * + * + *
+     * Restriction of a datapoint which describe its attributes(tokens) from each
+     * of several attribute categories(namespaces).
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction) + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.class, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.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(); + namespace_ = ""; + + allowList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + denyList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction build() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction buildPartial() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction result = + new com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction(this); + int from_bitField0_ = bitField0_; + result.namespace_ = namespace_; + if (((bitField0_ & 0x00000001) != 0)) { + allowList_ = allowList_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowList_ = allowList_; + if (((bitField0_ & 0x00000002) != 0)) { + denyList_ = denyList_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.denyList_ = denyList_; + 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.IndexDatapoint.Restriction) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction other) { + if (other + == com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.getDefaultInstance()) + return this; + if (!other.getNamespace().isEmpty()) { + namespace_ = other.namespace_; + onChanged(); + } + if (!other.allowList_.isEmpty()) { + if (allowList_.isEmpty()) { + allowList_ = other.allowList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowListIsMutable(); + allowList_.addAll(other.allowList_); + } + onChanged(); + } + if (!other.denyList_.isEmpty()) { + if (denyList_.isEmpty()) { + denyList_ = other.denyList_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDenyListIsMutable(); + denyList_.addAll(other.denyList_); + } + 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.IndexDatapoint.Restriction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object namespace_ = ""; + /** + * + * + *
+       * The namespace of this restriction. eg: color.
+       * 
+ * + * string namespace = 1; + * + * @return The namespace. + */ + public java.lang.String getNamespace() { + java.lang.Object ref = namespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The namespace of this restriction. eg: color.
+       * 
+ * + * string namespace = 1; + * + * @return The bytes for namespace. + */ + public com.google.protobuf.ByteString getNamespaceBytes() { + java.lang.Object ref = namespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The namespace of this restriction. eg: color.
+       * 
+ * + * string namespace = 1; + * + * @param value The namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + namespace_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The namespace of this restriction. eg: color.
+       * 
+ * + * string namespace = 1; + * + * @return This builder for chaining. + */ + public Builder clearNamespace() { + + namespace_ = getDefaultInstance().getNamespace(); + onChanged(); + return this; + } + /** + * + * + *
+       * The namespace of this restriction. eg: color.
+       * 
+ * + * string namespace = 1; + * + * @param value The bytes for namespace to set. + * @return This builder for chaining. + */ + public Builder setNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + namespace_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList allowList_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAllowListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowList_ = new com.google.protobuf.LazyStringArrayList(allowList_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @return A list containing the allowList. + */ + public com.google.protobuf.ProtocolStringList getAllowListList() { + return allowList_.getUnmodifiableView(); + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @return The count of allowList. + */ + public int getAllowListCount() { + return allowList_.size(); + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @param index The index of the element to return. + * @return The allowList at the given index. + */ + public java.lang.String getAllowList(int index) { + return allowList_.get(index); + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @param index The index of the value to return. + * @return The bytes of the allowList at the given index. + */ + public com.google.protobuf.ByteString getAllowListBytes(int index) { + return allowList_.getByteString(index); + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @param index The index to set the value at. + * @param value The allowList to set. + * @return This builder for chaining. + */ + public Builder setAllowList(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowListIsMutable(); + allowList_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @param value The allowList to add. + * @return This builder for chaining. + */ + public Builder addAllowList(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowListIsMutable(); + allowList_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @param values The allowList to add. + * @return This builder for chaining. + */ + public Builder addAllAllowList(java.lang.Iterable values) { + ensureAllowListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowList_); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @return This builder for chaining. + */ + public Builder clearAllowList() { + allowList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to allow in this namespace. eg: 'red'
+       * 
+ * + * repeated string allow_list = 2; + * + * @param value The bytes of the allowList to add. + * @return This builder for chaining. + */ + public Builder addAllowListBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowListIsMutable(); + allowList_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList denyList_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDenyListIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + denyList_ = new com.google.protobuf.LazyStringArrayList(denyList_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @return A list containing the denyList. + */ + public com.google.protobuf.ProtocolStringList getDenyListList() { + return denyList_.getUnmodifiableView(); + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @return The count of denyList. + */ + public int getDenyListCount() { + return denyList_.size(); + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @param index The index of the element to return. + * @return The denyList at the given index. + */ + public java.lang.String getDenyList(int index) { + return denyList_.get(index); + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @param index The index of the value to return. + * @return The bytes of the denyList at the given index. + */ + public com.google.protobuf.ByteString getDenyListBytes(int index) { + return denyList_.getByteString(index); + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @param index The index to set the value at. + * @param value The denyList to set. + * @return This builder for chaining. + */ + public Builder setDenyList(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDenyListIsMutable(); + denyList_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @param value The denyList to add. + * @return This builder for chaining. + */ + public Builder addDenyList(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDenyListIsMutable(); + denyList_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @param values The denyList to add. + * @return This builder for chaining. + */ + public Builder addAllDenyList(java.lang.Iterable values) { + ensureDenyListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, denyList_); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @return This builder for chaining. + */ + public Builder clearDenyList() { + denyList_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The attributes to deny in this namespace. eg: 'blue'
+       * 
+ * + * repeated string deny_list = 3; + * + * @param value The bytes of the denyList to add. + * @return This builder for chaining. + */ + public Builder addDenyListBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDenyListIsMutable(); + denyList_.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.IndexDatapoint.Restriction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction) + private static final com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction(); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Restriction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Restriction(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.IndexDatapoint.Restriction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CrowdingTagOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The crowdingAttribute. + */ + java.lang.String getCrowdingAttribute(); + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The bytes for crowdingAttribute. + */ + com.google.protobuf.ByteString getCrowdingAttributeBytes(); + } + /** + * + * + *
+   * Crowding tag is a constraint on a neighbor list produced by nearest
+   * neighbor search requiring that no more than some value k' of the k
+   * neighbors returned have the same value of crowding_attribute.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag} + */ + public static final class CrowdingTag extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) + CrowdingTagOrBuilder { + private static final long serialVersionUID = 0L; + // Use CrowdingTag.newBuilder() to construct. + private CrowdingTag(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CrowdingTag() { + crowdingAttribute_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CrowdingTag(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CrowdingTag( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + crowdingAttribute_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.class, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder.class); + } + + public static final int CROWDING_ATTRIBUTE_FIELD_NUMBER = 1; + private volatile java.lang.Object crowdingAttribute_; + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The crowdingAttribute. + */ + @java.lang.Override + public java.lang.String getCrowdingAttribute() { + java.lang.Object ref = crowdingAttribute_; + 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(); + crowdingAttribute_ = s; + return s; + } + } + /** + * + * + *
+     * The attribute value used for crowding.  The maximum number of neighbors
+     * to return per crowding attribute value
+     * (per_crowding_attribute_num_neighbors) is configured per-query. This
+     * field is ignored if per_crowding_attribute_num_neighbors is larger than
+     * the total number of neighbors to return for a given query.
+     * 
+ * + * string crowding_attribute = 1; + * + * @return The bytes for crowdingAttribute. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCrowdingAttributeBytes() { + java.lang.Object ref = crowdingAttribute_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + crowdingAttribute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(crowdingAttribute_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, crowdingAttribute_); + } + 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(crowdingAttribute_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, crowdingAttribute_); + } + 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.IndexDatapoint.CrowdingTag)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag other = + (com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) obj; + + if (!getCrowdingAttribute().equals(other.getCrowdingAttribute())) 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) + CROWDING_ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getCrowdingAttribute().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag 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.IndexDatapoint.CrowdingTag 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; + } + /** + * + * + *
+     * Crowding tag is a constraint on a neighbor list produced by nearest
+     * neighbor search requiring that no more than some value k' of the k
+     * neighbors returned have the same value of crowding_attribute.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.class, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.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(); + crowdingAttribute_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag build() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag buildPartial() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag result = + new com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag(this); + result.crowdingAttribute_ = crowdingAttribute_; + 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.IndexDatapoint.CrowdingTag) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag other) { + if (other + == com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.getDefaultInstance()) + return this; + if (!other.getCrowdingAttribute().isEmpty()) { + crowdingAttribute_ = other.crowdingAttribute_; + 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.IndexDatapoint.CrowdingTag parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object crowdingAttribute_ = ""; + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @return The crowdingAttribute. + */ + public java.lang.String getCrowdingAttribute() { + java.lang.Object ref = crowdingAttribute_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + crowdingAttribute_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @return The bytes for crowdingAttribute. + */ + public com.google.protobuf.ByteString getCrowdingAttributeBytes() { + java.lang.Object ref = crowdingAttribute_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + crowdingAttribute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @param value The crowdingAttribute to set. + * @return This builder for chaining. + */ + public Builder setCrowdingAttribute(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + crowdingAttribute_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @return This builder for chaining. + */ + public Builder clearCrowdingAttribute() { + + crowdingAttribute_ = getDefaultInstance().getCrowdingAttribute(); + onChanged(); + return this; + } + /** + * + * + *
+       * The attribute value used for crowding.  The maximum number of neighbors
+       * to return per crowding attribute value
+       * (per_crowding_attribute_num_neighbors) is configured per-query. This
+       * field is ignored if per_crowding_attribute_num_neighbors is larger than
+       * the total number of neighbors to return for a given query.
+       * 
+ * + * string crowding_attribute = 1; + * + * @param value The bytes for crowdingAttribute to set. + * @return This builder for chaining. + */ + public Builder setCrowdingAttributeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + crowdingAttribute_ = 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.IndexDatapoint.CrowdingTag) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag) + private static final com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag(); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CrowdingTag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CrowdingTag(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.IndexDatapoint.CrowdingTag + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DATAPOINT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object datapointId_; + /** + * + * + *
+   * Required. Unique identifier of the datapoint.
+   * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datapointId. + */ + @java.lang.Override + public java.lang.String getDatapointId() { + java.lang.Object ref = datapointId_; + 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(); + datapointId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Unique identifier of the datapoint.
+   * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datapointId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatapointIdBytes() { + java.lang.Object ref = datapointId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datapointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEATURE_VECTOR_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.FloatList featureVector_; + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureVector. + */ + @java.lang.Override + public java.util.List getFeatureVectorList() { + return featureVector_; + } + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureVector. + */ + public int getFeatureVectorCount() { + return featureVector_.size(); + } + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureVector at the given index. + */ + public float getFeatureVector(int index) { + return featureVector_.getFloat(index); + } + + private int featureVectorMemoizedSerializedSize = -1; + + public static final int RESTRICTS_FIELD_NUMBER = 4; + private java.util.List restricts_; + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getRestrictsList() { + return restricts_; + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder> + getRestrictsOrBuilderList() { + return restricts_; + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getRestrictsCount() { + return restricts_.size(); + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction getRestricts(int index) { + return restricts_.get(index); + } + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder + getRestrictsOrBuilder(int index) { + return restricts_.get(index); + } + + public static final int CROWDING_TAG_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowdingTag_; + /** + * + * + *
+   * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+   * crowding can be configured during query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the crowdingTag field is set. + */ + @java.lang.Override + public boolean hasCrowdingTag() { + return crowdingTag_ != null; + } + /** + * + * + *
+   * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+   * crowding can be configured during query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The crowdingTag. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag getCrowdingTag() { + return crowdingTag_ == null + ? com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.getDefaultInstance() + : crowdingTag_; + } + /** + * + * + *
+   * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+   * crowding can be configured during query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTagOrBuilder + getCrowdingTagOrBuilder() { + return getCrowdingTag(); + } + + 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 { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datapointId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, datapointId_); + } + if (getFeatureVectorList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(featureVectorMemoizedSerializedSize); + } + for (int i = 0; i < featureVector_.size(); i++) { + output.writeFloatNoTag(featureVector_.getFloat(i)); + } + for (int i = 0; i < restricts_.size(); i++) { + output.writeMessage(4, restricts_.get(i)); + } + if (crowdingTag_ != null) { + output.writeMessage(5, getCrowdingTag()); + } + 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(datapointId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, datapointId_); + } + { + int dataSize = 0; + dataSize = 4 * getFeatureVectorList().size(); + size += dataSize; + if (!getFeatureVectorList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + featureVectorMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < restricts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, restricts_.get(i)); + } + if (crowdingTag_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCrowdingTag()); + } + 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.IndexDatapoint)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.IndexDatapoint other = + (com.google.cloud.aiplatform.v1beta1.IndexDatapoint) obj; + + if (!getDatapointId().equals(other.getDatapointId())) return false; + if (!getFeatureVectorList().equals(other.getFeatureVectorList())) return false; + if (!getRestrictsList().equals(other.getRestrictsList())) return false; + if (hasCrowdingTag() != other.hasCrowdingTag()) return false; + if (hasCrowdingTag()) { + if (!getCrowdingTag().equals(other.getCrowdingTag())) 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) + DATAPOINT_ID_FIELD_NUMBER; + hash = (53 * hash) + getDatapointId().hashCode(); + if (getFeatureVectorCount() > 0) { + hash = (37 * hash) + FEATURE_VECTOR_FIELD_NUMBER; + hash = (53 * hash) + getFeatureVectorList().hashCode(); + } + if (getRestrictsCount() > 0) { + hash = (37 * hash) + RESTRICTS_FIELD_NUMBER; + hash = (53 * hash) + getRestrictsList().hashCode(); + } + if (hasCrowdingTag()) { + hash = (37 * hash) + CROWDING_TAG_FIELD_NUMBER; + hash = (53 * hash) + getCrowdingTag().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint 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.IndexDatapoint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint 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.IndexDatapoint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint 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.IndexDatapoint parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint 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.IndexDatapoint parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint 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.IndexDatapoint 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.IndexDatapoint 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.IndexDatapoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A datapoint of Index.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexDatapoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.IndexDatapoint) + com.google.cloud.aiplatform.v1beta1.IndexDatapointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.class, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.IndexDatapoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRestrictsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + datapointId_ = ""; + + featureVector_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + if (restrictsBuilder_ == null) { + restricts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + restrictsBuilder_.clear(); + } + if (crowdingTagBuilder_ == null) { + crowdingTag_ = null; + } else { + crowdingTag_ = null; + crowdingTagBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.IndexDatapoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint build() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint buildPartial() { + com.google.cloud.aiplatform.v1beta1.IndexDatapoint result = + new com.google.cloud.aiplatform.v1beta1.IndexDatapoint(this); + int from_bitField0_ = bitField0_; + result.datapointId_ = datapointId_; + if (((bitField0_ & 0x00000001) != 0)) { + featureVector_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.featureVector_ = featureVector_; + if (restrictsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + restricts_ = java.util.Collections.unmodifiableList(restricts_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.restricts_ = restricts_; + } else { + result.restricts_ = restrictsBuilder_.build(); + } + if (crowdingTagBuilder_ == null) { + result.crowdingTag_ = crowdingTag_; + } else { + result.crowdingTag_ = crowdingTagBuilder_.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.IndexDatapoint) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.IndexDatapoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.IndexDatapoint other) { + if (other == com.google.cloud.aiplatform.v1beta1.IndexDatapoint.getDefaultInstance()) + return this; + if (!other.getDatapointId().isEmpty()) { + datapointId_ = other.datapointId_; + onChanged(); + } + if (!other.featureVector_.isEmpty()) { + if (featureVector_.isEmpty()) { + featureVector_ = other.featureVector_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFeatureVectorIsMutable(); + featureVector_.addAll(other.featureVector_); + } + onChanged(); + } + if (restrictsBuilder_ == null) { + if (!other.restricts_.isEmpty()) { + if (restricts_.isEmpty()) { + restricts_ = other.restricts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRestrictsIsMutable(); + restricts_.addAll(other.restricts_); + } + onChanged(); + } + } else { + if (!other.restricts_.isEmpty()) { + if (restrictsBuilder_.isEmpty()) { + restrictsBuilder_.dispose(); + restrictsBuilder_ = null; + restricts_ = other.restricts_; + bitField0_ = (bitField0_ & ~0x00000002); + restrictsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRestrictsFieldBuilder() + : null; + } else { + restrictsBuilder_.addAllMessages(other.restricts_); + } + } + } + if (other.hasCrowdingTag()) { + mergeCrowdingTag(other.getCrowdingTag()); + } + 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.IndexDatapoint parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.IndexDatapoint) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object datapointId_ = ""; + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datapointId. + */ + public java.lang.String getDatapointId() { + java.lang.Object ref = datapointId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + datapointId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datapointId. + */ + public com.google.protobuf.ByteString getDatapointIdBytes() { + java.lang.Object ref = datapointId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + datapointId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The datapointId to set. + * @return This builder for chaining. + */ + public Builder setDatapointId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + datapointId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatapointId() { + + datapointId_ = getDefaultInstance().getDatapointId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Unique identifier of the datapoint.
+     * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for datapointId to set. + * @return This builder for chaining. + */ + public Builder setDatapointIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + datapointId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.FloatList featureVector_ = emptyFloatList(); + + private void ensureFeatureVectorIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + featureVector_ = mutableCopy(featureVector_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureVector. + */ + public java.util.List getFeatureVectorList() { + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(featureVector_) + : featureVector_; + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureVector. + */ + public int getFeatureVectorCount() { + return featureVector_.size(); + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureVector at the given index. + */ + public float getFeatureVector(int index) { + return featureVector_.getFloat(index); + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The featureVector to set. + * @return This builder for chaining. + */ + public Builder setFeatureVector(int index, float value) { + ensureFeatureVectorIsMutable(); + featureVector_.setFloat(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The featureVector to add. + * @return This builder for chaining. + */ + public Builder addFeatureVector(float value) { + ensureFeatureVectorIsMutable(); + featureVector_.addFloat(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The featureVector to add. + * @return This builder for chaining. + */ + public Builder addAllFeatureVector(java.lang.Iterable values) { + ensureFeatureVectorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, featureVector_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Feature embedding vector. An array of numbers with the length of
+     * [NearestNeighborSearchConfig.dimensions].
+     * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFeatureVector() { + featureVector_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private java.util.List + restricts_ = java.util.Collections.emptyList(); + + private void ensureRestrictsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + restricts_ = + new java.util.ArrayList( + restricts_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder> + restrictsBuilder_; + + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getRestrictsList() { + if (restrictsBuilder_ == null) { + return java.util.Collections.unmodifiableList(restricts_); + } else { + return restrictsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getRestrictsCount() { + if (restrictsBuilder_ == null) { + return restricts_.size(); + } else { + return restrictsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction getRestricts(int index) { + if (restrictsBuilder_ == null) { + return restricts_.get(index); + } else { + return restrictsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRestricts( + int index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction value) { + if (restrictsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictsIsMutable(); + restricts_.set(index, value); + onChanged(); + } else { + restrictsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRestricts( + int index, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder builderForValue) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.set(index, builderForValue.build()); + onChanged(); + } else { + restrictsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRestricts( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction value) { + if (restrictsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictsIsMutable(); + restricts_.add(value); + onChanged(); + } else { + restrictsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRestricts( + int index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction value) { + if (restrictsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRestrictsIsMutable(); + restricts_.add(index, value); + onChanged(); + } else { + restrictsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRestricts( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder builderForValue) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.add(builderForValue.build()); + onChanged(); + } else { + restrictsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addRestricts( + int index, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder builderForValue) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.add(index, builderForValue.build()); + onChanged(); + } else { + restrictsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllRestricts( + java.lang.Iterable + values) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, restricts_); + onChanged(); + } else { + restrictsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRestricts() { + if (restrictsBuilder_ == null) { + restricts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + restrictsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeRestricts(int index) { + if (restrictsBuilder_ == null) { + ensureRestrictsIsMutable(); + restricts_.remove(index); + onChanged(); + } else { + restrictsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder + getRestrictsBuilder(int index) { + return getRestrictsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder + getRestrictsOrBuilder(int index) { + if (restrictsBuilder_ == null) { + return restricts_.get(index); + } else { + return restrictsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder> + getRestrictsOrBuilderList() { + if (restrictsBuilder_ != null) { + return restrictsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(restricts_); + } + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder + addRestrictsBuilder() { + return getRestrictsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder + addRestrictsBuilder(int index) { + return getRestrictsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+     * where boolean rule are used to filter the subset of the database eligible
+     * for matching.
+     * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getRestrictsBuilderList() { + return getRestrictsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder> + getRestrictsFieldBuilder() { + if (restrictsBuilder_ == null) { + restrictsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder>( + restricts_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + restricts_ = null; + } + return restrictsBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowdingTag_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTagOrBuilder> + crowdingTagBuilder_; + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the crowdingTag field is set. + */ + public boolean hasCrowdingTag() { + return crowdingTagBuilder_ != null || crowdingTag_ != null; + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The crowdingTag. + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag getCrowdingTag() { + if (crowdingTagBuilder_ == null) { + return crowdingTag_ == null + ? com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.getDefaultInstance() + : crowdingTag_; + } else { + return crowdingTagBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCrowdingTag( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag value) { + if (crowdingTagBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + crowdingTag_ = value; + onChanged(); + } else { + crowdingTagBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCrowdingTag( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder builderForValue) { + if (crowdingTagBuilder_ == null) { + crowdingTag_ = builderForValue.build(); + onChanged(); + } else { + crowdingTagBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCrowdingTag( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag value) { + if (crowdingTagBuilder_ == null) { + if (crowdingTag_ != null) { + crowdingTag_ = + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.newBuilder( + crowdingTag_) + .mergeFrom(value) + .buildPartial(); + } else { + crowdingTag_ = value; + } + onChanged(); + } else { + crowdingTagBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCrowdingTag() { + if (crowdingTagBuilder_ == null) { + crowdingTag_ = null; + onChanged(); + } else { + crowdingTag_ = null; + crowdingTagBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder + getCrowdingTagBuilder() { + + onChanged(); + return getCrowdingTagFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTagOrBuilder + getCrowdingTagOrBuilder() { + if (crowdingTagBuilder_ != null) { + return crowdingTagBuilder_.getMessageOrBuilder(); + } else { + return crowdingTag_ == null + ? com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.getDefaultInstance() + : crowdingTag_; + } + } + /** + * + * + *
+     * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+     * crowding can be configured during query.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTagOrBuilder> + getCrowdingTagFieldBuilder() { + if (crowdingTagBuilder_ == null) { + crowdingTagBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTagOrBuilder>( + getCrowdingTag(), getParentForChildren(), isClean()); + crowdingTag_ = null; + } + return crowdingTagBuilder_; + } + + @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.IndexDatapoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.IndexDatapoint) + private static final com.google.cloud.aiplatform.v1beta1.IndexDatapoint DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.IndexDatapoint(); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexDatapoint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexDatapoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IndexDatapoint(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.IndexDatapoint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapointOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapointOrBuilder.java new file mode 100644 index 00000000000..c373768b0f4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexDatapointOrBuilder.java @@ -0,0 +1,213 @@ +/* + * 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/index.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface IndexDatapointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.IndexDatapoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Unique identifier of the datapoint.
+   * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The datapointId. + */ + java.lang.String getDatapointId(); + /** + * + * + *
+   * Required. Unique identifier of the datapoint.
+   * 
+ * + * string datapoint_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for datapointId. + */ + com.google.protobuf.ByteString getDatapointIdBytes(); + + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the featureVector. + */ + java.util.List getFeatureVectorList(); + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of featureVector. + */ + int getFeatureVectorCount(); + /** + * + * + *
+   * Required. Feature embedding vector. An array of numbers with the length of
+   * [NearestNeighborSearchConfig.dimensions].
+   * 
+ * + * repeated float feature_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The featureVector at the given index. + */ + float getFeatureVector(int index); + + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getRestrictsList(); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction getRestricts(int index); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getRestrictsCount(); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getRestrictsOrBuilderList(); + /** + * + * + *
+   * Optional. List of Restrict of the datapoint, used to perform "restricted searches"
+   * where boolean rule are used to filter the subset of the database eligible
+   * for matching.
+   * See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint.Restriction restricts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.RestrictionOrBuilder getRestrictsOrBuilder( + int index); + + /** + * + * + *
+   * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+   * crowding can be configured during query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the crowdingTag field is set. + */ + boolean hasCrowdingTag(); + /** + * + * + *
+   * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+   * crowding can be configured during query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The crowdingTag. + */ + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag getCrowdingTag(); + /** + * + * + *
+   * Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
+   * crowding can be configured during query.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTag crowding_tag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.CrowdingTagOrBuilder getCrowdingTagOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexOrBuilder.java index c7c683bc885..001bfbdeca4 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexOrBuilder.java @@ -454,4 +454,76 @@ java.lang.String getLabelsOrDefault( * */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Stats of the index resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the indexStats field is set. + */ + boolean hasIndexStats(); + /** + * + * + *
+   * Output only. Stats of the index resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The indexStats. + */ + com.google.cloud.aiplatform.v1beta1.IndexStats getIndexStats(); + /** + * + * + *
+   * Output only. Stats of the index resource.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.IndexStats index_stats = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.IndexStatsOrBuilder getIndexStatsOrBuilder(); + + /** + * + * + *
+   * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+   * used by default.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for indexUpdateMethod. + */ + int getIndexUpdateMethodValue(); + /** + * + * + *
+   * Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
+   * used by default.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod index_update_method = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The indexUpdateMethod. + */ + com.google.cloud.aiplatform.v1beta1.Index.IndexUpdateMethod getIndexUpdateMethod(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexProto.java index 2d10174dc8c..284c24794d1 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexProto.java @@ -35,6 +35,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_Index_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_Index_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_IndexStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_IndexStats_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -50,7 +66,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "api/resource.proto\0328google/cloud/aiplatf" + "orm/v1beta1/deployed_index_ref.proto\032\034go" + "ogle/protobuf/struct.proto\032\037google/proto" - + "buf/timestamp.proto\"\264\004\n\005Index\022\021\n\004name\030\001 " + + "buf/timestamp.proto\"\266\006\n\005Index\022\021\n\004name\030\001 " + "\001(\tB\003\340A\003\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022\023\n\013d" + "escription\030\003 \001(\t\022 \n\023metadata_schema_uri\030" + "\004 \001(\tB\003\340A\005\022(\n\010metadata\030\006 \001(\0132\026.google.pr" @@ -61,16 +77,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ndex.LabelsEntry\0224\n\013create_time\030\n \001(\0132\032." + "google.protobuf.TimestampB\003\340A\003\0224\n\013update" + "_time\030\013 \001(\0132\032.google.protobuf.TimestampB" - + "\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001:]\352AZ\n\037aiplatform.googleapis." - + "com/Index\0227projects/{project}/locations/" - + "{location}/indexes/{index}B\347\001\n#com.googl" - + "e.cloud.aiplatform.v1beta1B\nIndexProtoP\001" - + "ZIgoogle.golang.org/genproto/googleapis/" - + "cloud/aiplatform/v1beta1;aiplatform\252\002\037Go" - + "ogle.Cloud.AIPlatform.V1Beta1\312\002\037Google\\C" - + "loud\\AIPlatform\\V1beta1\352\002\"Google::Cloud:" - + ":AIPlatform::V1beta1b\006proto3" + + "\003\340A\003\022E\n\013index_stats\030\016 \001(\0132+.google.cloud" + + ".aiplatform.v1beta1.IndexStatsB\003\340A\003\022Z\n\023i" + + "ndex_update_method\030\020 \001(\01628.google.cloud." + + "aiplatform.v1beta1.Index.IndexUpdateMeth" + + "odB\003\340A\005\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\001\"]\n\021IndexUpdateMethod\022#\n\037I" + + "NDEX_UPDATE_METHOD_UNSPECIFIED\020\000\022\020\n\014BATC" + + "H_UPDATE\020\001\022\021\n\rSTREAM_UPDATE\020\002:]\352AZ\n\037aipl" + + "atform.googleapis.com/Index\0227projects/{p" + + "roject}/locations/{location}/indexes/{in" + + "dex}\"\351\002\n\016IndexDatapoint\022\031\n\014datapoint_id\030" + + "\001 \001(\tB\003\340A\002\022\033\n\016feature_vector\030\002 \003(\002B\003\340A\002\022" + + "S\n\trestricts\030\004 \003(\0132;.google.cloud.aiplat" + + "form.v1beta1.IndexDatapoint.RestrictionB" + + "\003\340A\001\022V\n\014crowding_tag\030\005 \001(\0132;.google.clou" + + "d.aiplatform.v1beta1.IndexDatapoint.Crow" + + "dingTagB\003\340A\001\032G\n\013Restriction\022\021\n\tnamespace" + + "\030\001 \001(\t\022\022\n\nallow_list\030\002 \003(\t\022\021\n\tdeny_list\030" + + "\003 \003(\t\032)\n\013CrowdingTag\022\032\n\022crowding_attribu" + + "te\030\001 \001(\t\"C\n\nIndexStats\022\032\n\rvectors_count\030" + + "\001 \001(\003B\003\340A\003\022\031\n\014shards_count\030\002 \001(\005B\003\340A\003B\347\001" + + "\n#com.google.cloud.aiplatform.v1beta1B\nI" + + "ndexProtoP\001ZIgoogle.golang.org/genproto/" + + "googleapis/cloud/aiplatform/v1beta1;aipl" + + "atform\252\002\037Google.Cloud.AIPlatform.V1Beta1" + + "\312\002\037Google\\Cloud\\AIPlatform\\V1beta1\352\002\"Goo" + + "gle::Cloud::AIPlatform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -98,6 +131,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Labels", "CreateTime", "UpdateTime", + "IndexStats", + "IndexUpdateMethod", }); internal_static_google_cloud_aiplatform_v1beta1_Index_LabelsEntry_descriptor = internal_static_google_cloud_aiplatform_v1beta1_Index_descriptor.getNestedTypes().get(0); @@ -107,6 +142,42 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor, + new java.lang.String[] { + "DatapointId", "FeatureVector", "Restricts", "CrowdingTag", + }); + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_Restriction_descriptor, + new java.lang.String[] { + "Namespace", "AllowList", "DenyList", + }); + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_IndexDatapoint_CrowdingTag_descriptor, + new java.lang.String[] { + "CrowdingAttribute", + }); + internal_static_google_cloud_aiplatform_v1beta1_IndexStats_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_IndexStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_IndexStats_descriptor, + new java.lang.String[] { + "VectorsCount", "ShardsCount", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceProto.java index f7f47dbeea8..0a37d6926dc 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexServiceProto.java @@ -59,6 +59,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_DeleteIndexRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_DeleteIndexRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_NearestNeighborSearchOperationMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -119,62 +135,81 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "rm.v1beta1.NearestNeighborSearchOperatio" + "nMetadata\"K\n\022DeleteIndexRequest\0225\n\004name\030" + "\001 \001(\tB\'\340A\002\372A!\n\037aiplatform.googleapis.com" - + "/Index\"\331\006\n&NearestNeighborSearchOperatio" - + "nMetadata\022\200\001\n\030content_validation_stats\030\001" - + " \003(\0132^.google.cloud.aiplatform.v1beta1.N" - + "earestNeighborSearchOperationMetadata.Co" - + "ntentValidationStats\022\030\n\020data_bytes_count" - + "\030\002 \001(\003\032\267\003\n\013RecordError\022w\n\nerror_type\030\001 \001" - + "(\0162c.google.cloud.aiplatform.v1beta1.Nea" - + "restNeighborSearchOperationMetadata.Reco" - + "rdError.RecordErrorType\022\025\n\rerror_message" - + "\030\002 \001(\t\022\026\n\016source_gcs_uri\030\003 \001(\t\022\024\n\014embedd" - + "ing_id\030\004 \001(\t\022\022\n\nraw_record\030\005 \001(\t\"\325\001\n\017Rec" - + "ordErrorType\022\032\n\026ERROR_TYPE_UNSPECIFIED\020\000" - + "\022\016\n\nEMPTY_LINE\020\001\022\027\n\023INVALID_JSON_SYNTAX\020" - + "\002\022\026\n\022INVALID_CSV_SYNTAX\020\003\022\027\n\023INVALID_AVR" - + "O_SYNTAX\020\004\022\030\n\024INVALID_EMBEDDING_ID\020\005\022\033\n\027" - + "EMBEDDING_SIZE_MISMATCH\020\006\022\025\n\021NAMESPACE_M" - + "ISSING\020\007\032\327\001\n\026ContentValidationStats\022\026\n\016s" - + "ource_gcs_uri\030\001 \001(\t\022\032\n\022valid_record_coun" - + "t\030\002 \001(\003\022\034\n\024invalid_record_count\030\003 \001(\003\022k\n" - + "\016partial_errors\030\004 \003(\0132S.google.cloud.aip" - + "latform.v1beta1.NearestNeighborSearchOpe" - + "rationMetadata.RecordError2\337\010\n\014IndexServ" - + "ice\022\331\001\n\013CreateIndex\0223.google.cloud.aipla" - + "tform.v1beta1.CreateIndexRequest\032\035.googl" - + "e.longrunning.Operation\"v\202\323\344\223\0029\"0/v1beta" - + "1/{parent=projects/*/locations/*}/indexe" - + "s:\005index\332A\014parent,index\312A%\n\005Index\022\034Creat" - + "eIndexOperationMetadata\022\245\001\n\010GetIndex\0220.g" - + "oogle.cloud.aiplatform.v1beta1.GetIndexR" - + "equest\032&.google.cloud.aiplatform.v1beta1" - + ".Index\"?\202\323\344\223\0022\0220/v1beta1/{name=projects/" - + "*/locations/*/indexes/*}\332A\004name\022\273\001\n\013List" - + "Indexes\0223.google.cloud.aiplatform.v1beta" - + "1.ListIndexesRequest\0324.google.cloud.aipl" - + "atform.v1beta1.ListIndexesResponse\"A\202\323\344\223" - + "\0022\0220/v1beta1/{parent=projects/*/location" - + "s/*}/indexes\332A\006parent\022\345\001\n\013UpdateIndex\0223." - + "google.cloud.aiplatform.v1beta1.UpdateIn" - + "dexRequest\032\035.google.longrunning.Operatio" - + "n\"\201\001\202\323\344\223\002?26/v1beta1/{index.name=project" - + "s/*/locations/*/indexes/*}:\005index\332A\021inde" - + "x,update_mask\312A%\n\005Index\022\034UpdateIndexOper" - + "ationMetadata\022\325\001\n\013DeleteIndex\0223.google.c" - + "loud.aiplatform.v1beta1.DeleteIndexReque" - + "st\032\035.google.longrunning.Operation\"r\202\323\344\223\002" - + "2*0/v1beta1/{name=projects/*/locations/*" - + "/indexes/*}\332A\004name\312A0\n\025google.protobuf.E" - + "mpty\022\027DeleteOperationMetadata\032M\312A\031aiplat" - + "form.googleapis.com\322A.https://www.google" - + "apis.com/auth/cloud-platformB\356\001\n#com.goo" - + "gle.cloud.aiplatform.v1beta1B\021IndexServi" - + "ceProtoP\001ZIgoogle.golang.org/genproto/go" - + "ogleapis/cloud/aiplatform/v1beta1;aiplat" - + "form\252\002\037Google.Cloud.AIPlatform.V1Beta1\312\002" - + "\037Google\\Cloud\\AIPlatform\\V1beta1\352\002\"Googl" - + "e::Cloud::AIPlatform::V1beta1b\006proto3" + + "/Index\"\226\001\n\027UpsertDatapointsRequest\0226\n\005in" + + "dex\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatform.googleapis" + + ".com/Index\022C\n\ndatapoints\030\002 \003(\0132/.google." + + "cloud.aiplatform.v1beta1.IndexDatapoint\"" + + "\032\n\030UpsertDatapointsResponse\"h\n\027RemoveDat" + + "apointsRequest\0226\n\005index\030\001 \001(\tB\'\340A\002\372A!\n\037a" + + "iplatform.googleapis.com/Index\022\025\n\rdatapo" + + "int_ids\030\002 \003(\t\"\032\n\030RemoveDatapointsRespons" + + "e\"\331\006\n&NearestNeighborSearchOperationMeta" + + "data\022\200\001\n\030content_validation_stats\030\001 \003(\0132" + + "^.google.cloud.aiplatform.v1beta1.Neares" + + "tNeighborSearchOperationMetadata.Content" + + "ValidationStats\022\030\n\020data_bytes_count\030\002 \001(" + + "\003\032\267\003\n\013RecordError\022w\n\nerror_type\030\001 \001(\0162c." + + "google.cloud.aiplatform.v1beta1.NearestN" + + "eighborSearchOperationMetadata.RecordErr" + + "or.RecordErrorType\022\025\n\rerror_message\030\002 \001(" + + "\t\022\026\n\016source_gcs_uri\030\003 \001(\t\022\024\n\014embedding_i" + + "d\030\004 \001(\t\022\022\n\nraw_record\030\005 \001(\t\"\325\001\n\017RecordEr" + + "rorType\022\032\n\026ERROR_TYPE_UNSPECIFIED\020\000\022\016\n\nE" + + "MPTY_LINE\020\001\022\027\n\023INVALID_JSON_SYNTAX\020\002\022\026\n\022" + + "INVALID_CSV_SYNTAX\020\003\022\027\n\023INVALID_AVRO_SYN" + + "TAX\020\004\022\030\n\024INVALID_EMBEDDING_ID\020\005\022\033\n\027EMBED" + + "DING_SIZE_MISMATCH\020\006\022\025\n\021NAMESPACE_MISSIN" + + "G\020\007\032\327\001\n\026ContentValidationStats\022\026\n\016source" + + "_gcs_uri\030\001 \001(\t\022\032\n\022valid_record_count\030\002 \001" + + "(\003\022\034\n\024invalid_record_count\030\003 \001(\003\022k\n\016part" + + "ial_errors\030\004 \003(\0132S.google.cloud.aiplatfo" + + "rm.v1beta1.NearestNeighborSearchOperatio" + + "nMetadata.RecordError2\221\014\n\014IndexService\022\331" + + "\001\n\013CreateIndex\0223.google.cloud.aiplatform" + + ".v1beta1.CreateIndexRequest\032\035.google.lon" + + "grunning.Operation\"v\202\323\344\223\0029\"0/v1beta1/{pa" + + "rent=projects/*/locations/*}/indexes:\005in" + + "dex\332A\014parent,index\312A%\n\005Index\022\034CreateInde" + + "xOperationMetadata\022\245\001\n\010GetIndex\0220.google" + + ".cloud.aiplatform.v1beta1.GetIndexReques" + + "t\032&.google.cloud.aiplatform.v1beta1.Inde" + + "x\"?\202\323\344\223\0022\0220/v1beta1/{name=projects/*/loc" + + "ations/*/indexes/*}\332A\004name\022\273\001\n\013ListIndex" + + "es\0223.google.cloud.aiplatform.v1beta1.Lis" + + "tIndexesRequest\0324.google.cloud.aiplatfor" + + "m.v1beta1.ListIndexesResponse\"A\202\323\344\223\0022\0220/" + + "v1beta1/{parent=projects/*/locations/*}/" + + "indexes\332A\006parent\022\345\001\n\013UpdateIndex\0223.googl" + + "e.cloud.aiplatform.v1beta1.UpdateIndexRe" + + "quest\032\035.google.longrunning.Operation\"\201\001\202" + + "\323\344\223\002?26/v1beta1/{index.name=projects/*/l" + + "ocations/*/indexes/*}:\005index\332A\021index,upd" + + "ate_mask\312A%\n\005Index\022\034UpdateIndexOperation" + + "Metadata\022\325\001\n\013DeleteIndex\0223.google.cloud." + + "aiplatform.v1beta1.DeleteIndexRequest\032\035." + + "google.longrunning.Operation\"r\202\323\344\223\0022*0/v" + + "1beta1/{name=projects/*/locations/*/inde" + + "xes/*}\332A\004name\312A0\n\025google.protobuf.Empty\022" + + "\027DeleteOperationMetadata\022\326\001\n\020UpsertDatap" + + "oints\0228.google.cloud.aiplatform.v1beta1." + + "UpsertDatapointsRequest\0329.google.cloud.a" + + "iplatform.v1beta1.UpsertDatapointsRespon" + + "se\"M\202\323\344\223\002G\"B/v1beta1/{index=projects/*/l" + + "ocations/*/indexes/*}:upsertDatapoints:\001" + + "*\022\326\001\n\020RemoveDatapoints\0228.google.cloud.ai" + + "platform.v1beta1.RemoveDatapointsRequest" + + "\0329.google.cloud.aiplatform.v1beta1.Remov" + + "eDatapointsResponse\"M\202\323\344\223\002G\"B/v1beta1/{i" + + "ndex=projects/*/locations/*/indexes/*}:r" + + "emoveDatapoints:\001*\032M\312A\031aiplatform.google" + + "apis.com\322A.https://www.googleapis.com/au" + + "th/cloud-platformB\356\001\n#com.google.cloud.a" + + "iplatform.v1beta1B\021IndexServiceProtoP\001ZI" + + "google.golang.org/genproto/googleapis/cl" + + "oud/aiplatform/v1beta1;aiplatform\252\002\037Goog" + + "le.Cloud.AIPlatform.V1Beta1\312\002\037Google\\Clo" + + "ud\\AIPlatform\\V1beta1\352\002\"Google::Cloud::A" + + "IPlatform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -253,8 +288,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); - internal_static_google_cloud_aiplatform_v1beta1_NearestNeighborSearchOperationMetadata_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsRequest_descriptor = getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsRequest_descriptor, + new java.lang.String[] { + "Index", "Datapoints", + }); + internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsRequest_descriptor, + new java.lang.String[] { + "Index", "DatapointIds", + }); + internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_aiplatform_v1beta1_NearestNeighborSearchOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_aiplatform_v1beta1_NearestNeighborSearchOperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_NearestNeighborSearchOperationMetadata_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexStats.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexStats.java new file mode 100644 index 00000000000..f2b14b52fe0 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexStats.java @@ -0,0 +1,636 @@ +/* + * 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/index.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Stats of the Index.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexStats} + */ +public final class IndexStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.IndexStats) + IndexStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use IndexStats.newBuilder() to construct. + private IndexStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IndexStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IndexStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IndexStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + vectorsCount_ = input.readInt64(); + break; + } + case 16: + { + shardsCount_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.IndexStats.class, + com.google.cloud.aiplatform.v1beta1.IndexStats.Builder.class); + } + + public static final int VECTORS_COUNT_FIELD_NUMBER = 1; + private long vectorsCount_; + /** + * + * + *
+   * Output only. The number of vectors in the Index.
+   * 
+ * + * int64 vectors_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vectorsCount. + */ + @java.lang.Override + public long getVectorsCount() { + return vectorsCount_; + } + + public static final int SHARDS_COUNT_FIELD_NUMBER = 2; + private int shardsCount_; + /** + * + * + *
+   * Output only. The number of shards in the Index.
+   * 
+ * + * int32 shards_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The shardsCount. + */ + @java.lang.Override + public int getShardsCount() { + return shardsCount_; + } + + 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 (vectorsCount_ != 0L) { + output.writeInt64(1, vectorsCount_); + } + if (shardsCount_ != 0) { + output.writeInt32(2, shardsCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (vectorsCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, vectorsCount_); + } + if (shardsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, shardsCount_); + } + 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.IndexStats)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.IndexStats other = + (com.google.cloud.aiplatform.v1beta1.IndexStats) obj; + + if (getVectorsCount() != other.getVectorsCount()) return false; + if (getShardsCount() != other.getShardsCount()) 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) + VECTORS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getVectorsCount()); + hash = (37 * hash) + SHARDS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getShardsCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.IndexStats parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexStats 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.IndexStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexStats 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.IndexStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexStats 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.IndexStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexStats 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.IndexStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexStats 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.IndexStats 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.IndexStats 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.IndexStats 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; + } + /** + * + * + *
+   * Stats of the Index.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.IndexStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.IndexStats) + com.google.cloud.aiplatform.v1beta1.IndexStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.IndexStats.class, + com.google.cloud.aiplatform.v1beta1.IndexStats.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.IndexStats.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(); + vectorsCount_ = 0L; + + shardsCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.IndexProto + .internal_static_google_cloud_aiplatform_v1beta1_IndexStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexStats getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.IndexStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexStats build() { + com.google.cloud.aiplatform.v1beta1.IndexStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexStats buildPartial() { + com.google.cloud.aiplatform.v1beta1.IndexStats result = + new com.google.cloud.aiplatform.v1beta1.IndexStats(this); + result.vectorsCount_ = vectorsCount_; + result.shardsCount_ = shardsCount_; + 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.IndexStats) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.IndexStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.IndexStats other) { + if (other == com.google.cloud.aiplatform.v1beta1.IndexStats.getDefaultInstance()) return this; + if (other.getVectorsCount() != 0L) { + setVectorsCount(other.getVectorsCount()); + } + if (other.getShardsCount() != 0) { + setShardsCount(other.getShardsCount()); + } + 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.IndexStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.aiplatform.v1beta1.IndexStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long vectorsCount_; + /** + * + * + *
+     * Output only. The number of vectors in the Index.
+     * 
+ * + * int64 vectors_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vectorsCount. + */ + @java.lang.Override + public long getVectorsCount() { + return vectorsCount_; + } + /** + * + * + *
+     * Output only. The number of vectors in the Index.
+     * 
+ * + * int64 vectors_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The vectorsCount to set. + * @return This builder for chaining. + */ + public Builder setVectorsCount(long value) { + + vectorsCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of vectors in the Index.
+     * 
+ * + * int64 vectors_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVectorsCount() { + + vectorsCount_ = 0L; + onChanged(); + return this; + } + + private int shardsCount_; + /** + * + * + *
+     * Output only. The number of shards in the Index.
+     * 
+ * + * int32 shards_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The shardsCount. + */ + @java.lang.Override + public int getShardsCount() { + return shardsCount_; + } + /** + * + * + *
+     * Output only. The number of shards in the Index.
+     * 
+ * + * int32 shards_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The shardsCount to set. + * @return This builder for chaining. + */ + public Builder setShardsCount(int value) { + + shardsCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of shards in the Index.
+     * 
+ * + * int32 shards_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearShardsCount() { + + shardsCount_ = 0; + 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.IndexStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.IndexStats) + private static final com.google.cloud.aiplatform.v1beta1.IndexStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.IndexStats(); + } + + public static com.google.cloud.aiplatform.v1beta1.IndexStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IndexStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IndexStats(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.IndexStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexStatsOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexStatsOrBuilder.java new file mode 100644 index 00000000000..b842cf2a6bd --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexStatsOrBuilder.java @@ -0,0 +1,51 @@ +/* + * 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/index.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface IndexStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.IndexStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The number of vectors in the Index.
+   * 
+ * + * int64 vectors_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vectorsCount. + */ + long getVectorsCount(); + + /** + * + * + *
+   * Output only. The number of shards in the Index.
+   * 
+ * + * int32 shards_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The shardsCount. + */ + int getShardsCount(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListSavedQueriesResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListSavedQueriesResponse.java index 4092df21e31..26e3f5f3042 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListSavedQueriesResponse.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListSavedQueriesResponse.java @@ -136,8 +136,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -150,8 +149,7 @@ public java.util.List getSavedQu * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -165,8 +163,7 @@ public java.util.List getSavedQu * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -179,8 +176,7 @@ public int getSavedQueriesCount() { * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -193,8 +189,7 @@ public com.google.cloud.aiplatform.v1beta1.SavedQuery getSavedQueries(int index) * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -654,8 +649,7 @@ private void ensureSavedQueriesIsMutable() { * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -671,8 +665,7 @@ public java.util.List getSavedQu * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -688,8 +681,7 @@ public int getSavedQueriesCount() { * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -705,8 +697,7 @@ public com.google.cloud.aiplatform.v1beta1.SavedQuery getSavedQueries(int index) * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -729,8 +720,7 @@ public Builder setSavedQueries( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -750,8 +740,7 @@ public Builder setSavedQueries( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -773,8 +762,7 @@ public Builder addSavedQueries(com.google.cloud.aiplatform.v1beta1.SavedQuery va * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -797,8 +785,7 @@ public Builder addSavedQueries( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -818,8 +805,7 @@ public Builder addSavedQueries( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -839,8 +825,7 @@ public Builder addSavedQueries( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -860,8 +845,7 @@ public Builder addAllSavedQueries( * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -880,8 +864,7 @@ public Builder clearSavedQueries() { * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -900,8 +883,7 @@ public Builder removeSavedQueries(int index) { * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -914,8 +896,7 @@ public com.google.cloud.aiplatform.v1beta1.SavedQuery.Builder getSavedQueriesBui * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -932,8 +913,7 @@ public com.google.cloud.aiplatform.v1beta1.SavedQueryOrBuilder getSavedQueriesOr * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -950,8 +930,7 @@ public com.google.cloud.aiplatform.v1beta1.SavedQueryOrBuilder getSavedQueriesOr * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -964,8 +943,7 @@ public com.google.cloud.aiplatform.v1beta1.SavedQuery.Builder addSavedQueriesBui * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -979,8 +957,7 @@ public com.google.cloud.aiplatform.v1beta1.SavedQuery.Builder addSavedQueriesBui * * *
-     * A list of SavedQueries that matches the specified filter in the
-     * request.
+     * A list of SavedQueries that match the specified filter in the request.
      * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListSavedQueriesResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListSavedQueriesResponseOrBuilder.java index c64800e44a5..fa4ce94e319 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListSavedQueriesResponseOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListSavedQueriesResponseOrBuilder.java @@ -27,8 +27,7 @@ public interface ListSavedQueriesResponseOrBuilder * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -38,8 +37,7 @@ public interface ListSavedQueriesResponseOrBuilder * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -49,8 +47,7 @@ public interface ListSavedQueriesResponseOrBuilder * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -60,8 +57,7 @@ public interface ListSavedQueriesResponseOrBuilder * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; @@ -72,8 +68,7 @@ public interface ListSavedQueriesResponseOrBuilder * * *
-   * A list of SavedQueries that matches the specified filter in the
-   * request.
+   * A list of SavedQueries that match the specified filter in the request.
    * 
* * repeated .google.cloud.aiplatform.v1beta1.SavedQuery saved_queries = 1; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MergeVersionAliasesRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MergeVersionAliasesRequest.java index 4e4e33d575f..b1fb625f676 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MergeVersionAliasesRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MergeVersionAliasesRequest.java @@ -193,7 +193,7 @@ public com.google.protobuf.ByteString getNameBytes() { *
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -217,7 +217,7 @@ public com.google.protobuf.ProtocolStringList getVersionAliasesList() {
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -241,7 +241,7 @@ public int getVersionAliasesCount() {
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -266,7 +266,7 @@ public java.lang.String getVersionAliases(int index) {
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -785,7 +785,7 @@ private void ensureVersionAliasesIsMutable() {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -809,7 +809,7 @@ public com.google.protobuf.ProtocolStringList getVersionAliasesList() {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -833,7 +833,7 @@ public int getVersionAliasesCount() {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -858,7 +858,7 @@ public java.lang.String getVersionAliases(int index) {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -883,7 +883,7 @@ public com.google.protobuf.ByteString getVersionAliasesBytes(int index) {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -915,7 +915,7 @@ public Builder setVersionAliases(int index, java.lang.String value) {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -946,7 +946,7 @@ public Builder addVersionAliases(java.lang.String value) {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -974,7 +974,7 @@ public Builder addAllVersionAliases(java.lang.Iterable values)
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
@@ -1001,7 +1001,7 @@ public Builder clearVersionAliases() {
      * 
      * Required. The set of version aliases to merge.
      * The alias should be at most 128 characters, and match
-     * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+     * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
      * Add the `-` prefix to an alias means removing that alias from the version.
      * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
      * the `golden` alias from the version.
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MergeVersionAliasesRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MergeVersionAliasesRequestOrBuilder.java
index e5a24d9db0f..26fc8a943ac 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MergeVersionAliasesRequestOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/MergeVersionAliasesRequestOrBuilder.java
@@ -62,7 +62,7 @@ public interface MergeVersionAliasesRequestOrBuilder
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -84,7 +84,7 @@ public interface MergeVersionAliasesRequestOrBuilder
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -106,7 +106,7 @@ public interface MergeVersionAliasesRequestOrBuilder
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
@@ -129,7 +129,7 @@ public interface MergeVersionAliasesRequestOrBuilder
    * 
    * Required. The set of version aliases to merge.
    * The alias should be at most 128 characters, and match
-   * `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
+   * `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
    * Add the `-` prefix to an alias means removing that alias from the version.
    * `-` is NOT counted in the 128 characters. Example: `-golden` means removing
    * the `golden` alias from the version.
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringAlertConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringAlertConfig.java
index 047a3272191..ede4c356a7a 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringAlertConfig.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringAlertConfig.java
@@ -18,15 +18,7 @@
 
 package com.google.cloud.aiplatform.v1beta1;
 
-/**
- *
- *
- * 
- * Next ID: 3
- * 
- * - * Protobuf type {@code google.cloud.aiplatform.v1beta1.ModelMonitoringAlertConfig} - */ +/** Protobuf type {@code google.cloud.aiplatform.v1beta1.ModelMonitoringAlertConfig} */ public final class ModelMonitoringAlertConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ModelMonitoringAlertConfig) @@ -1268,15 +1260,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build Builder builder = new Builder(parent); return builder; } - /** - * - * - *
-   * Next ID: 3
-   * 
- * - * Protobuf type {@code google.cloud.aiplatform.v1beta1.ModelMonitoringAlertConfig} - */ + /** Protobuf type {@code google.cloud.aiplatform.v1beta1.ModelMonitoringAlertConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ModelMonitoringAlertConfig) diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringConfig.java index e036b6a51a1..af7bb26d2c4 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringConfig.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringConfig.java @@ -22,7 +22,7 @@ * * *
- * Next ID: 5
+ * The model monitoring configuration used for Batch Prediction Job.
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.ModelMonitoringConfig} @@ -109,6 +109,23 @@ private ModelMonitoringConfig( java.lang.String s = input.readStringRequireUtf8(); analysisInstanceSchemaUri_ = s; + break; + } + case 42: + { + com.google.cloud.aiplatform.v1beta1.GcsDestination.Builder subBuilder = null; + if (statsAnomaliesBaseDirectory_ != null) { + subBuilder = statsAnomaliesBaseDirectory_.toBuilder(); + } + statsAnomaliesBaseDirectory_ = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.GcsDestination.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(statsAnomaliesBaseDirectory_); + statsAnomaliesBaseDirectory_ = subBuilder.buildPartial(); + } + break; } default: @@ -342,6 +359,67 @@ public com.google.protobuf.ByteString getAnalysisInstanceSchemaUriBytes() { } } + public static final int STATS_ANOMALIES_BASE_DIRECTORY_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1beta1.GcsDestination statsAnomaliesBaseDirectory_; + /** + * + * + *
+   * A Google Cloud Storage location for batch prediction model monitoring to
+   * dump statistics and anomalies.
+   * If not provided, a folder will be created in customer project to hold
+   * statistics and anomalies.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + * + * @return Whether the statsAnomaliesBaseDirectory field is set. + */ + @java.lang.Override + public boolean hasStatsAnomaliesBaseDirectory() { + return statsAnomaliesBaseDirectory_ != null; + } + /** + * + * + *
+   * A Google Cloud Storage location for batch prediction model monitoring to
+   * dump statistics and anomalies.
+   * If not provided, a folder will be created in customer project to hold
+   * statistics and anomalies.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + * + * @return The statsAnomaliesBaseDirectory. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GcsDestination getStatsAnomaliesBaseDirectory() { + return statsAnomaliesBaseDirectory_ == null + ? com.google.cloud.aiplatform.v1beta1.GcsDestination.getDefaultInstance() + : statsAnomaliesBaseDirectory_; + } + /** + * + * + *
+   * A Google Cloud Storage location for batch prediction model monitoring to
+   * dump statistics and anomalies.
+   * If not provided, a folder will be created in customer project to hold
+   * statistics and anomalies.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GcsDestinationOrBuilder + getStatsAnomaliesBaseDirectoryOrBuilder() { + return getStatsAnomaliesBaseDirectory(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -365,6 +443,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(analysisInstanceSchemaUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, analysisInstanceSchemaUri_); } + if (statsAnomaliesBaseDirectory_ != null) { + output.writeMessage(5, getStatsAnomaliesBaseDirectory()); + } unknownFields.writeTo(output); } @@ -384,6 +465,11 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, analysisInstanceSchemaUri_); } + if (statsAnomaliesBaseDirectory_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getStatsAnomaliesBaseDirectory()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -406,6 +492,11 @@ public boolean equals(final java.lang.Object obj) { if (!getAlertConfig().equals(other.getAlertConfig())) return false; } if (!getAnalysisInstanceSchemaUri().equals(other.getAnalysisInstanceSchemaUri())) return false; + if (hasStatsAnomaliesBaseDirectory() != other.hasStatsAnomaliesBaseDirectory()) return false; + if (hasStatsAnomaliesBaseDirectory()) { + if (!getStatsAnomaliesBaseDirectory().equals(other.getStatsAnomaliesBaseDirectory())) + return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -427,6 +518,10 @@ public int hashCode() { } hash = (37 * hash) + ANALYSIS_INSTANCE_SCHEMA_URI_FIELD_NUMBER; hash = (53 * hash) + getAnalysisInstanceSchemaUri().hashCode(); + if (hasStatsAnomaliesBaseDirectory()) { + hash = (37 * hash) + STATS_ANOMALIES_BASE_DIRECTORY_FIELD_NUMBER; + hash = (53 * hash) + getStatsAnomaliesBaseDirectory().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -532,7 +627,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Next ID: 5
+   * The model monitoring configuration used for Batch Prediction Job.
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.ModelMonitoringConfig} @@ -589,6 +684,12 @@ public Builder clear() { } analysisInstanceSchemaUri_ = ""; + if (statsAnomaliesBaseDirectoryBuilder_ == null) { + statsAnomaliesBaseDirectory_ = null; + } else { + statsAnomaliesBaseDirectory_ = null; + statsAnomaliesBaseDirectoryBuilder_ = null; + } return this; } @@ -632,6 +733,11 @@ public com.google.cloud.aiplatform.v1beta1.ModelMonitoringConfig buildPartial() result.alertConfig_ = alertConfigBuilder_.build(); } result.analysisInstanceSchemaUri_ = analysisInstanceSchemaUri_; + if (statsAnomaliesBaseDirectoryBuilder_ == null) { + result.statsAnomaliesBaseDirectory_ = statsAnomaliesBaseDirectory_; + } else { + result.statsAnomaliesBaseDirectory_ = statsAnomaliesBaseDirectoryBuilder_.build(); + } onBuilt(); return result; } @@ -716,6 +822,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ModelMonitoringConf analysisInstanceSchemaUri_ = other.analysisInstanceSchemaUri_; onChanged(); } + if (other.hasStatsAnomaliesBaseDirectory()) { + mergeStatsAnomaliesBaseDirectory(other.getStatsAnomaliesBaseDirectory()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1485,6 +1594,233 @@ public Builder setAnalysisInstanceSchemaUriBytes(com.google.protobuf.ByteString return this; } + private com.google.cloud.aiplatform.v1beta1.GcsDestination statsAnomaliesBaseDirectory_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GcsDestination, + com.google.cloud.aiplatform.v1beta1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1beta1.GcsDestinationOrBuilder> + statsAnomaliesBaseDirectoryBuilder_; + /** + * + * + *
+     * A Google Cloud Storage location for batch prediction model monitoring to
+     * dump statistics and anomalies.
+     * If not provided, a folder will be created in customer project to hold
+     * statistics and anomalies.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + * + * @return Whether the statsAnomaliesBaseDirectory field is set. + */ + public boolean hasStatsAnomaliesBaseDirectory() { + return statsAnomaliesBaseDirectoryBuilder_ != null || statsAnomaliesBaseDirectory_ != null; + } + /** + * + * + *
+     * A Google Cloud Storage location for batch prediction model monitoring to
+     * dump statistics and anomalies.
+     * If not provided, a folder will be created in customer project to hold
+     * statistics and anomalies.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + * + * @return The statsAnomaliesBaseDirectory. + */ + public com.google.cloud.aiplatform.v1beta1.GcsDestination getStatsAnomaliesBaseDirectory() { + if (statsAnomaliesBaseDirectoryBuilder_ == null) { + return statsAnomaliesBaseDirectory_ == null + ? com.google.cloud.aiplatform.v1beta1.GcsDestination.getDefaultInstance() + : statsAnomaliesBaseDirectory_; + } else { + return statsAnomaliesBaseDirectoryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A Google Cloud Storage location for batch prediction model monitoring to
+     * dump statistics and anomalies.
+     * If not provided, a folder will be created in customer project to hold
+     * statistics and anomalies.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + */ + public Builder setStatsAnomaliesBaseDirectory( + com.google.cloud.aiplatform.v1beta1.GcsDestination value) { + if (statsAnomaliesBaseDirectoryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + statsAnomaliesBaseDirectory_ = value; + onChanged(); + } else { + statsAnomaliesBaseDirectoryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * A Google Cloud Storage location for batch prediction model monitoring to
+     * dump statistics and anomalies.
+     * If not provided, a folder will be created in customer project to hold
+     * statistics and anomalies.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + */ + public Builder setStatsAnomaliesBaseDirectory( + com.google.cloud.aiplatform.v1beta1.GcsDestination.Builder builderForValue) { + if (statsAnomaliesBaseDirectoryBuilder_ == null) { + statsAnomaliesBaseDirectory_ = builderForValue.build(); + onChanged(); + } else { + statsAnomaliesBaseDirectoryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * A Google Cloud Storage location for batch prediction model monitoring to
+     * dump statistics and anomalies.
+     * If not provided, a folder will be created in customer project to hold
+     * statistics and anomalies.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + */ + public Builder mergeStatsAnomaliesBaseDirectory( + com.google.cloud.aiplatform.v1beta1.GcsDestination value) { + if (statsAnomaliesBaseDirectoryBuilder_ == null) { + if (statsAnomaliesBaseDirectory_ != null) { + statsAnomaliesBaseDirectory_ = + com.google.cloud.aiplatform.v1beta1.GcsDestination.newBuilder( + statsAnomaliesBaseDirectory_) + .mergeFrom(value) + .buildPartial(); + } else { + statsAnomaliesBaseDirectory_ = value; + } + onChanged(); + } else { + statsAnomaliesBaseDirectoryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * A Google Cloud Storage location for batch prediction model monitoring to
+     * dump statistics and anomalies.
+     * If not provided, a folder will be created in customer project to hold
+     * statistics and anomalies.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + */ + public Builder clearStatsAnomaliesBaseDirectory() { + if (statsAnomaliesBaseDirectoryBuilder_ == null) { + statsAnomaliesBaseDirectory_ = null; + onChanged(); + } else { + statsAnomaliesBaseDirectory_ = null; + statsAnomaliesBaseDirectoryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * A Google Cloud Storage location for batch prediction model monitoring to
+     * dump statistics and anomalies.
+     * If not provided, a folder will be created in customer project to hold
+     * statistics and anomalies.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + */ + public com.google.cloud.aiplatform.v1beta1.GcsDestination.Builder + getStatsAnomaliesBaseDirectoryBuilder() { + + onChanged(); + return getStatsAnomaliesBaseDirectoryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A Google Cloud Storage location for batch prediction model monitoring to
+     * dump statistics and anomalies.
+     * If not provided, a folder will be created in customer project to hold
+     * statistics and anomalies.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + */ + public com.google.cloud.aiplatform.v1beta1.GcsDestinationOrBuilder + getStatsAnomaliesBaseDirectoryOrBuilder() { + if (statsAnomaliesBaseDirectoryBuilder_ != null) { + return statsAnomaliesBaseDirectoryBuilder_.getMessageOrBuilder(); + } else { + return statsAnomaliesBaseDirectory_ == null + ? com.google.cloud.aiplatform.v1beta1.GcsDestination.getDefaultInstance() + : statsAnomaliesBaseDirectory_; + } + } + /** + * + * + *
+     * A Google Cloud Storage location for batch prediction model monitoring to
+     * dump statistics and anomalies.
+     * If not provided, a folder will be created in customer project to hold
+     * statistics and anomalies.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GcsDestination, + com.google.cloud.aiplatform.v1beta1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1beta1.GcsDestinationOrBuilder> + getStatsAnomaliesBaseDirectoryFieldBuilder() { + if (statsAnomaliesBaseDirectoryBuilder_ == null) { + statsAnomaliesBaseDirectoryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.GcsDestination, + com.google.cloud.aiplatform.v1beta1.GcsDestination.Builder, + com.google.cloud.aiplatform.v1beta1.GcsDestinationOrBuilder>( + getStatsAnomaliesBaseDirectory(), getParentForChildren(), isClean()); + statsAnomaliesBaseDirectory_ = null; + } + return statsAnomaliesBaseDirectoryBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringConfigOrBuilder.java index ce257681d14..7a398c6d5ba 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringConfigOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringConfigOrBuilder.java @@ -157,4 +157,52 @@ public interface ModelMonitoringConfigOrBuilder * @return The bytes for analysisInstanceSchemaUri. */ com.google.protobuf.ByteString getAnalysisInstanceSchemaUriBytes(); + + /** + * + * + *
+   * A Google Cloud Storage location for batch prediction model monitoring to
+   * dump statistics and anomalies.
+   * If not provided, a folder will be created in customer project to hold
+   * statistics and anomalies.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + * + * @return Whether the statsAnomaliesBaseDirectory field is set. + */ + boolean hasStatsAnomaliesBaseDirectory(); + /** + * + * + *
+   * A Google Cloud Storage location for batch prediction model monitoring to
+   * dump statistics and anomalies.
+   * If not provided, a folder will be created in customer project to hold
+   * statistics and anomalies.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + * + * @return The statsAnomaliesBaseDirectory. + */ + com.google.cloud.aiplatform.v1beta1.GcsDestination getStatsAnomaliesBaseDirectory(); + /** + * + * + *
+   * A Google Cloud Storage location for batch prediction model monitoring to
+   * dump statistics and anomalies.
+   * If not provided, a folder will be created in customer project to hold
+   * statistics and anomalies.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GcsDestination stats_anomalies_base_directory = 5; + * + */ + com.google.cloud.aiplatform.v1beta1.GcsDestinationOrBuilder + getStatsAnomaliesBaseDirectoryOrBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringObjectiveConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringObjectiveConfig.java index b83bd2702a3..0840452693c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringObjectiveConfig.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringObjectiveConfig.java @@ -22,7 +22,8 @@ * * *
- * Next ID: 8
+ * The objective configuration for model monitoring, including the information
+ * needed to detect anomalies for one particular model.
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.ModelMonitoringObjectiveConfig} @@ -6587,8 +6588,10 @@ public interface ExplanationBaselineOrBuilder * * *
-     * Output from [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob] for Model Monitoring baseline dataset,
-     * which can be used to generate baseline attribution scores.
+     * Output from
+     * [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob]
+     * for Model Monitoring baseline dataset, which can be used to generate
+     * baseline attribution scores.
      * 
* * Protobuf type {@code @@ -7326,8 +7329,10 @@ protected Builder newBuilderForType( * * *
-       * Output from [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob] for Model Monitoring baseline dataset,
-       * which can be used to generate baseline attribution scores.
+       * Output from
+       * [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob]
+       * for Model Monitoring baseline dataset, which can be used to generate
+       * baseline attribution scores.
        * 
* * Protobuf type {@code @@ -9450,7 +9455,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Next ID: 8
+   * The objective configuration for model monitoring, including the information
+   * needed to detect anomalies for one particular model.
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.ModelMonitoringObjectiveConfig} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringProto.java index 3c71879a4f2..a3f4658fd15 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelMonitoringProto.java @@ -103,102 +103,104 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n6google/cloud/aiplatform/v1beta1/model_" + "monitoring.proto\022\037google.cloud.aiplatfor" + "m.v1beta1\032\031google/api/resource.proto\032(go" - + "ogle/cloud/aiplatform/v1beta1/io.proto\"\354" - + "\001\n\025ModelMonitoringConfig\022Z\n\021objective_co" + + "ogle/cloud/aiplatform/v1beta1/io.proto\"\305" + + "\002\n\025ModelMonitoringConfig\022Z\n\021objective_co" + "nfigs\030\003 \003(\0132?.google.cloud.aiplatform.v1" + "beta1.ModelMonitoringObjectiveConfig\022Q\n\014" + "alert_config\030\002 \001(\0132;.google.cloud.aiplat" + "form.v1beta1.ModelMonitoringAlertConfig\022" - + "$\n\034analysis_instance_schema_uri\030\004 \001(\t\"\252\026" - + "\n\036ModelMonitoringObjectiveConfig\022i\n\020trai" - + "ning_dataset\030\001 \001(\0132O.google.cloud.aiplat" - + "form.v1beta1.ModelMonitoringObjectiveCon" - + "fig.TrainingDataset\022\230\001\n)training_predict" - + "ion_skew_detection_config\030\002 \001(\0132e.google" + + "$\n\034analysis_instance_schema_uri\030\004 \001(\t\022W\n" + + "\036stats_anomalies_base_directory\030\005 \001(\0132/." + + "google.cloud.aiplatform.v1beta1.GcsDesti" + + "nation\"\252\026\n\036ModelMonitoringObjectiveConfi" + + "g\022i\n\020training_dataset\030\001 \001(\0132O.google.clo" + + "ud.aiplatform.v1beta1.ModelMonitoringObj" + + "ectiveConfig.TrainingDataset\022\230\001\n)trainin" + + "g_prediction_skew_detection_config\030\002 \001(\013" + + "2e.google.cloud.aiplatform.v1beta1.Model" + + "MonitoringObjectiveConfig.TrainingPredic" + + "tionSkewDetectionConfig\022\211\001\n!prediction_d" + + "rift_detection_config\030\003 \001(\0132^.google.clo" + + "ud.aiplatform.v1beta1.ModelMonitoringObj" + + "ectiveConfig.PredictionDriftDetectionCon" + + "fig\022m\n\022explanation_config\030\005 \001(\0132Q.google" + ".cloud.aiplatform.v1beta1.ModelMonitorin" - + "gObjectiveConfig.TrainingPredictionSkewD" - + "etectionConfig\022\211\001\n!prediction_drift_dete" - + "ction_config\030\003 \001(\0132^.google.cloud.aiplat" - + "form.v1beta1.ModelMonitoringObjectiveCon" - + "fig.PredictionDriftDetectionConfig\022m\n\022ex" - + "planation_config\030\005 \001(\0132Q.google.cloud.ai" - + "platform.v1beta1.ModelMonitoringObjectiv" - + "eConfig.ExplanationConfig\032\352\002\n\017TrainingDa" - + "taset\0229\n\007dataset\030\003 \001(\tB&\372A#\n!aiplatform." - + "googleapis.com/DatasetH\000\022@\n\ngcs_source\030\004" - + " \001(\0132*.google.cloud.aiplatform.v1beta1.G" - + "csSourceH\000\022J\n\017bigquery_source\030\005 \001(\0132/.go" - + "ogle.cloud.aiplatform.v1beta1.BigQuerySo" - + "urceH\000\022\023\n\013data_format\030\002 \001(\t\022\024\n\014target_fi" - + "eld\030\006 \001(\t\022T\n\031logging_sampling_strategy\030\007" - + " \001(\01321.google.cloud.aiplatform.v1beta1.S" - + "amplingStrategyB\r\n\013data_source\032\250\005\n%Train" - + "ingPredictionSkewDetectionConfig\022\222\001\n\017ske" - + "w_thresholds\030\001 \003(\0132y.google.cloud.aiplat" - + "form.v1beta1.ModelMonitoringObjectiveCon" - + "fig.TrainingPredictionSkewDetectionConfi" - + "g.SkewThresholdsEntry\022\265\001\n!attribution_sc" - + "ore_skew_thresholds\030\002 \003(\0132\211\001.google.clou" - + "d.aiplatform.v1beta1.ModelMonitoringObje" - + "ctiveConfig.TrainingPredictionSkewDetect" - + "ionConfig.AttributionScoreSkewThresholds" - + "Entry\022P\n\026default_skew_threshold\030\006 \001(\01320." - + "google.cloud.aiplatform.v1beta1.Threshol" - + "dConfig\032g\n\023SkewThresholdsEntry\022\013\n\003key\030\001 " - + "\001(\t\022?\n\005value\030\002 \001(\01320.google.cloud.aiplat" - + "form.v1beta1.ThresholdConfig:\0028\001\032w\n#Attr" - + "ibutionScoreSkewThresholdsEntry\022\013\n\003key\030\001" - + " \001(\t\022?\n\005value\030\002 \001(\01320.google.cloud.aipla" - + "tform.v1beta1.ThresholdConfig:\0028\001\032\232\005\n\036Pr" - + "edictionDriftDetectionConfig\022\215\001\n\020drift_t" - + "hresholds\030\001 \003(\0132s.google.cloud.aiplatfor" - + "m.v1beta1.ModelMonitoringObjectiveConfig" - + ".PredictionDriftDetectionConfig.DriftThr" - + "esholdsEntry\022\260\001\n\"attribution_score_drift" - + "_thresholds\030\002 \003(\0132\203\001.google.cloud.aiplat" - + "form.v1beta1.ModelMonitoringObjectiveCon" - + "fig.PredictionDriftDetectionConfig.Attri" - + "butionScoreDriftThresholdsEntry\022Q\n\027defau" - + "lt_drift_threshold\030\005 \001(\01320.google.cloud." - + "aiplatform.v1beta1.ThresholdConfig\032h\n\024Dr" - + "iftThresholdsEntry\022\013\n\003key\030\001 \001(\t\022?\n\005value" - + "\030\002 \001(\01320.google.cloud.aiplatform.v1beta1" - + ".ThresholdConfig:\0028\001\032x\n$AttributionScore" - + "DriftThresholdsEntry\022\013\n\003key\030\001 \001(\t\022?\n\005val" - + "ue\030\002 \001(\01320.google.cloud.aiplatform.v1bet" - + "a1.ThresholdConfig:\0028\001\032\321\004\n\021ExplanationCo" - + "nfig\022!\n\031enable_feature_attributes\030\001 \001(\010\022" - + "\203\001\n\024explanation_baseline\030\002 \001(\0132e.google." - + "cloud.aiplatform.v1beta1.ModelMonitoring" - + "ObjectiveConfig.ExplanationConfig.Explan" - + "ationBaseline\032\222\003\n\023ExplanationBaseline\022>\n" - + "\003gcs\030\002 \001(\0132/.google.cloud.aiplatform.v1b" - + "eta1.GcsDestinationH\000\022H\n\010bigquery\030\003 \001(\0132" - + "4.google.cloud.aiplatform.v1beta1.BigQue" - + "ryDestinationH\000\022\221\001\n\021prediction_format\030\001 " - + "\001(\0162v.google.cloud.aiplatform.v1beta1.Mo" - + "delMonitoringObjectiveConfig.Explanation" - + "Config.ExplanationBaseline.PredictionFor" - + "mat\"N\n\020PredictionFormat\022!\n\035PREDICTION_FO" - + "RMAT_UNSPECIFIED\020\000\022\t\n\005JSONL\020\002\022\014\n\010BIGQUER" - + "Y\020\003B\r\n\013destination\"\322\001\n\032ModelMonitoringAl" - + "ertConfig\022j\n\022email_alert_config\030\001 \001(\0132L." - + "google.cloud.aiplatform.v1beta1.ModelMon" - + "itoringAlertConfig.EmailAlertConfigH\000\022\026\n" - + "\016enable_logging\030\002 \001(\010\032\'\n\020EmailAlertConfi" - + "g\022\023\n\013user_emails\030\001 \003(\tB\007\n\005alert\"/\n\017Thres" - + "holdConfig\022\017\n\005value\030\001 \001(\001H\000B\013\n\tthreshold" - + "\"\241\001\n\020SamplingStrategy\022b\n\024random_sample_c" - + "onfig\030\001 \001(\0132D.google.cloud.aiplatform.v1" - + "beta1.SamplingStrategy.RandomSampleConfi" - + "g\032)\n\022RandomSampleConfig\022\023\n\013sample_rate\030\001" - + " \001(\001B\361\001\n#com.google.cloud.aiplatform.v1b" - + "eta1B\024ModelMonitoringProtoP\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" + + "gObjectiveConfig.ExplanationConfig\032\352\002\n\017T" + + "rainingDataset\0229\n\007dataset\030\003 \001(\tB&\372A#\n!ai" + + "platform.googleapis.com/DatasetH\000\022@\n\ngcs" + + "_source\030\004 \001(\0132*.google.cloud.aiplatform." + + "v1beta1.GcsSourceH\000\022J\n\017bigquery_source\030\005" + + " \001(\0132/.google.cloud.aiplatform.v1beta1.B" + + "igQuerySourceH\000\022\023\n\013data_format\030\002 \001(\t\022\024\n\014" + + "target_field\030\006 \001(\t\022T\n\031logging_sampling_s" + + "trategy\030\007 \001(\01321.google.cloud.aiplatform." + + "v1beta1.SamplingStrategyB\r\n\013data_source\032" + + "\250\005\n%TrainingPredictionSkewDetectionConfi" + + "g\022\222\001\n\017skew_thresholds\030\001 \003(\0132y.google.clo" + + "ud.aiplatform.v1beta1.ModelMonitoringObj" + + "ectiveConfig.TrainingPredictionSkewDetec" + + "tionConfig.SkewThresholdsEntry\022\265\001\n!attri" + + "bution_score_skew_thresholds\030\002 \003(\0132\211\001.go" + + "ogle.cloud.aiplatform.v1beta1.ModelMonit" + + "oringObjectiveConfig.TrainingPredictionS" + + "kewDetectionConfig.AttributionScoreSkewT" + + "hresholdsEntry\022P\n\026default_skew_threshold" + + "\030\006 \001(\01320.google.cloud.aiplatform.v1beta1" + + ".ThresholdConfig\032g\n\023SkewThresholdsEntry\022" + + "\013\n\003key\030\001 \001(\t\022?\n\005value\030\002 \001(\01320.google.clo" + + "ud.aiplatform.v1beta1.ThresholdConfig:\0028" + + "\001\032w\n#AttributionScoreSkewThresholdsEntry" + + "\022\013\n\003key\030\001 \001(\t\022?\n\005value\030\002 \001(\01320.google.cl" + + "oud.aiplatform.v1beta1.ThresholdConfig:\002" + + "8\001\032\232\005\n\036PredictionDriftDetectionConfig\022\215\001" + + "\n\020drift_thresholds\030\001 \003(\0132s.google.cloud." + + "aiplatform.v1beta1.ModelMonitoringObject" + + "iveConfig.PredictionDriftDetectionConfig" + + ".DriftThresholdsEntry\022\260\001\n\"attribution_sc" + + "ore_drift_thresholds\030\002 \003(\0132\203\001.google.clo" + + "ud.aiplatform.v1beta1.ModelMonitoringObj" + + "ectiveConfig.PredictionDriftDetectionCon" + + "fig.AttributionScoreDriftThresholdsEntry" + + "\022Q\n\027default_drift_threshold\030\005 \001(\01320.goog" + + "le.cloud.aiplatform.v1beta1.ThresholdCon" + + "fig\032h\n\024DriftThresholdsEntry\022\013\n\003key\030\001 \001(\t" + + "\022?\n\005value\030\002 \001(\01320.google.cloud.aiplatfor" + + "m.v1beta1.ThresholdConfig:\0028\001\032x\n$Attribu" + + "tionScoreDriftThresholdsEntry\022\013\n\003key\030\001 \001" + + "(\t\022?\n\005value\030\002 \001(\01320.google.cloud.aiplatf" + + "orm.v1beta1.ThresholdConfig:\0028\001\032\321\004\n\021Expl" + + "anationConfig\022!\n\031enable_feature_attribut" + + "es\030\001 \001(\010\022\203\001\n\024explanation_baseline\030\002 \001(\0132" + + "e.google.cloud.aiplatform.v1beta1.ModelM" + + "onitoringObjectiveConfig.ExplanationConf" + + "ig.ExplanationBaseline\032\222\003\n\023ExplanationBa" + + "seline\022>\n\003gcs\030\002 \001(\0132/.google.cloud.aipla" + + "tform.v1beta1.GcsDestinationH\000\022H\n\010bigque" + + "ry\030\003 \001(\01324.google.cloud.aiplatform.v1bet" + + "a1.BigQueryDestinationH\000\022\221\001\n\021prediction_" + + "format\030\001 \001(\0162v.google.cloud.aiplatform.v" + + "1beta1.ModelMonitoringObjectiveConfig.Ex" + + "planationConfig.ExplanationBaseline.Pred" + + "ictionFormat\"N\n\020PredictionFormat\022!\n\035PRED" + + "ICTION_FORMAT_UNSPECIFIED\020\000\022\t\n\005JSONL\020\002\022\014" + + "\n\010BIGQUERY\020\003B\r\n\013destination\"\322\001\n\032ModelMon" + + "itoringAlertConfig\022j\n\022email_alert_config" + + "\030\001 \001(\0132L.google.cloud.aiplatform.v1beta1" + + ".ModelMonitoringAlertConfig.EmailAlertCo" + + "nfigH\000\022\026\n\016enable_logging\030\002 \001(\010\032\'\n\020EmailA" + + "lertConfig\022\023\n\013user_emails\030\001 \003(\tB\007\n\005alert" + + "\"/\n\017ThresholdConfig\022\017\n\005value\030\001 \001(\001H\000B\013\n\t" + + "threshold\"\241\001\n\020SamplingStrategy\022b\n\024random" + + "_sample_config\030\001 \001(\0132D.google.cloud.aipl" + + "atform.v1beta1.SamplingStrategy.RandomSa" + + "mpleConfig\032)\n\022RandomSampleConfig\022\023\n\013samp" + + "le_rate\030\001 \001(\001B\361\001\n#com.google.cloud.aipla" + + "tform.v1beta1B\024ModelMonitoringProtoP\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( @@ -213,7 +215,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ModelMonitoringConfig_descriptor, new java.lang.String[] { - "ObjectiveConfigs", "AlertConfig", "AnalysisInstanceSchemaUri", + "ObjectiveConfigs", + "AlertConfig", + "AnalysisInstanceSchemaUri", + "StatsAnomaliesBaseDirectory", }); internal_static_google_cloud_aiplatform_v1beta1_ModelMonitoringObjectiveConfig_descriptor = getDescriptor().getMessageTypes().get(1); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveDatapointsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveDatapointsRequest.java new file mode 100644 index 00000000000..37d7fe216d6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveDatapointsRequest.java @@ -0,0 +1,947 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1beta1.IndexService.RemoveDatapoints]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest} + */ +public final class RemoveDatapointsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest) + RemoveDatapointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveDatapointsRequest.newBuilder() to construct. + private RemoveDatapointsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveDatapointsRequest() { + index_ = ""; + datapointIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveDatapointsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RemoveDatapointsRequest( + 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(); + + index_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + datapointIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + datapointIds_.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)) { + datapointIds_ = datapointIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest.class, + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest.Builder.class); + } + + public static final int INDEX_FIELD_NUMBER = 1; + private volatile java.lang.Object index_; + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + @java.lang.Override + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATAPOINT_IDS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList datapointIds_; + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @return A list containing the datapointIds. + */ + public com.google.protobuf.ProtocolStringList getDatapointIdsList() { + return datapointIds_; + } + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @return The count of datapointIds. + */ + public int getDatapointIdsCount() { + return datapointIds_.size(); + } + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index of the element to return. + * @return The datapointIds at the given index. + */ + public java.lang.String getDatapointIds(int index) { + return datapointIds_.get(index); + } + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the datapointIds at the given index. + */ + public com.google.protobuf.ByteString getDatapointIdsBytes(int index) { + return datapointIds_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(index_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, index_); + } + for (int i = 0; i < datapointIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, datapointIds_.getRaw(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(index_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, index_); + } + { + int dataSize = 0; + for (int i = 0; i < datapointIds_.size(); i++) { + dataSize += computeStringSizeNoTag(datapointIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getDatapointIdsList().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.RemoveDatapointsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest other = + (com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest) obj; + + if (!getIndex().equals(other.getIndex())) return false; + if (!getDatapointIdsList().equals(other.getDatapointIdsList())) 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) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + if (getDatapointIdsCount() > 0) { + hash = (37 * hash) + DATAPOINT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDatapointIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest 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.RemoveDatapointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest 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.RemoveDatapointsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest 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.RemoveDatapointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest 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.RemoveDatapointsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest 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.RemoveDatapointsRequest 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.RemoveDatapointsRequest 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.RemoveDatapointsRequest 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 [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1beta1.IndexService.RemoveDatapoints]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest) + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest.class, + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest.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(); + index_ = ""; + + datapointIds_ = 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.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest build() { + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest result = + new com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest(this); + int from_bitField0_ = bitField0_; + result.index_ = index_; + if (((bitField0_ & 0x00000001) != 0)) { + datapointIds_ = datapointIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.datapointIds_ = datapointIds_; + 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.RemoveDatapointsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest.getDefaultInstance()) + return this; + if (!other.getIndex().isEmpty()) { + index_ = other.index_; + onChanged(); + } + if (!other.datapointIds_.isEmpty()) { + if (datapointIds_.isEmpty()) { + datapointIds_ = other.datapointIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDatapointIdsIsMutable(); + datapointIds_.addAll(other.datapointIds_); + } + 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.RemoveDatapointsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + index_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + + index_ = getDefaultInstance().getIndex(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for index to set. + * @return This builder for chaining. + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + index_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList datapointIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDatapointIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + datapointIds_ = new com.google.protobuf.LazyStringArrayList(datapointIds_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @return A list containing the datapointIds. + */ + public com.google.protobuf.ProtocolStringList getDatapointIdsList() { + return datapointIds_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @return The count of datapointIds. + */ + public int getDatapointIdsCount() { + return datapointIds_.size(); + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index of the element to return. + * @return The datapointIds at the given index. + */ + public java.lang.String getDatapointIds(int index) { + return datapointIds_.get(index); + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the datapointIds at the given index. + */ + public com.google.protobuf.ByteString getDatapointIdsBytes(int index) { + return datapointIds_.getByteString(index); + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index to set the value at. + * @param value The datapointIds to set. + * @return This builder for chaining. + */ + public Builder setDatapointIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatapointIdsIsMutable(); + datapointIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @param value The datapointIds to add. + * @return This builder for chaining. + */ + public Builder addDatapointIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatapointIdsIsMutable(); + datapointIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @param values The datapointIds to add. + * @return This builder for chaining. + */ + public Builder addAllDatapointIds(java.lang.Iterable values) { + ensureDatapointIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datapointIds_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @return This builder for chaining. + */ + public Builder clearDatapointIds() { + datapointIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of datapoint ids to be deleted.
+     * 
+ * + * repeated string datapoint_ids = 2; + * + * @param value The bytes of the datapointIds to add. + * @return This builder for chaining. + */ + public Builder addDatapointIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDatapointIdsIsMutable(); + datapointIds_.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.RemoveDatapointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest) + private static final com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveDatapointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoveDatapointsRequest(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.RemoveDatapointsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveDatapointsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveDatapointsRequestOrBuilder.java new file mode 100644 index 00000000000..28df5f6a756 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveDatapointsRequestOrBuilder.java @@ -0,0 +1,109 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface RemoveDatapointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RemoveDatapointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + java.lang.String getIndex(); + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + com.google.protobuf.ByteString getIndexBytes(); + + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @return A list containing the datapointIds. + */ + java.util.List getDatapointIdsList(); + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @return The count of datapointIds. + */ + int getDatapointIdsCount(); + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index of the element to return. + * @return The datapointIds at the given index. + */ + java.lang.String getDatapointIds(int index); + /** + * + * + *
+   * A list of datapoint ids to be deleted.
+   * 
+ * + * repeated string datapoint_ids = 2; + * + * @param index The index of the value to return. + * @return The bytes of the datapointIds at the given index. + */ + com.google.protobuf.ByteString getDatapointIdsBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveDatapointsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveDatapointsResponse.java new file mode 100644 index 00000000000..b0407574dff --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveDatapointsResponse.java @@ -0,0 +1,462 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1beta1.IndexService.RemoveDatapoints]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse} + */ +public final class RemoveDatapointsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse) + RemoveDatapointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RemoveDatapointsResponse.newBuilder() to construct. + private RemoveDatapointsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RemoveDatapointsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RemoveDatapointsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RemoveDatapointsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse.class, + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.RemoveDatapointsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse other = + (com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse) obj; + + 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse 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.RemoveDatapointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse 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.RemoveDatapointsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse 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.RemoveDatapointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse 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.RemoveDatapointsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse 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.RemoveDatapointsResponse 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.RemoveDatapointsResponse 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.RemoveDatapointsResponse 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 [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1beta1.IndexService.RemoveDatapoints]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse) + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse.class, + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse.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(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_RemoveDatapointsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse build() { + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse result = + new com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse(this); + 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.RemoveDatapointsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse other) { + if (other + == com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse.getDefaultInstance()) + return this; + 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.RemoveDatapointsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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.RemoveDatapointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse) + private static final com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveDatapointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RemoveDatapointsResponse(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.RemoveDatapointsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveDatapointsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveDatapointsResponseOrBuilder.java new file mode 100644 index 00000000000..3a65bc14bb3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RemoveDatapointsResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface RemoveDatapointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.RemoveDatapointsResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SamplingStrategy.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SamplingStrategy.java index 140ee003e78..c1b0c8bf86c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SamplingStrategy.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SamplingStrategy.java @@ -24,7 +24,6 @@ *
  * Sampling Strategy for logging, can be for both training and prediction
  * dataset.
- * Next ID: 2
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.SamplingStrategy} @@ -929,7 +928,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Sampling Strategy for logging, can be for both training and prediction
    * dataset.
-   * Next ID: 2
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.SamplingStrategy} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SavedQuery.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SavedQuery.java index 473cb8b4339..3c75cbc5c95 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SavedQuery.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SavedQuery.java @@ -590,7 +590,7 @@ public int getAnnotationSpecCount() { * * *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * Used to perform a consistent read-modify-write update. If not set, a blind
    * "overwrite" update happens.
    * 
* @@ -614,7 +614,7 @@ public java.lang.String getEtag() { * * *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * Used to perform a consistent read-modify-write update. If not set, a blind
    * "overwrite" update happens.
    * 
* @@ -2276,7 +2276,7 @@ public Builder clearAnnotationSpecCount() { * * *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * Used to perform a consistent read-modify-write update. If not set, a blind
      * "overwrite" update happens.
      * 
* @@ -2299,7 +2299,7 @@ public java.lang.String getEtag() { * * *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * Used to perform a consistent read-modify-write update. If not set, a blind
      * "overwrite" update happens.
      * 
* @@ -2322,7 +2322,7 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * Used to perform a consistent read-modify-write update. If not set, a blind
      * "overwrite" update happens.
      * 
* @@ -2344,7 +2344,7 @@ public Builder setEtag(java.lang.String value) { * * *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * Used to perform a consistent read-modify-write update. If not set, a blind
      * "overwrite" update happens.
      * 
* @@ -2362,7 +2362,7 @@ public Builder clearEtag() { * * *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
+     * Used to perform a consistent read-modify-write update. If not set, a blind
      * "overwrite" update happens.
      * 
* diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SavedQueryOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SavedQueryOrBuilder.java index a0b8d9eaa71..4ccbace2470 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SavedQueryOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SavedQueryOrBuilder.java @@ -277,7 +277,7 @@ public interface SavedQueryOrBuilder * * *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * Used to perform a consistent read-modify-write update. If not set, a blind
    * "overwrite" update happens.
    * 
* @@ -290,7 +290,7 @@ public interface SavedQueryOrBuilder * * *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
+   * Used to perform a consistent read-modify-write update. If not set, a blind
    * "overwrite" update happens.
    * 
* diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SuggestTrialsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SuggestTrialsRequest.java index 89d4532a6c8..88cb2fff69e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SuggestTrialsRequest.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SuggestTrialsRequest.java @@ -187,7 +187,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * Required. The number of suggestions requested.
+   * Required. The number of suggestions requested. It must be positive.
    * 
* * int32 suggestion_count = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -730,7 +730,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. The number of suggestions requested.
+     * Required. The number of suggestions requested. It must be positive.
      * 
* * int32 suggestion_count = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -745,7 +745,7 @@ public int getSuggestionCount() { * * *
-     * Required. The number of suggestions requested.
+     * Required. The number of suggestions requested. It must be positive.
      * 
* * int32 suggestion_count = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -763,7 +763,7 @@ public Builder setSuggestionCount(int value) { * * *
-     * Required. The number of suggestions requested.
+     * Required. The number of suggestions requested. It must be positive.
      * 
* * int32 suggestion_count = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SuggestTrialsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SuggestTrialsRequestOrBuilder.java index 263ae7d5764..49bb771a328 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SuggestTrialsRequestOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SuggestTrialsRequestOrBuilder.java @@ -58,7 +58,7 @@ public interface SuggestTrialsRequestOrBuilder * * *
-   * Required. The number of suggestions requested.
+   * Required. The number of suggestions requested. It must be positive.
    * 
* * int32 suggestion_count = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ThresholdConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ThresholdConfig.java index 25a953b7850..0c9cc93155e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ThresholdConfig.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ThresholdConfig.java @@ -23,7 +23,6 @@ * *
  * The config for feature monitoring threshold.
- * Next ID: 3
  * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.ThresholdConfig} @@ -387,7 +386,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * The config for feature monitoring threshold.
-   * Next ID: 3
    * 
* * Protobuf type {@code google.cloud.aiplatform.v1beta1.ThresholdConfig} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpsertDatapointsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpsertDatapointsRequest.java new file mode 100644 index 00000000000..8d1b9261f2a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpsertDatapointsRequest.java @@ -0,0 +1,1171 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1beta1.IndexService.UpsertDatapoints]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest} + */ +public final class UpsertDatapointsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest) + UpsertDatapointsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpsertDatapointsRequest.newBuilder() to construct. + private UpsertDatapointsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpsertDatapointsRequest() { + index_ = ""; + datapoints_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpsertDatapointsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpsertDatapointsRequest( + 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(); + + index_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + datapoints_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + datapoints_.add( + input.readMessage( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.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)) { + datapoints_ = java.util.Collections.unmodifiableList(datapoints_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest.class, + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest.Builder.class); + } + + public static final int INDEX_FIELD_NUMBER = 1; + private volatile java.lang.Object index_; + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + @java.lang.Override + public java.lang.String getIndex() { + java.lang.Object ref = index_; + 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(); + index_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATAPOINTS_FIELD_NUMBER = 2; + private java.util.List datapoints_; + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + @java.lang.Override + public java.util.List getDatapointsList() { + return datapoints_; + } + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + @java.lang.Override + public java.util.List + getDatapointsOrBuilderList() { + return datapoints_; + } + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + @java.lang.Override + public int getDatapointsCount() { + return datapoints_.size(); + } + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint getDatapoints(int index) { + return datapoints_.get(index); + } + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.IndexDatapointOrBuilder getDatapointsOrBuilder( + int index) { + return datapoints_.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(index_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, index_); + } + for (int i = 0; i < datapoints_.size(); i++) { + output.writeMessage(2, datapoints_.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(index_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, index_); + } + for (int i = 0; i < datapoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, datapoints_.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.UpsertDatapointsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest other = + (com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest) obj; + + if (!getIndex().equals(other.getIndex())) return false; + if (!getDatapointsList().equals(other.getDatapointsList())) 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) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + getIndex().hashCode(); + if (getDatapointsCount() > 0) { + hash = (37 * hash) + DATAPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getDatapointsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest 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.UpsertDatapointsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest 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.UpsertDatapointsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest 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.UpsertDatapointsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest 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.UpsertDatapointsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest 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.UpsertDatapointsRequest 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.UpsertDatapointsRequest 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.UpsertDatapointsRequest 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 [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1beta1.IndexService.UpsertDatapoints]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest) + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest.class, + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDatapointsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + index_ = ""; + + if (datapointsBuilder_ == null) { + datapoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + datapointsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest build() { + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest result = + new com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest(this); + int from_bitField0_ = bitField0_; + result.index_ = index_; + if (datapointsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + datapoints_ = java.util.Collections.unmodifiableList(datapoints_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.datapoints_ = datapoints_; + } else { + result.datapoints_ = datapointsBuilder_.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.UpsertDatapointsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest.getDefaultInstance()) + return this; + if (!other.getIndex().isEmpty()) { + index_ = other.index_; + onChanged(); + } + if (datapointsBuilder_ == null) { + if (!other.datapoints_.isEmpty()) { + if (datapoints_.isEmpty()) { + datapoints_ = other.datapoints_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDatapointsIsMutable(); + datapoints_.addAll(other.datapoints_); + } + onChanged(); + } + } else { + if (!other.datapoints_.isEmpty()) { + if (datapointsBuilder_.isEmpty()) { + datapointsBuilder_.dispose(); + datapointsBuilder_ = null; + datapoints_ = other.datapoints_; + bitField0_ = (bitField0_ & ~0x00000001); + datapointsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDatapointsFieldBuilder() + : null; + } else { + datapointsBuilder_.addAllMessages(other.datapoints_); + } + } + } + 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.UpsertDatapointsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object index_ = ""; + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + public java.lang.String getIndex() { + java.lang.Object ref = index_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + index_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + public com.google.protobuf.ByteString getIndexBytes() { + java.lang.Object ref = index_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + index_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + index_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + + index_ = getDefaultInstance().getIndex(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Index resource to be updated.
+     * Format:
+     * `projects/{project}/locations/{location}/indexes/{index}`
+     * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for index to set. + * @return This builder for chaining. + */ + public Builder setIndexBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + index_ = value; + onChanged(); + return this; + } + + private java.util.List datapoints_ = + java.util.Collections.emptyList(); + + private void ensureDatapointsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + datapoints_ = + new java.util.ArrayList( + datapoints_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapointOrBuilder> + datapointsBuilder_; + + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public java.util.List getDatapointsList() { + if (datapointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(datapoints_); + } else { + return datapointsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public int getDatapointsCount() { + if (datapointsBuilder_ == null) { + return datapoints_.size(); + } else { + return datapointsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint getDatapoints(int index) { + if (datapointsBuilder_ == null) { + return datapoints_.get(index); + } else { + return datapointsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public Builder setDatapoints( + int index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint value) { + if (datapointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatapointsIsMutable(); + datapoints_.set(index, value); + onChanged(); + } else { + datapointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public Builder setDatapoints( + int index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder builderForValue) { + if (datapointsBuilder_ == null) { + ensureDatapointsIsMutable(); + datapoints_.set(index, builderForValue.build()); + onChanged(); + } else { + datapointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public Builder addDatapoints(com.google.cloud.aiplatform.v1beta1.IndexDatapoint value) { + if (datapointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatapointsIsMutable(); + datapoints_.add(value); + onChanged(); + } else { + datapointsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public Builder addDatapoints( + int index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint value) { + if (datapointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatapointsIsMutable(); + datapoints_.add(index, value); + onChanged(); + } else { + datapointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public Builder addDatapoints( + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder builderForValue) { + if (datapointsBuilder_ == null) { + ensureDatapointsIsMutable(); + datapoints_.add(builderForValue.build()); + onChanged(); + } else { + datapointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public Builder addDatapoints( + int index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder builderForValue) { + if (datapointsBuilder_ == null) { + ensureDatapointsIsMutable(); + datapoints_.add(index, builderForValue.build()); + onChanged(); + } else { + datapointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public Builder addAllDatapoints( + java.lang.Iterable values) { + if (datapointsBuilder_ == null) { + ensureDatapointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datapoints_); + onChanged(); + } else { + datapointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public Builder clearDatapoints() { + if (datapointsBuilder_ == null) { + datapoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + datapointsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public Builder removeDatapoints(int index) { + if (datapointsBuilder_ == null) { + ensureDatapointsIsMutable(); + datapoints_.remove(index); + onChanged(); + } else { + datapointsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder getDatapointsBuilder( + int index) { + return getDatapointsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapointOrBuilder getDatapointsOrBuilder( + int index) { + if (datapointsBuilder_ == null) { + return datapoints_.get(index); + } else { + return datapointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public java.util.List + getDatapointsOrBuilderList() { + if (datapointsBuilder_ != null) { + return datapointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(datapoints_); + } + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder addDatapointsBuilder() { + return getDatapointsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.IndexDatapoint.getDefaultInstance()); + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder addDatapointsBuilder( + int index) { + return getDatapointsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1beta1.IndexDatapoint.getDefaultInstance()); + } + /** + * + * + *
+     * A list of datapoints to be created/updated.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + public java.util.List + getDatapointsBuilderList() { + return getDatapointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapointOrBuilder> + getDatapointsFieldBuilder() { + if (datapointsBuilder_ == null) { + datapointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.IndexDatapoint, + com.google.cloud.aiplatform.v1beta1.IndexDatapoint.Builder, + com.google.cloud.aiplatform.v1beta1.IndexDatapointOrBuilder>( + datapoints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + datapoints_ = null; + } + return datapointsBuilder_; + } + + @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.UpsertDatapointsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest) + private static final com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpsertDatapointsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpsertDatapointsRequest(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.UpsertDatapointsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpsertDatapointsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpsertDatapointsRequestOrBuilder.java new file mode 100644 index 00000000000..b9168f7235f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpsertDatapointsRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface UpsertDatapointsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.UpsertDatapointsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The index. + */ + java.lang.String getIndex(); + /** + * + * + *
+   * Required. The name of the Index resource to be updated.
+   * Format:
+   * `projects/{project}/locations/{location}/indexes/{index}`
+   * 
+ * + * + * string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for index. + */ + com.google.protobuf.ByteString getIndexBytes(); + + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + java.util.List getDatapointsList(); + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + com.google.cloud.aiplatform.v1beta1.IndexDatapoint getDatapoints(int index); + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + int getDatapointsCount(); + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + java.util.List + getDatapointsOrBuilderList(); + /** + * + * + *
+   * A list of datapoints to be created/updated.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.IndexDatapoint datapoints = 2; + */ + com.google.cloud.aiplatform.v1beta1.IndexDatapointOrBuilder getDatapointsOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpsertDatapointsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpsertDatapointsResponse.java new file mode 100644 index 00000000000..305c227615b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpsertDatapointsResponse.java @@ -0,0 +1,462 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1beta1.IndexService.UpsertDatapoints]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse} + */ +public final class UpsertDatapointsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse) + UpsertDatapointsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpsertDatapointsResponse.newBuilder() to construct. + private UpsertDatapointsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpsertDatapointsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpsertDatapointsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpsertDatapointsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse.class, + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.UpsertDatapointsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse other = + (com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse) obj; + + 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse 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.UpsertDatapointsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse 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.UpsertDatapointsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse 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.UpsertDatapointsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse 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.UpsertDatapointsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse 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.UpsertDatapointsResponse 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.UpsertDatapointsResponse 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.UpsertDatapointsResponse 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 [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1beta1.IndexService.UpsertDatapoints]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse) + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse.class, + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse.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(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.IndexServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_UpsertDatapointsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse build() { + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse result = + new com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse(this); + 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.UpsertDatapointsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse other) { + if (other + == com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse.getDefaultInstance()) + return this; + 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.UpsertDatapointsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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.UpsertDatapointsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse) + private static final com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpsertDatapointsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpsertDatapointsResponse(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.UpsertDatapointsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpsertDatapointsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpsertDatapointsResponseOrBuilder.java new file mode 100644 index 00000000000..70cb5a97321 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpsertDatapointsResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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/index_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface UpsertDatapointsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.UpsertDatapointsResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/dataset_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/dataset_service.proto index a0b0a9ccf04..3be59c059d8 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/dataset_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/dataset_service.proto @@ -399,8 +399,7 @@ message ListSavedQueriesRequest { // Response message for [DatasetService.ListSavedQueries][google.cloud.aiplatform.v1beta1.DatasetService.ListSavedQueries]. message ListSavedQueriesResponse { - // A list of SavedQueries that matches the specified filter in the - // request. + // A list of SavedQueries that match the specified filter in the request. repeated SavedQuery saved_queries = 1; // The standard List next-page token. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/explanation.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/explanation.proto index 9f844d53d5a..6dccd06e4e9 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/explanation.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/explanation.proto @@ -183,8 +183,8 @@ message ExplanationSpec { // Required. Parameters that configure explaining of the Model's predictions. ExplanationParameters parameters = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Metadata describing the Model's input and output for explanation. - ExplanationMetadata metadata = 2 [(google.api.field_behavior) = REQUIRED]; + // Optional. Metadata describing the Model's input and output for explanation. + ExplanationMetadata metadata = 2 [(google.api.field_behavior) = OPTIONAL]; } // Parameters to configure explaining for Model's predictions. @@ -229,7 +229,7 @@ message ExplanationParameters { // explaining. // // If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs. - // If neither top_k nor output_indeices is populated, returns the argmax + // If neither top_k nor output_indices is populated, returns the argmax // index of the outputs. // // Only applicable to Models that predict multiple outputs (e,g, multi-class diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index.proto index ea9bc6d1603..f0e3c67a05f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index.proto @@ -38,6 +38,21 @@ message Index { pattern: "projects/{project}/locations/{location}/indexes/{index}" }; + // The update method of an Index. + enum IndexUpdateMethod { + // Should not be used. + INDEX_UPDATE_METHOD_UNSPECIFIED = 0; + + // BatchUpdate: user can call UpdateIndex with files on Cloud Storage of + // datapoints to update. + BATCH_UPDATE = 1; + + // StreamUpdate: user can call UpsertDatapoints/DeleteDatapoints to update + // the Index and the updates will be applied in corresponding + // DeployedIndexes in nearly real-time. + STREAM_UPDATE = 2; + } + // Output only. The resource name of the Index. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -93,4 +108,65 @@ message Index { // in the Index. Result of any successfully completed Operation on the Index // is reflected in it. google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Stats of the index resource. + IndexStats index_stats = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be + // used by default. + IndexUpdateMethod index_update_method = 16 [(google.api.field_behavior) = IMMUTABLE]; +} + +// A datapoint of Index. +message IndexDatapoint { + // Restriction of a datapoint which describe its attributes(tokens) from each + // of several attribute categories(namespaces). + message Restriction { + // The namespace of this restriction. eg: color. + string namespace = 1; + + // The attributes to allow in this namespace. eg: 'red' + repeated string allow_list = 2; + + // The attributes to deny in this namespace. eg: 'blue' + repeated string deny_list = 3; + } + + // Crowding tag is a constraint on a neighbor list produced by nearest + // neighbor search requiring that no more than some value k' of the k + // neighbors returned have the same value of crowding_attribute. + message CrowdingTag { + // The attribute value used for crowding. The maximum number of neighbors + // to return per crowding attribute value + // (per_crowding_attribute_num_neighbors) is configured per-query. This + // field is ignored if per_crowding_attribute_num_neighbors is larger than + // the total number of neighbors to return for a given query. + string crowding_attribute = 1; + } + + // Required. Unique identifier of the datapoint. + string datapoint_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Feature embedding vector. An array of numbers with the length of + // [NearestNeighborSearchConfig.dimensions]. + repeated float feature_vector = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. List of Restrict of the datapoint, used to perform "restricted searches" + // where boolean rule are used to filter the subset of the database eligible + // for matching. + // See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering + repeated Restriction restricts = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. CrowdingTag of the datapoint, the number of neighbors to return in each + // crowding can be configured during query. + CrowdingTag crowding_tag = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Stats of the Index. +message IndexStats { + // Output only. The number of vectors in the Index. + int64 vectors_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of shards in the Index. + int32 shards_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index_service.proto index db6aaaa04c3..813f648c93f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index_service.proto @@ -93,6 +93,22 @@ service IndexService { metadata_type: "DeleteOperationMetadata" }; } + + // Add/update Datapoints into an Index. + rpc UpsertDatapoints(UpsertDatapointsRequest) returns (UpsertDatapointsResponse) { + option (google.api.http) = { + post: "/v1beta1/{index=projects/*/locations/*/indexes/*}:upsertDatapoints" + body: "*" + }; + } + + // Remove Datapoints from an Index. + rpc RemoveDatapoints(RemoveDatapointsRequest) returns (RemoveDatapointsResponse) { + option (google.api.http) = { + post: "/v1beta1/{index=projects/*/locations/*/indexes/*}:removeDatapoints" + body: "*" + }; + } } // Request message for [IndexService.CreateIndex][google.cloud.aiplatform.v1beta1.IndexService.CreateIndex]. @@ -201,6 +217,48 @@ message DeleteIndexRequest { ]; } +// Request message for [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1beta1.IndexService.UpsertDatapoints] +message UpsertDatapointsRequest { + // Required. The name of the Index resource to be updated. + // Format: + // `projects/{project}/locations/{location}/indexes/{index}` + string index = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Index" + } + ]; + + // A list of datapoints to be created/updated. + repeated IndexDatapoint datapoints = 2; +} + +// Response message for [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1beta1.IndexService.UpsertDatapoints] +message UpsertDatapointsResponse { + +} + +// Request message for [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1beta1.IndexService.RemoveDatapoints] +message RemoveDatapointsRequest { + // Required. The name of the Index resource to be updated. + // Format: + // `projects/{project}/locations/{location}/indexes/{index}` + string index = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Index" + } + ]; + + // A list of datapoint ids to be deleted. + repeated string datapoint_ids = 2; +} + +// Response message for [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1beta1.IndexService.RemoveDatapoints] +message RemoveDatapointsResponse { + +} + // Runtime operation metadata with regard to Matching Engine Index. message NearestNeighborSearchOperationMetadata { message RecordError { diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model_monitoring.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model_monitoring.proto index 3456dc0ab5c..3dc687e5f10 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model_monitoring.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model_monitoring.proto @@ -27,7 +27,7 @@ option java_package = "com.google.cloud.aiplatform.v1beta1"; option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; -// Next ID: 5 +// The model monitoring configuration used for Batch Prediction Job. message ModelMonitoringConfig { // Model monitoring objective config. repeated ModelMonitoringObjectiveConfig objective_configs = 3; @@ -43,17 +43,24 @@ message ModelMonitoringConfig { // For models trained with Vertex AI, this field must be set as all the // fields in predict instance formatted as string. string analysis_instance_schema_uri = 4; + + // A Google Cloud Storage location for batch prediction model monitoring to + // dump statistics and anomalies. + // If not provided, a folder will be created in customer project to hold + // statistics and anomalies. + GcsDestination stats_anomalies_base_directory = 5; } -// Next ID: 8 +// The objective configuration for model monitoring, including the information +// needed to detect anomalies for one particular model. message ModelMonitoringObjectiveConfig { // Training Dataset information. message TrainingDataset { oneof data_source { // The resource name of the Dataset used to train this Model. string dataset = 3 [(google.api.resource_reference) = { - type: "aiplatform.googleapis.com/Dataset" - }]; + type: "aiplatform.googleapis.com/Dataset" + }]; // The Google Cloud Storage uri of the unmanaged Dataset used to train // this Model. @@ -128,8 +135,10 @@ message ModelMonitoringObjectiveConfig { // The config for integrating with Vertex Explainable AI. Only applicable if // the Model has explanation_spec populated. message ExplanationConfig { - // Output from [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob] for Model Monitoring baseline dataset, - // which can be used to generate baseline attribution scores. + // Output from + // [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob] + // for Model Monitoring baseline dataset, which can be used to generate + // baseline attribution scores. message ExplanationBaseline { // The storage format of the predictions generated BatchPrediction job. enum PredictionFormat { @@ -171,7 +180,8 @@ message ModelMonitoringObjectiveConfig { TrainingDataset training_dataset = 1; // The config for skew between training data and prediction data. - TrainingPredictionSkewDetectionConfig training_prediction_skew_detection_config = 2; + TrainingPredictionSkewDetectionConfig + training_prediction_skew_detection_config = 2; // The config for drift of prediction data. PredictionDriftDetectionConfig prediction_drift_detection_config = 3; @@ -180,7 +190,6 @@ message ModelMonitoringObjectiveConfig { ExplanationConfig explanation_config = 5; } -// Next ID: 3 message ModelMonitoringAlertConfig { // The config for email alert. message EmailAlertConfig { @@ -202,7 +211,6 @@ message ModelMonitoringAlertConfig { } // The config for feature monitoring threshold. -// Next ID: 3 message ThresholdConfig { oneof threshold { // Specify a threshold value that can trigger the alert. @@ -219,7 +227,6 @@ message ThresholdConfig { // Sampling Strategy for logging, can be for both training and prediction // dataset. -// Next ID: 2 message SamplingStrategy { // Requests are randomly selected. message RandomSampleConfig { 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 1a9e0767303..1af9d4b48fe 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 @@ -465,7 +465,7 @@ message MergeVersionAliasesRequest { // Required. The set of version aliases to merge. // The alias should be at most 128 characters, and match - // `[a-z][a-z0-9-]{0,126}[a-z-0-9]`. + // `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`. // Add the `-` prefix to an alias means removing that alias from the version. // `-` is NOT counted in the 128 characters. Example: `-golden` means removing // the `golden` alias from the version. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/saved_query.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/saved_query.proto index ca99c0394da..da02d8a501d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/saved_query.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/saved_query.proto @@ -59,6 +59,7 @@ message SavedQuery { // Required. Problem type of the SavedQuery. // Allowed values: + // // * IMAGE_CLASSIFICATION_SINGLE_LABEL // * IMAGE_CLASSIFICATION_MULTI_LABEL // * IMAGE_BOUNDING_POLY @@ -74,7 +75,7 @@ message SavedQuery { // Output only. Number of AnnotationSpecs in the context of the SavedQuery. int32 annotation_spec_count = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Used to perform consistent read-modify-write updates. If not set, a blind + // Used to perform a consistent read-modify-write update. If not set, a blind // "overwrite" update happens. string etag = 8; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vizier_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vizier_service.proto index 079c514aba5..88aec042e85 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vizier_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/vizier_service.proto @@ -285,7 +285,7 @@ message SuggestTrialsRequest { } ]; - // Required. The number of suggestions requested. + // Required. The number of suggestions requested. It must be positive. int32 suggestion_count = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The identifier of the client that is requesting the suggestion.