com.aerospike.vector.client.proto.IndexUpdateRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of avs-client-java Show documentation
Show all versions of avs-client-java Show documentation
This project includes the Java client for Aerospike Vector Search for high-performance data interactions.
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: index.proto
// Protobuf Java Version: 3.25.5
package com.aerospike.vector.client.proto;
/**
* Protobuf type {@code aerospike.vector.IndexUpdateRequest}
*/
public final class IndexUpdateRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:aerospike.vector.IndexUpdateRequest)
IndexUpdateRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use IndexUpdateRequest.newBuilder() to construct.
private IndexUpdateRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private IndexUpdateRequest() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new IndexUpdateRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.aerospike.vector.client.proto.Index.internal_static_aerospike_vector_IndexUpdateRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.aerospike.vector.client.proto.Index.internal_static_aerospike_vector_IndexUpdateRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.aerospike.vector.client.proto.IndexUpdateRequest.class, com.aerospike.vector.client.proto.IndexUpdateRequest.Builder.class);
}
private int bitField0_;
private int updateCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object update_;
public enum UpdateCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
HNSWINDEXUPDATE(3),
UPDATE_NOT_SET(0);
private final int value;
private UpdateCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static UpdateCase valueOf(int value) {
return forNumber(value);
}
public static UpdateCase forNumber(int value) {
switch (value) {
case 3: return HNSWINDEXUPDATE;
case 0: return UPDATE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public UpdateCase
getUpdateCase() {
return UpdateCase.forNumber(
updateCase_);
}
public static final int INDEXID_FIELD_NUMBER = 1;
private com.aerospike.vector.client.proto.IndexId indexId_;
/**
* .aerospike.vector.IndexId indexId = 1;
* @return Whether the indexId field is set.
*/
@java.lang.Override
public boolean hasIndexId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .aerospike.vector.IndexId indexId = 1;
* @return The indexId.
*/
@java.lang.Override
public com.aerospike.vector.client.proto.IndexId getIndexId() {
return indexId_ == null ? com.aerospike.vector.client.proto.IndexId.getDefaultInstance() : indexId_;
}
/**
* .aerospike.vector.IndexId indexId = 1;
*/
@java.lang.Override
public com.aerospike.vector.client.proto.IndexIdOrBuilder getIndexIdOrBuilder() {
return indexId_ == null ? com.aerospike.vector.client.proto.IndexId.getDefaultInstance() : indexId_;
}
public static final int LABELS_FIELD_NUMBER = 2;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.aerospike.vector.client.proto.Index.internal_static_aerospike_vector_IndexUpdateRequest_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* Optional labels associated with the index.
*
*
* map<string, string> labels = 2;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* Optional labels associated with the index.
*
*
* map<string, string> labels = 2;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* Optional labels associated with the index.
*
*
* map<string, string> labels = 2;
*/
@java.lang.Override
public /* nullable */
java.lang.String getLabelsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Optional labels associated with the index.
*
*
* map<string, string> labels = 2;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int HNSWINDEXUPDATE_FIELD_NUMBER = 3;
/**
* .aerospike.vector.HnswIndexUpdate hnswIndexUpdate = 3;
* @return Whether the hnswIndexUpdate field is set.
*/
@java.lang.Override
public boolean hasHnswIndexUpdate() {
return updateCase_ == 3;
}
/**
* .aerospike.vector.HnswIndexUpdate hnswIndexUpdate = 3;
* @return The hnswIndexUpdate.
*/
@java.lang.Override
public com.aerospike.vector.client.proto.HnswIndexUpdate getHnswIndexUpdate() {
if (updateCase_ == 3) {
return (com.aerospike.vector.client.proto.HnswIndexUpdate) update_;
}
return com.aerospike.vector.client.proto.HnswIndexUpdate.getDefaultInstance();
}
/**
* .aerospike.vector.HnswIndexUpdate hnswIndexUpdate = 3;
*/
@java.lang.Override
public com.aerospike.vector.client.proto.HnswIndexUpdateOrBuilder getHnswIndexUpdateOrBuilder() {
if (updateCase_ == 3) {
return (com.aerospike.vector.client.proto.HnswIndexUpdate) update_;
}
return com.aerospike.vector.client.proto.HnswIndexUpdate.getDefaultInstance();
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getIndexId());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetLabels(),
LabelsDefaultEntryHolder.defaultEntry,
2);
if (updateCase_ == 3) {
output.writeMessage(3, (com.aerospike.vector.client.proto.HnswIndexUpdate) update_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getIndexId());
}
for (java.util.Map.Entry entry
: internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry
labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, labels__);
}
if (updateCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.aerospike.vector.client.proto.HnswIndexUpdate) update_);
}
size += getUnknownFields().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.aerospike.vector.client.proto.IndexUpdateRequest)) {
return super.equals(obj);
}
com.aerospike.vector.client.proto.IndexUpdateRequest other = (com.aerospike.vector.client.proto.IndexUpdateRequest) obj;
if (hasIndexId() != other.hasIndexId()) return false;
if (hasIndexId()) {
if (!getIndexId()
.equals(other.getIndexId())) return false;
}
if (!internalGetLabels().equals(
other.internalGetLabels())) return false;
if (!getUpdateCase().equals(other.getUpdateCase())) return false;
switch (updateCase_) {
case 3:
if (!getHnswIndexUpdate()
.equals(other.getHnswIndexUpdate())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasIndexId()) {
hash = (37 * hash) + INDEXID_FIELD_NUMBER;
hash = (53 * hash) + getIndexId().hashCode();
}
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
switch (updateCase_) {
case 3:
hash = (37 * hash) + HNSWINDEXUPDATE_FIELD_NUMBER;
hash = (53 * hash) + getHnswIndexUpdate().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.aerospike.vector.client.proto.IndexUpdateRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.aerospike.vector.client.proto.IndexUpdateRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.aerospike.vector.client.proto.IndexUpdateRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.aerospike.vector.client.proto.IndexUpdateRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.aerospike.vector.client.proto.IndexUpdateRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.aerospike.vector.client.proto.IndexUpdateRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.aerospike.vector.client.proto.IndexUpdateRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.aerospike.vector.client.proto.IndexUpdateRequest 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.aerospike.vector.client.proto.IndexUpdateRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.aerospike.vector.client.proto.IndexUpdateRequest 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.aerospike.vector.client.proto.IndexUpdateRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.aerospike.vector.client.proto.IndexUpdateRequest 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.aerospike.vector.client.proto.IndexUpdateRequest 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;
}
/**
* Protobuf type {@code aerospike.vector.IndexUpdateRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:aerospike.vector.IndexUpdateRequest)
com.aerospike.vector.client.proto.IndexUpdateRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.aerospike.vector.client.proto.Index.internal_static_aerospike_vector_IndexUpdateRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetMutableLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.aerospike.vector.client.proto.Index.internal_static_aerospike_vector_IndexUpdateRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.aerospike.vector.client.proto.IndexUpdateRequest.class, com.aerospike.vector.client.proto.IndexUpdateRequest.Builder.class);
}
// Construct using com.aerospike.vector.client.proto.IndexUpdateRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getIndexIdFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
indexId_ = null;
if (indexIdBuilder_ != null) {
indexIdBuilder_.dispose();
indexIdBuilder_ = null;
}
internalGetMutableLabels().clear();
if (hnswIndexUpdateBuilder_ != null) {
hnswIndexUpdateBuilder_.clear();
}
updateCase_ = 0;
update_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.aerospike.vector.client.proto.Index.internal_static_aerospike_vector_IndexUpdateRequest_descriptor;
}
@java.lang.Override
public com.aerospike.vector.client.proto.IndexUpdateRequest getDefaultInstanceForType() {
return com.aerospike.vector.client.proto.IndexUpdateRequest.getDefaultInstance();
}
@java.lang.Override
public com.aerospike.vector.client.proto.IndexUpdateRequest build() {
com.aerospike.vector.client.proto.IndexUpdateRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.aerospike.vector.client.proto.IndexUpdateRequest buildPartial() {
com.aerospike.vector.client.proto.IndexUpdateRequest result = new com.aerospike.vector.client.proto.IndexUpdateRequest(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.aerospike.vector.client.proto.IndexUpdateRequest result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.indexId_ = indexIdBuilder_ == null
? indexId_
: indexIdBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.aerospike.vector.client.proto.IndexUpdateRequest result) {
result.updateCase_ = updateCase_;
result.update_ = this.update_;
if (updateCase_ == 3 &&
hnswIndexUpdateBuilder_ != null) {
result.update_ = hnswIndexUpdateBuilder_.build();
}
}
@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.aerospike.vector.client.proto.IndexUpdateRequest) {
return mergeFrom((com.aerospike.vector.client.proto.IndexUpdateRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.aerospike.vector.client.proto.IndexUpdateRequest other) {
if (other == com.aerospike.vector.client.proto.IndexUpdateRequest.getDefaultInstance()) return this;
if (other.hasIndexId()) {
mergeIndexId(other.getIndexId());
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
bitField0_ |= 0x00000002;
switch (other.getUpdateCase()) {
case HNSWINDEXUPDATE: {
mergeHnswIndexUpdate(other.getHnswIndexUpdate());
break;
}
case UPDATE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getIndexIdFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.MapEntry
labels__ = input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableLabels().getMutableMap().put(
labels__.getKey(), labels__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
input.readMessage(
getHnswIndexUpdateFieldBuilder().getBuilder(),
extensionRegistry);
updateCase_ = 3;
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int updateCase_ = 0;
private java.lang.Object update_;
public UpdateCase
getUpdateCase() {
return UpdateCase.forNumber(
updateCase_);
}
public Builder clearUpdate() {
updateCase_ = 0;
update_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.aerospike.vector.client.proto.IndexId indexId_;
private com.google.protobuf.SingleFieldBuilderV3<
com.aerospike.vector.client.proto.IndexId, com.aerospike.vector.client.proto.IndexId.Builder, com.aerospike.vector.client.proto.IndexIdOrBuilder> indexIdBuilder_;
/**
* .aerospike.vector.IndexId indexId = 1;
* @return Whether the indexId field is set.
*/
public boolean hasIndexId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .aerospike.vector.IndexId indexId = 1;
* @return The indexId.
*/
public com.aerospike.vector.client.proto.IndexId getIndexId() {
if (indexIdBuilder_ == null) {
return indexId_ == null ? com.aerospike.vector.client.proto.IndexId.getDefaultInstance() : indexId_;
} else {
return indexIdBuilder_.getMessage();
}
}
/**
* .aerospike.vector.IndexId indexId = 1;
*/
public Builder setIndexId(com.aerospike.vector.client.proto.IndexId value) {
if (indexIdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
indexId_ = value;
} else {
indexIdBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .aerospike.vector.IndexId indexId = 1;
*/
public Builder setIndexId(
com.aerospike.vector.client.proto.IndexId.Builder builderForValue) {
if (indexIdBuilder_ == null) {
indexId_ = builderForValue.build();
} else {
indexIdBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .aerospike.vector.IndexId indexId = 1;
*/
public Builder mergeIndexId(com.aerospike.vector.client.proto.IndexId value) {
if (indexIdBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
indexId_ != null &&
indexId_ != com.aerospike.vector.client.proto.IndexId.getDefaultInstance()) {
getIndexIdBuilder().mergeFrom(value);
} else {
indexId_ = value;
}
} else {
indexIdBuilder_.mergeFrom(value);
}
if (indexId_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
* .aerospike.vector.IndexId indexId = 1;
*/
public Builder clearIndexId() {
bitField0_ = (bitField0_ & ~0x00000001);
indexId_ = null;
if (indexIdBuilder_ != null) {
indexIdBuilder_.dispose();
indexIdBuilder_ = null;
}
onChanged();
return this;
}
/**
* .aerospike.vector.IndexId indexId = 1;
*/
public com.aerospike.vector.client.proto.IndexId.Builder getIndexIdBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getIndexIdFieldBuilder().getBuilder();
}
/**
* .aerospike.vector.IndexId indexId = 1;
*/
public com.aerospike.vector.client.proto.IndexIdOrBuilder getIndexIdOrBuilder() {
if (indexIdBuilder_ != null) {
return indexIdBuilder_.getMessageOrBuilder();
} else {
return indexId_ == null ?
com.aerospike.vector.client.proto.IndexId.getDefaultInstance() : indexId_;
}
}
/**
* .aerospike.vector.IndexId indexId = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.aerospike.vector.client.proto.IndexId, com.aerospike.vector.client.proto.IndexId.Builder, com.aerospike.vector.client.proto.IndexIdOrBuilder>
getIndexIdFieldBuilder() {
if (indexIdBuilder_ == null) {
indexIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.aerospike.vector.client.proto.IndexId, com.aerospike.vector.client.proto.IndexId.Builder, com.aerospike.vector.client.proto.IndexIdOrBuilder>(
getIndexId(),
getParentForChildren(),
isClean());
indexId_ = null;
}
return indexIdBuilder_;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private com.google.protobuf.MapField
internalGetMutableLabels() {
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
bitField0_ |= 0x00000002;
onChanged();
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* Optional labels associated with the index.
*
*
* map<string, string> labels = 2;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* Optional labels associated with the index.
*
*
* map<string, string> labels = 2;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* Optional labels associated with the index.
*
*
* map<string, string> labels = 2;
*/
@java.lang.Override
public /* nullable */
java.lang.String getLabelsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Optional labels associated with the index.
*
*
* map<string, string> labels = 2;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearLabels() {
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableLabels().getMutableMap()
.clear();
return this;
}
/**
*
* Optional labels associated with the index.
*
*
* map<string, string> labels = 2;
*/
public Builder removeLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableLabels().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableLabels() {
bitField0_ |= 0x00000002;
return internalGetMutableLabels().getMutableMap();
}
/**
*
* Optional labels associated with the index.
*
*
* map<string, string> labels = 2;
*/
public Builder putLabels(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableLabels().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
*
* Optional labels associated with the index.
*
*
* map<string, string> labels = 2;
*/
public Builder putAllLabels(
java.util.Map values) {
internalGetMutableLabels().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000002;
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.aerospike.vector.client.proto.HnswIndexUpdate, com.aerospike.vector.client.proto.HnswIndexUpdate.Builder, com.aerospike.vector.client.proto.HnswIndexUpdateOrBuilder> hnswIndexUpdateBuilder_;
/**
* .aerospike.vector.HnswIndexUpdate hnswIndexUpdate = 3;
* @return Whether the hnswIndexUpdate field is set.
*/
@java.lang.Override
public boolean hasHnswIndexUpdate() {
return updateCase_ == 3;
}
/**
* .aerospike.vector.HnswIndexUpdate hnswIndexUpdate = 3;
* @return The hnswIndexUpdate.
*/
@java.lang.Override
public com.aerospike.vector.client.proto.HnswIndexUpdate getHnswIndexUpdate() {
if (hnswIndexUpdateBuilder_ == null) {
if (updateCase_ == 3) {
return (com.aerospike.vector.client.proto.HnswIndexUpdate) update_;
}
return com.aerospike.vector.client.proto.HnswIndexUpdate.getDefaultInstance();
} else {
if (updateCase_ == 3) {
return hnswIndexUpdateBuilder_.getMessage();
}
return com.aerospike.vector.client.proto.HnswIndexUpdate.getDefaultInstance();
}
}
/**
* .aerospike.vector.HnswIndexUpdate hnswIndexUpdate = 3;
*/
public Builder setHnswIndexUpdate(com.aerospike.vector.client.proto.HnswIndexUpdate value) {
if (hnswIndexUpdateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
update_ = value;
onChanged();
} else {
hnswIndexUpdateBuilder_.setMessage(value);
}
updateCase_ = 3;
return this;
}
/**
* .aerospike.vector.HnswIndexUpdate hnswIndexUpdate = 3;
*/
public Builder setHnswIndexUpdate(
com.aerospike.vector.client.proto.HnswIndexUpdate.Builder builderForValue) {
if (hnswIndexUpdateBuilder_ == null) {
update_ = builderForValue.build();
onChanged();
} else {
hnswIndexUpdateBuilder_.setMessage(builderForValue.build());
}
updateCase_ = 3;
return this;
}
/**
* .aerospike.vector.HnswIndexUpdate hnswIndexUpdate = 3;
*/
public Builder mergeHnswIndexUpdate(com.aerospike.vector.client.proto.HnswIndexUpdate value) {
if (hnswIndexUpdateBuilder_ == null) {
if (updateCase_ == 3 &&
update_ != com.aerospike.vector.client.proto.HnswIndexUpdate.getDefaultInstance()) {
update_ = com.aerospike.vector.client.proto.HnswIndexUpdate.newBuilder((com.aerospike.vector.client.proto.HnswIndexUpdate) update_)
.mergeFrom(value).buildPartial();
} else {
update_ = value;
}
onChanged();
} else {
if (updateCase_ == 3) {
hnswIndexUpdateBuilder_.mergeFrom(value);
} else {
hnswIndexUpdateBuilder_.setMessage(value);
}
}
updateCase_ = 3;
return this;
}
/**
* .aerospike.vector.HnswIndexUpdate hnswIndexUpdate = 3;
*/
public Builder clearHnswIndexUpdate() {
if (hnswIndexUpdateBuilder_ == null) {
if (updateCase_ == 3) {
updateCase_ = 0;
update_ = null;
onChanged();
}
} else {
if (updateCase_ == 3) {
updateCase_ = 0;
update_ = null;
}
hnswIndexUpdateBuilder_.clear();
}
return this;
}
/**
* .aerospike.vector.HnswIndexUpdate hnswIndexUpdate = 3;
*/
public com.aerospike.vector.client.proto.HnswIndexUpdate.Builder getHnswIndexUpdateBuilder() {
return getHnswIndexUpdateFieldBuilder().getBuilder();
}
/**
* .aerospike.vector.HnswIndexUpdate hnswIndexUpdate = 3;
*/
@java.lang.Override
public com.aerospike.vector.client.proto.HnswIndexUpdateOrBuilder getHnswIndexUpdateOrBuilder() {
if ((updateCase_ == 3) && (hnswIndexUpdateBuilder_ != null)) {
return hnswIndexUpdateBuilder_.getMessageOrBuilder();
} else {
if (updateCase_ == 3) {
return (com.aerospike.vector.client.proto.HnswIndexUpdate) update_;
}
return com.aerospike.vector.client.proto.HnswIndexUpdate.getDefaultInstance();
}
}
/**
* .aerospike.vector.HnswIndexUpdate hnswIndexUpdate = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.aerospike.vector.client.proto.HnswIndexUpdate, com.aerospike.vector.client.proto.HnswIndexUpdate.Builder, com.aerospike.vector.client.proto.HnswIndexUpdateOrBuilder>
getHnswIndexUpdateFieldBuilder() {
if (hnswIndexUpdateBuilder_ == null) {
if (!(updateCase_ == 3)) {
update_ = com.aerospike.vector.client.proto.HnswIndexUpdate.getDefaultInstance();
}
hnswIndexUpdateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.aerospike.vector.client.proto.HnswIndexUpdate, com.aerospike.vector.client.proto.HnswIndexUpdate.Builder, com.aerospike.vector.client.proto.HnswIndexUpdateOrBuilder>(
(com.aerospike.vector.client.proto.HnswIndexUpdate) update_,
getParentForChildren(),
isClean());
update_ = null;
}
updateCase_ = 3;
onChanged();
return hnswIndexUpdateBuilder_;
}
@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:aerospike.vector.IndexUpdateRequest)
}
// @@protoc_insertion_point(class_scope:aerospike.vector.IndexUpdateRequest)
private static final com.aerospike.vector.client.proto.IndexUpdateRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.aerospike.vector.client.proto.IndexUpdateRequest();
}
public static com.aerospike.vector.client.proto.IndexUpdateRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public IndexUpdateRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.aerospike.vector.client.proto.IndexUpdateRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy