grpc.vectorindex._SearchAndFetchVectorsHit Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client-protos-jvm Show documentation
Show all versions of client-protos-jvm Show documentation
Kotlin protobuf protocols for the JVM that define the Momento gRPC wire format
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: vectorindex.proto
package grpc.vectorindex;
/**
* Protobuf type {@code vectorindex._SearchAndFetchVectorsHit}
*/
public final class _SearchAndFetchVectorsHit extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:vectorindex._SearchAndFetchVectorsHit)
_SearchAndFetchVectorsHitOrBuilder {
private static final long serialVersionUID = 0L;
// Use _SearchAndFetchVectorsHit.newBuilder() to construct.
private _SearchAndFetchVectorsHit(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private _SearchAndFetchVectorsHit() {
id_ = "";
metadata_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new _SearchAndFetchVectorsHit();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.vectorindex.Vectorindex.internal_static_vectorindex__SearchAndFetchVectorsHit_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.vectorindex.Vectorindex.internal_static_vectorindex__SearchAndFetchVectorsHit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.vectorindex._SearchAndFetchVectorsHit.class, grpc.vectorindex._SearchAndFetchVectorsHit.Builder.class);
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
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();
id_ = s;
return s;
}
}
/**
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SCORE_FIELD_NUMBER = 2;
private float score_ = 0F;
/**
* float score = 2;
* @return The score.
*/
@java.lang.Override
public float getScore() {
return score_;
}
public static final int METADATA_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List metadata_;
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
@java.lang.Override
public java.util.List getMetadataList() {
return metadata_;
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
@java.lang.Override
public java.util.List extends grpc.vectorindex._MetadataOrBuilder>
getMetadataOrBuilderList() {
return metadata_;
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
@java.lang.Override
public int getMetadataCount() {
return metadata_.size();
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
@java.lang.Override
public grpc.vectorindex._Metadata getMetadata(int index) {
return metadata_.get(index);
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
@java.lang.Override
public grpc.vectorindex._MetadataOrBuilder getMetadataOrBuilder(
int index) {
return metadata_.get(index);
}
public static final int VECTOR_FIELD_NUMBER = 4;
private grpc.vectorindex._Vector vector_;
/**
* .vectorindex._Vector vector = 4;
* @return Whether the vector field is set.
*/
@java.lang.Override
public boolean hasVector() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .vectorindex._Vector vector = 4;
* @return The vector.
*/
@java.lang.Override
public grpc.vectorindex._Vector getVector() {
return vector_ == null ? grpc.vectorindex._Vector.getDefaultInstance() : vector_;
}
/**
* .vectorindex._Vector vector = 4;
*/
@java.lang.Override
public grpc.vectorindex._VectorOrBuilder getVectorOrBuilder() {
return vector_ == null ? grpc.vectorindex._Vector.getDefaultInstance() : vector_;
}
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(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (java.lang.Float.floatToRawIntBits(score_) != 0) {
output.writeFloat(2, score_);
}
for (int i = 0; i < metadata_.size(); i++) {
output.writeMessage(3, metadata_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getVector());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (java.lang.Float.floatToRawIntBits(score_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(2, score_);
}
for (int i = 0; i < metadata_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, metadata_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getVector());
}
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 grpc.vectorindex._SearchAndFetchVectorsHit)) {
return super.equals(obj);
}
grpc.vectorindex._SearchAndFetchVectorsHit other = (grpc.vectorindex._SearchAndFetchVectorsHit) obj;
if (!getId()
.equals(other.getId())) return false;
if (java.lang.Float.floatToIntBits(getScore())
!= java.lang.Float.floatToIntBits(
other.getScore())) return false;
if (!getMetadataList()
.equals(other.getMetadataList())) return false;
if (hasVector() != other.hasVector()) return false;
if (hasVector()) {
if (!getVector()
.equals(other.getVector())) return false;
}
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();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + SCORE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getScore());
if (getMetadataCount() > 0) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadataList().hashCode();
}
if (hasVector()) {
hash = (37 * hash) + VECTOR_FIELD_NUMBER;
hash = (53 * hash) + getVector().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.vectorindex._SearchAndFetchVectorsHit parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.vectorindex._SearchAndFetchVectorsHit parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.vectorindex._SearchAndFetchVectorsHit parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.vectorindex._SearchAndFetchVectorsHit parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.vectorindex._SearchAndFetchVectorsHit parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.vectorindex._SearchAndFetchVectorsHit parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.vectorindex._SearchAndFetchVectorsHit parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.vectorindex._SearchAndFetchVectorsHit 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 grpc.vectorindex._SearchAndFetchVectorsHit parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.vectorindex._SearchAndFetchVectorsHit 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 grpc.vectorindex._SearchAndFetchVectorsHit parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.vectorindex._SearchAndFetchVectorsHit 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(grpc.vectorindex._SearchAndFetchVectorsHit 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 vectorindex._SearchAndFetchVectorsHit}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:vectorindex._SearchAndFetchVectorsHit)
grpc.vectorindex._SearchAndFetchVectorsHitOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.vectorindex.Vectorindex.internal_static_vectorindex__SearchAndFetchVectorsHit_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.vectorindex.Vectorindex.internal_static_vectorindex__SearchAndFetchVectorsHit_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.vectorindex._SearchAndFetchVectorsHit.class, grpc.vectorindex._SearchAndFetchVectorsHit.Builder.class);
}
// Construct using grpc.vectorindex._SearchAndFetchVectorsHit.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getMetadataFieldBuilder();
getVectorFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
score_ = 0F;
if (metadataBuilder_ == null) {
metadata_ = java.util.Collections.emptyList();
} else {
metadata_ = null;
metadataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
vector_ = null;
if (vectorBuilder_ != null) {
vectorBuilder_.dispose();
vectorBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.vectorindex.Vectorindex.internal_static_vectorindex__SearchAndFetchVectorsHit_descriptor;
}
@java.lang.Override
public grpc.vectorindex._SearchAndFetchVectorsHit getDefaultInstanceForType() {
return grpc.vectorindex._SearchAndFetchVectorsHit.getDefaultInstance();
}
@java.lang.Override
public grpc.vectorindex._SearchAndFetchVectorsHit build() {
grpc.vectorindex._SearchAndFetchVectorsHit result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.vectorindex._SearchAndFetchVectorsHit buildPartial() {
grpc.vectorindex._SearchAndFetchVectorsHit result = new grpc.vectorindex._SearchAndFetchVectorsHit(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(grpc.vectorindex._SearchAndFetchVectorsHit result) {
if (metadataBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
metadata_ = java.util.Collections.unmodifiableList(metadata_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.metadata_ = metadata_;
} else {
result.metadata_ = metadataBuilder_.build();
}
}
private void buildPartial0(grpc.vectorindex._SearchAndFetchVectorsHit result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.score_ = score_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.vector_ = vectorBuilder_ == null
? vector_
: vectorBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@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 grpc.vectorindex._SearchAndFetchVectorsHit) {
return mergeFrom((grpc.vectorindex._SearchAndFetchVectorsHit)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.vectorindex._SearchAndFetchVectorsHit other) {
if (other == grpc.vectorindex._SearchAndFetchVectorsHit.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.getScore() != 0F) {
setScore(other.getScore());
}
if (metadataBuilder_ == null) {
if (!other.metadata_.isEmpty()) {
if (metadata_.isEmpty()) {
metadata_ = other.metadata_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureMetadataIsMutable();
metadata_.addAll(other.metadata_);
}
onChanged();
}
} else {
if (!other.metadata_.isEmpty()) {
if (metadataBuilder_.isEmpty()) {
metadataBuilder_.dispose();
metadataBuilder_ = null;
metadata_ = other.metadata_;
bitField0_ = (bitField0_ & ~0x00000004);
metadataBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getMetadataFieldBuilder() : null;
} else {
metadataBuilder_.addAllMessages(other.metadata_);
}
}
}
if (other.hasVector()) {
mergeVector(other.getVector());
}
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: {
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 21: {
score_ = input.readFloat();
bitField0_ |= 0x00000002;
break;
} // case 21
case 26: {
grpc.vectorindex._Metadata m =
input.readMessage(
grpc.vectorindex._Metadata.parser(),
extensionRegistry);
if (metadataBuilder_ == null) {
ensureMetadataIsMutable();
metadata_.add(m);
} else {
metadataBuilder_.addMessage(m);
}
break;
} // case 26
case 34: {
input.readMessage(
getVectorFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
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 bitField0_;
private java.lang.Object id_ = "";
/**
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private float score_ ;
/**
* float score = 2;
* @return The score.
*/
@java.lang.Override
public float getScore() {
return score_;
}
/**
* float score = 2;
* @param value The score to set.
* @return This builder for chaining.
*/
public Builder setScore(float value) {
score_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* float score = 2;
* @return This builder for chaining.
*/
public Builder clearScore() {
bitField0_ = (bitField0_ & ~0x00000002);
score_ = 0F;
onChanged();
return this;
}
private java.util.List metadata_ =
java.util.Collections.emptyList();
private void ensureMetadataIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
metadata_ = new java.util.ArrayList(metadata_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
grpc.vectorindex._Metadata, grpc.vectorindex._Metadata.Builder, grpc.vectorindex._MetadataOrBuilder> metadataBuilder_;
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public java.util.List getMetadataList() {
if (metadataBuilder_ == null) {
return java.util.Collections.unmodifiableList(metadata_);
} else {
return metadataBuilder_.getMessageList();
}
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public int getMetadataCount() {
if (metadataBuilder_ == null) {
return metadata_.size();
} else {
return metadataBuilder_.getCount();
}
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public grpc.vectorindex._Metadata getMetadata(int index) {
if (metadataBuilder_ == null) {
return metadata_.get(index);
} else {
return metadataBuilder_.getMessage(index);
}
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public Builder setMetadata(
int index, grpc.vectorindex._Metadata value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMetadataIsMutable();
metadata_.set(index, value);
onChanged();
} else {
metadataBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public Builder setMetadata(
int index, grpc.vectorindex._Metadata.Builder builderForValue) {
if (metadataBuilder_ == null) {
ensureMetadataIsMutable();
metadata_.set(index, builderForValue.build());
onChanged();
} else {
metadataBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public Builder addMetadata(grpc.vectorindex._Metadata value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMetadataIsMutable();
metadata_.add(value);
onChanged();
} else {
metadataBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public Builder addMetadata(
int index, grpc.vectorindex._Metadata value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMetadataIsMutable();
metadata_.add(index, value);
onChanged();
} else {
metadataBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public Builder addMetadata(
grpc.vectorindex._Metadata.Builder builderForValue) {
if (metadataBuilder_ == null) {
ensureMetadataIsMutable();
metadata_.add(builderForValue.build());
onChanged();
} else {
metadataBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public Builder addMetadata(
int index, grpc.vectorindex._Metadata.Builder builderForValue) {
if (metadataBuilder_ == null) {
ensureMetadataIsMutable();
metadata_.add(index, builderForValue.build());
onChanged();
} else {
metadataBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public Builder addAllMetadata(
java.lang.Iterable extends grpc.vectorindex._Metadata> values) {
if (metadataBuilder_ == null) {
ensureMetadataIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, metadata_);
onChanged();
} else {
metadataBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public Builder clearMetadata() {
if (metadataBuilder_ == null) {
metadata_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
metadataBuilder_.clear();
}
return this;
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public Builder removeMetadata(int index) {
if (metadataBuilder_ == null) {
ensureMetadataIsMutable();
metadata_.remove(index);
onChanged();
} else {
metadataBuilder_.remove(index);
}
return this;
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public grpc.vectorindex._Metadata.Builder getMetadataBuilder(
int index) {
return getMetadataFieldBuilder().getBuilder(index);
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public grpc.vectorindex._MetadataOrBuilder getMetadataOrBuilder(
int index) {
if (metadataBuilder_ == null) {
return metadata_.get(index); } else {
return metadataBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public java.util.List extends grpc.vectorindex._MetadataOrBuilder>
getMetadataOrBuilderList() {
if (metadataBuilder_ != null) {
return metadataBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(metadata_);
}
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public grpc.vectorindex._Metadata.Builder addMetadataBuilder() {
return getMetadataFieldBuilder().addBuilder(
grpc.vectorindex._Metadata.getDefaultInstance());
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public grpc.vectorindex._Metadata.Builder addMetadataBuilder(
int index) {
return getMetadataFieldBuilder().addBuilder(
index, grpc.vectorindex._Metadata.getDefaultInstance());
}
/**
* repeated .vectorindex._Metadata metadata = 3;
*/
public java.util.List
getMetadataBuilderList() {
return getMetadataFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
grpc.vectorindex._Metadata, grpc.vectorindex._Metadata.Builder, grpc.vectorindex._MetadataOrBuilder>
getMetadataFieldBuilder() {
if (metadataBuilder_ == null) {
metadataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
grpc.vectorindex._Metadata, grpc.vectorindex._Metadata.Builder, grpc.vectorindex._MetadataOrBuilder>(
metadata_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
metadata_ = null;
}
return metadataBuilder_;
}
private grpc.vectorindex._Vector vector_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.vectorindex._Vector, grpc.vectorindex._Vector.Builder, grpc.vectorindex._VectorOrBuilder> vectorBuilder_;
/**
* .vectorindex._Vector vector = 4;
* @return Whether the vector field is set.
*/
public boolean hasVector() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* .vectorindex._Vector vector = 4;
* @return The vector.
*/
public grpc.vectorindex._Vector getVector() {
if (vectorBuilder_ == null) {
return vector_ == null ? grpc.vectorindex._Vector.getDefaultInstance() : vector_;
} else {
return vectorBuilder_.getMessage();
}
}
/**
* .vectorindex._Vector vector = 4;
*/
public Builder setVector(grpc.vectorindex._Vector value) {
if (vectorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
vector_ = value;
} else {
vectorBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* .vectorindex._Vector vector = 4;
*/
public Builder setVector(
grpc.vectorindex._Vector.Builder builderForValue) {
if (vectorBuilder_ == null) {
vector_ = builderForValue.build();
} else {
vectorBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* .vectorindex._Vector vector = 4;
*/
public Builder mergeVector(grpc.vectorindex._Vector value) {
if (vectorBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
vector_ != null &&
vector_ != grpc.vectorindex._Vector.getDefaultInstance()) {
getVectorBuilder().mergeFrom(value);
} else {
vector_ = value;
}
} else {
vectorBuilder_.mergeFrom(value);
}
if (vector_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
* .vectorindex._Vector vector = 4;
*/
public Builder clearVector() {
bitField0_ = (bitField0_ & ~0x00000008);
vector_ = null;
if (vectorBuilder_ != null) {
vectorBuilder_.dispose();
vectorBuilder_ = null;
}
onChanged();
return this;
}
/**
* .vectorindex._Vector vector = 4;
*/
public grpc.vectorindex._Vector.Builder getVectorBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getVectorFieldBuilder().getBuilder();
}
/**
* .vectorindex._Vector vector = 4;
*/
public grpc.vectorindex._VectorOrBuilder getVectorOrBuilder() {
if (vectorBuilder_ != null) {
return vectorBuilder_.getMessageOrBuilder();
} else {
return vector_ == null ?
grpc.vectorindex._Vector.getDefaultInstance() : vector_;
}
}
/**
* .vectorindex._Vector vector = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.vectorindex._Vector, grpc.vectorindex._Vector.Builder, grpc.vectorindex._VectorOrBuilder>
getVectorFieldBuilder() {
if (vectorBuilder_ == null) {
vectorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.vectorindex._Vector, grpc.vectorindex._Vector.Builder, grpc.vectorindex._VectorOrBuilder>(
getVector(),
getParentForChildren(),
isClean());
vector_ = null;
}
return vectorBuilder_;
}
@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:vectorindex._SearchAndFetchVectorsHit)
}
// @@protoc_insertion_point(class_scope:vectorindex._SearchAndFetchVectorsHit)
private static final grpc.vectorindex._SearchAndFetchVectorsHit DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.vectorindex._SearchAndFetchVectorsHit();
}
public static grpc.vectorindex._SearchAndFetchVectorsHit getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<_SearchAndFetchVectorsHit>
PARSER = new com.google.protobuf.AbstractParser<_SearchAndFetchVectorsHit>() {
@java.lang.Override
public _SearchAndFetchVectorsHit 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<_SearchAndFetchVectorsHit> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<_SearchAndFetchVectorsHit> getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.vectorindex._SearchAndFetchVectorsHit getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy