io.milvus.grpc.SearchResultData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of milvus-sdk-java Show documentation
Show all versions of milvus-sdk-java Show documentation
Java SDK for Milvus, a distributed high-performance vector search engine.
update grpc to 1.42.1
update protobuf to 3.19.1
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: schema.proto
package io.milvus.grpc;
/**
* Protobuf type {@code milvus.proto.schema.SearchResultData}
*/
public final class SearchResultData extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:milvus.proto.schema.SearchResultData)
SearchResultDataOrBuilder {
private static final long serialVersionUID = 0L;
// Use SearchResultData.newBuilder() to construct.
private SearchResultData(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SearchResultData() {
fieldsData_ = java.util.Collections.emptyList();
scores_ = emptyFloatList();
topks_ = emptyLongList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SearchResultData();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SearchResultData(
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 8: {
numQueries_ = input.readInt64();
break;
}
case 16: {
topK_ = input.readInt64();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
fieldsData_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
fieldsData_.add(
input.readMessage(io.milvus.grpc.FieldData.parser(), extensionRegistry));
break;
}
case 37: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
scores_ = newFloatList();
mutable_bitField0_ |= 0x00000002;
}
scores_.addFloat(input.readFloat());
break;
}
case 34: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
scores_ = newFloatList();
mutable_bitField0_ |= 0x00000002;
}
while (input.getBytesUntilLimit() > 0) {
scores_.addFloat(input.readFloat());
}
input.popLimit(limit);
break;
}
case 42: {
io.milvus.grpc.IDs.Builder subBuilder = null;
if (ids_ != null) {
subBuilder = ids_.toBuilder();
}
ids_ = input.readMessage(io.milvus.grpc.IDs.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(ids_);
ids_ = subBuilder.buildPartial();
}
break;
}
case 48: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
topks_ = newLongList();
mutable_bitField0_ |= 0x00000004;
}
topks_.addLong(input.readInt64());
break;
}
case 50: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
topks_ = newLongList();
mutable_bitField0_ |= 0x00000004;
}
while (input.getBytesUntilLimit() > 0) {
topks_.addLong(input.readInt64());
}
input.popLimit(limit);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
fieldsData_ = java.util.Collections.unmodifiableList(fieldsData_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
scores_.makeImmutable(); // C
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
topks_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.milvus.grpc.SchemaProto.internal_static_milvus_proto_schema_SearchResultData_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.milvus.grpc.SchemaProto.internal_static_milvus_proto_schema_SearchResultData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.milvus.grpc.SearchResultData.class, io.milvus.grpc.SearchResultData.Builder.class);
}
public static final int NUM_QUERIES_FIELD_NUMBER = 1;
private long numQueries_;
/**
* int64 num_queries = 1;
* @return The numQueries.
*/
@java.lang.Override
public long getNumQueries() {
return numQueries_;
}
public static final int TOP_K_FIELD_NUMBER = 2;
private long topK_;
/**
* int64 top_k = 2;
* @return The topK.
*/
@java.lang.Override
public long getTopK() {
return topK_;
}
public static final int FIELDS_DATA_FIELD_NUMBER = 3;
private java.util.List fieldsData_;
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
@java.lang.Override
public java.util.List getFieldsDataList() {
return fieldsData_;
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
@java.lang.Override
public java.util.List extends io.milvus.grpc.FieldDataOrBuilder>
getFieldsDataOrBuilderList() {
return fieldsData_;
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
@java.lang.Override
public int getFieldsDataCount() {
return fieldsData_.size();
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
@java.lang.Override
public io.milvus.grpc.FieldData getFieldsData(int index) {
return fieldsData_.get(index);
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
@java.lang.Override
public io.milvus.grpc.FieldDataOrBuilder getFieldsDataOrBuilder(
int index) {
return fieldsData_.get(index);
}
public static final int SCORES_FIELD_NUMBER = 4;
private com.google.protobuf.Internal.FloatList scores_;
/**
* repeated float scores = 4;
* @return A list containing the scores.
*/
@java.lang.Override
public java.util.List
getScoresList() {
return scores_;
}
/**
* repeated float scores = 4;
* @return The count of scores.
*/
public int getScoresCount() {
return scores_.size();
}
/**
* repeated float scores = 4;
* @param index The index of the element to return.
* @return The scores at the given index.
*/
public float getScores(int index) {
return scores_.getFloat(index);
}
private int scoresMemoizedSerializedSize = -1;
public static final int IDS_FIELD_NUMBER = 5;
private io.milvus.grpc.IDs ids_;
/**
* .milvus.proto.schema.IDs ids = 5;
* @return Whether the ids field is set.
*/
@java.lang.Override
public boolean hasIds() {
return ids_ != null;
}
/**
* .milvus.proto.schema.IDs ids = 5;
* @return The ids.
*/
@java.lang.Override
public io.milvus.grpc.IDs getIds() {
return ids_ == null ? io.milvus.grpc.IDs.getDefaultInstance() : ids_;
}
/**
* .milvus.proto.schema.IDs ids = 5;
*/
@java.lang.Override
public io.milvus.grpc.IDsOrBuilder getIdsOrBuilder() {
return getIds();
}
public static final int TOPKS_FIELD_NUMBER = 6;
private com.google.protobuf.Internal.LongList topks_;
/**
* repeated int64 topks = 6;
* @return A list containing the topks.
*/
@java.lang.Override
public java.util.List
getTopksList() {
return topks_;
}
/**
* repeated int64 topks = 6;
* @return The count of topks.
*/
public int getTopksCount() {
return topks_.size();
}
/**
* repeated int64 topks = 6;
* @param index The index of the element to return.
* @return The topks at the given index.
*/
public long getTopks(int index) {
return topks_.getLong(index);
}
private int topksMemoizedSerializedSize = -1;
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 (numQueries_ != 0L) {
output.writeInt64(1, numQueries_);
}
if (topK_ != 0L) {
output.writeInt64(2, topK_);
}
for (int i = 0; i < fieldsData_.size(); i++) {
output.writeMessage(3, fieldsData_.get(i));
}
if (getScoresList().size() > 0) {
output.writeUInt32NoTag(34);
output.writeUInt32NoTag(scoresMemoizedSerializedSize);
}
for (int i = 0; i < scores_.size(); i++) {
output.writeFloatNoTag(scores_.getFloat(i));
}
if (ids_ != null) {
output.writeMessage(5, getIds());
}
if (getTopksList().size() > 0) {
output.writeUInt32NoTag(50);
output.writeUInt32NoTag(topksMemoizedSerializedSize);
}
for (int i = 0; i < topks_.size(); i++) {
output.writeInt64NoTag(topks_.getLong(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (numQueries_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, numQueries_);
}
if (topK_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, topK_);
}
for (int i = 0; i < fieldsData_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, fieldsData_.get(i));
}
{
int dataSize = 0;
dataSize = 4 * getScoresList().size();
size += dataSize;
if (!getScoresList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
scoresMemoizedSerializedSize = dataSize;
}
if (ids_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getIds());
}
{
int dataSize = 0;
for (int i = 0; i < topks_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(topks_.getLong(i));
}
size += dataSize;
if (!getTopksList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
topksMemoizedSerializedSize = dataSize;
}
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 io.milvus.grpc.SearchResultData)) {
return super.equals(obj);
}
io.milvus.grpc.SearchResultData other = (io.milvus.grpc.SearchResultData) obj;
if (getNumQueries()
!= other.getNumQueries()) return false;
if (getTopK()
!= other.getTopK()) return false;
if (!getFieldsDataList()
.equals(other.getFieldsDataList())) return false;
if (!getScoresList()
.equals(other.getScoresList())) return false;
if (hasIds() != other.hasIds()) return false;
if (hasIds()) {
if (!getIds()
.equals(other.getIds())) return false;
}
if (!getTopksList()
.equals(other.getTopksList())) 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) + NUM_QUERIES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNumQueries());
hash = (37 * hash) + TOP_K_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTopK());
if (getFieldsDataCount() > 0) {
hash = (37 * hash) + FIELDS_DATA_FIELD_NUMBER;
hash = (53 * hash) + getFieldsDataList().hashCode();
}
if (getScoresCount() > 0) {
hash = (37 * hash) + SCORES_FIELD_NUMBER;
hash = (53 * hash) + getScoresList().hashCode();
}
if (hasIds()) {
hash = (37 * hash) + IDS_FIELD_NUMBER;
hash = (53 * hash) + getIds().hashCode();
}
if (getTopksCount() > 0) {
hash = (37 * hash) + TOPKS_FIELD_NUMBER;
hash = (53 * hash) + getTopksList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.milvus.grpc.SearchResultData parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.milvus.grpc.SearchResultData parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.milvus.grpc.SearchResultData parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.milvus.grpc.SearchResultData parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.milvus.grpc.SearchResultData parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.milvus.grpc.SearchResultData parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.milvus.grpc.SearchResultData parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.milvus.grpc.SearchResultData 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 io.milvus.grpc.SearchResultData parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.milvus.grpc.SearchResultData 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 io.milvus.grpc.SearchResultData parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.milvus.grpc.SearchResultData 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(io.milvus.grpc.SearchResultData 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 milvus.proto.schema.SearchResultData}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:milvus.proto.schema.SearchResultData)
io.milvus.grpc.SearchResultDataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.milvus.grpc.SchemaProto.internal_static_milvus_proto_schema_SearchResultData_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.milvus.grpc.SchemaProto.internal_static_milvus_proto_schema_SearchResultData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.milvus.grpc.SearchResultData.class, io.milvus.grpc.SearchResultData.Builder.class);
}
// Construct using io.milvus.grpc.SearchResultData.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getFieldsDataFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
numQueries_ = 0L;
topK_ = 0L;
if (fieldsDataBuilder_ == null) {
fieldsData_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
fieldsDataBuilder_.clear();
}
scores_ = emptyFloatList();
bitField0_ = (bitField0_ & ~0x00000002);
if (idsBuilder_ == null) {
ids_ = null;
} else {
ids_ = null;
idsBuilder_ = null;
}
topks_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.milvus.grpc.SchemaProto.internal_static_milvus_proto_schema_SearchResultData_descriptor;
}
@java.lang.Override
public io.milvus.grpc.SearchResultData getDefaultInstanceForType() {
return io.milvus.grpc.SearchResultData.getDefaultInstance();
}
@java.lang.Override
public io.milvus.grpc.SearchResultData build() {
io.milvus.grpc.SearchResultData result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.milvus.grpc.SearchResultData buildPartial() {
io.milvus.grpc.SearchResultData result = new io.milvus.grpc.SearchResultData(this);
int from_bitField0_ = bitField0_;
result.numQueries_ = numQueries_;
result.topK_ = topK_;
if (fieldsDataBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
fieldsData_ = java.util.Collections.unmodifiableList(fieldsData_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.fieldsData_ = fieldsData_;
} else {
result.fieldsData_ = fieldsDataBuilder_.build();
}
if (((bitField0_ & 0x00000002) != 0)) {
scores_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.scores_ = scores_;
if (idsBuilder_ == null) {
result.ids_ = ids_;
} else {
result.ids_ = idsBuilder_.build();
}
if (((bitField0_ & 0x00000004) != 0)) {
topks_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.topks_ = topks_;
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 io.milvus.grpc.SearchResultData) {
return mergeFrom((io.milvus.grpc.SearchResultData)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.milvus.grpc.SearchResultData other) {
if (other == io.milvus.grpc.SearchResultData.getDefaultInstance()) return this;
if (other.getNumQueries() != 0L) {
setNumQueries(other.getNumQueries());
}
if (other.getTopK() != 0L) {
setTopK(other.getTopK());
}
if (fieldsDataBuilder_ == null) {
if (!other.fieldsData_.isEmpty()) {
if (fieldsData_.isEmpty()) {
fieldsData_ = other.fieldsData_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureFieldsDataIsMutable();
fieldsData_.addAll(other.fieldsData_);
}
onChanged();
}
} else {
if (!other.fieldsData_.isEmpty()) {
if (fieldsDataBuilder_.isEmpty()) {
fieldsDataBuilder_.dispose();
fieldsDataBuilder_ = null;
fieldsData_ = other.fieldsData_;
bitField0_ = (bitField0_ & ~0x00000001);
fieldsDataBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFieldsDataFieldBuilder() : null;
} else {
fieldsDataBuilder_.addAllMessages(other.fieldsData_);
}
}
}
if (!other.scores_.isEmpty()) {
if (scores_.isEmpty()) {
scores_ = other.scores_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureScoresIsMutable();
scores_.addAll(other.scores_);
}
onChanged();
}
if (other.hasIds()) {
mergeIds(other.getIds());
}
if (!other.topks_.isEmpty()) {
if (topks_.isEmpty()) {
topks_ = other.topks_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureTopksIsMutable();
topks_.addAll(other.topks_);
}
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 {
io.milvus.grpc.SearchResultData parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.milvus.grpc.SearchResultData) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long numQueries_ ;
/**
* int64 num_queries = 1;
* @return The numQueries.
*/
@java.lang.Override
public long getNumQueries() {
return numQueries_;
}
/**
* int64 num_queries = 1;
* @param value The numQueries to set.
* @return This builder for chaining.
*/
public Builder setNumQueries(long value) {
numQueries_ = value;
onChanged();
return this;
}
/**
* int64 num_queries = 1;
* @return This builder for chaining.
*/
public Builder clearNumQueries() {
numQueries_ = 0L;
onChanged();
return this;
}
private long topK_ ;
/**
* int64 top_k = 2;
* @return The topK.
*/
@java.lang.Override
public long getTopK() {
return topK_;
}
/**
* int64 top_k = 2;
* @param value The topK to set.
* @return This builder for chaining.
*/
public Builder setTopK(long value) {
topK_ = value;
onChanged();
return this;
}
/**
* int64 top_k = 2;
* @return This builder for chaining.
*/
public Builder clearTopK() {
topK_ = 0L;
onChanged();
return this;
}
private java.util.List fieldsData_ =
java.util.Collections.emptyList();
private void ensureFieldsDataIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
fieldsData_ = new java.util.ArrayList(fieldsData_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.milvus.grpc.FieldData, io.milvus.grpc.FieldData.Builder, io.milvus.grpc.FieldDataOrBuilder> fieldsDataBuilder_;
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public java.util.List getFieldsDataList() {
if (fieldsDataBuilder_ == null) {
return java.util.Collections.unmodifiableList(fieldsData_);
} else {
return fieldsDataBuilder_.getMessageList();
}
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public int getFieldsDataCount() {
if (fieldsDataBuilder_ == null) {
return fieldsData_.size();
} else {
return fieldsDataBuilder_.getCount();
}
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public io.milvus.grpc.FieldData getFieldsData(int index) {
if (fieldsDataBuilder_ == null) {
return fieldsData_.get(index);
} else {
return fieldsDataBuilder_.getMessage(index);
}
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public Builder setFieldsData(
int index, io.milvus.grpc.FieldData value) {
if (fieldsDataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsDataIsMutable();
fieldsData_.set(index, value);
onChanged();
} else {
fieldsDataBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public Builder setFieldsData(
int index, io.milvus.grpc.FieldData.Builder builderForValue) {
if (fieldsDataBuilder_ == null) {
ensureFieldsDataIsMutable();
fieldsData_.set(index, builderForValue.build());
onChanged();
} else {
fieldsDataBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public Builder addFieldsData(io.milvus.grpc.FieldData value) {
if (fieldsDataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsDataIsMutable();
fieldsData_.add(value);
onChanged();
} else {
fieldsDataBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public Builder addFieldsData(
int index, io.milvus.grpc.FieldData value) {
if (fieldsDataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsDataIsMutable();
fieldsData_.add(index, value);
onChanged();
} else {
fieldsDataBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public Builder addFieldsData(
io.milvus.grpc.FieldData.Builder builderForValue) {
if (fieldsDataBuilder_ == null) {
ensureFieldsDataIsMutable();
fieldsData_.add(builderForValue.build());
onChanged();
} else {
fieldsDataBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public Builder addFieldsData(
int index, io.milvus.grpc.FieldData.Builder builderForValue) {
if (fieldsDataBuilder_ == null) {
ensureFieldsDataIsMutable();
fieldsData_.add(index, builderForValue.build());
onChanged();
} else {
fieldsDataBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public Builder addAllFieldsData(
java.lang.Iterable extends io.milvus.grpc.FieldData> values) {
if (fieldsDataBuilder_ == null) {
ensureFieldsDataIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, fieldsData_);
onChanged();
} else {
fieldsDataBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public Builder clearFieldsData() {
if (fieldsDataBuilder_ == null) {
fieldsData_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
fieldsDataBuilder_.clear();
}
return this;
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public Builder removeFieldsData(int index) {
if (fieldsDataBuilder_ == null) {
ensureFieldsDataIsMutable();
fieldsData_.remove(index);
onChanged();
} else {
fieldsDataBuilder_.remove(index);
}
return this;
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public io.milvus.grpc.FieldData.Builder getFieldsDataBuilder(
int index) {
return getFieldsDataFieldBuilder().getBuilder(index);
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public io.milvus.grpc.FieldDataOrBuilder getFieldsDataOrBuilder(
int index) {
if (fieldsDataBuilder_ == null) {
return fieldsData_.get(index); } else {
return fieldsDataBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public java.util.List extends io.milvus.grpc.FieldDataOrBuilder>
getFieldsDataOrBuilderList() {
if (fieldsDataBuilder_ != null) {
return fieldsDataBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(fieldsData_);
}
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public io.milvus.grpc.FieldData.Builder addFieldsDataBuilder() {
return getFieldsDataFieldBuilder().addBuilder(
io.milvus.grpc.FieldData.getDefaultInstance());
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public io.milvus.grpc.FieldData.Builder addFieldsDataBuilder(
int index) {
return getFieldsDataFieldBuilder().addBuilder(
index, io.milvus.grpc.FieldData.getDefaultInstance());
}
/**
* repeated .milvus.proto.schema.FieldData fields_data = 3;
*/
public java.util.List
getFieldsDataBuilderList() {
return getFieldsDataFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.milvus.grpc.FieldData, io.milvus.grpc.FieldData.Builder, io.milvus.grpc.FieldDataOrBuilder>
getFieldsDataFieldBuilder() {
if (fieldsDataBuilder_ == null) {
fieldsDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.milvus.grpc.FieldData, io.milvus.grpc.FieldData.Builder, io.milvus.grpc.FieldDataOrBuilder>(
fieldsData_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
fieldsData_ = null;
}
return fieldsDataBuilder_;
}
private com.google.protobuf.Internal.FloatList scores_ = emptyFloatList();
private void ensureScoresIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
scores_ = mutableCopy(scores_);
bitField0_ |= 0x00000002;
}
}
/**
* repeated float scores = 4;
* @return A list containing the scores.
*/
public java.util.List
getScoresList() {
return ((bitField0_ & 0x00000002) != 0) ?
java.util.Collections.unmodifiableList(scores_) : scores_;
}
/**
* repeated float scores = 4;
* @return The count of scores.
*/
public int getScoresCount() {
return scores_.size();
}
/**
* repeated float scores = 4;
* @param index The index of the element to return.
* @return The scores at the given index.
*/
public float getScores(int index) {
return scores_.getFloat(index);
}
/**
* repeated float scores = 4;
* @param index The index to set the value at.
* @param value The scores to set.
* @return This builder for chaining.
*/
public Builder setScores(
int index, float value) {
ensureScoresIsMutable();
scores_.setFloat(index, value);
onChanged();
return this;
}
/**
* repeated float scores = 4;
* @param value The scores to add.
* @return This builder for chaining.
*/
public Builder addScores(float value) {
ensureScoresIsMutable();
scores_.addFloat(value);
onChanged();
return this;
}
/**
* repeated float scores = 4;
* @param values The scores to add.
* @return This builder for chaining.
*/
public Builder addAllScores(
java.lang.Iterable extends java.lang.Float> values) {
ensureScoresIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, scores_);
onChanged();
return this;
}
/**
* repeated float scores = 4;
* @return This builder for chaining.
*/
public Builder clearScores() {
scores_ = emptyFloatList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
private io.milvus.grpc.IDs ids_;
private com.google.protobuf.SingleFieldBuilderV3<
io.milvus.grpc.IDs, io.milvus.grpc.IDs.Builder, io.milvus.grpc.IDsOrBuilder> idsBuilder_;
/**
* .milvus.proto.schema.IDs ids = 5;
* @return Whether the ids field is set.
*/
public boolean hasIds() {
return idsBuilder_ != null || ids_ != null;
}
/**
* .milvus.proto.schema.IDs ids = 5;
* @return The ids.
*/
public io.milvus.grpc.IDs getIds() {
if (idsBuilder_ == null) {
return ids_ == null ? io.milvus.grpc.IDs.getDefaultInstance() : ids_;
} else {
return idsBuilder_.getMessage();
}
}
/**
* .milvus.proto.schema.IDs ids = 5;
*/
public Builder setIds(io.milvus.grpc.IDs value) {
if (idsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ids_ = value;
onChanged();
} else {
idsBuilder_.setMessage(value);
}
return this;
}
/**
* .milvus.proto.schema.IDs ids = 5;
*/
public Builder setIds(
io.milvus.grpc.IDs.Builder builderForValue) {
if (idsBuilder_ == null) {
ids_ = builderForValue.build();
onChanged();
} else {
idsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .milvus.proto.schema.IDs ids = 5;
*/
public Builder mergeIds(io.milvus.grpc.IDs value) {
if (idsBuilder_ == null) {
if (ids_ != null) {
ids_ =
io.milvus.grpc.IDs.newBuilder(ids_).mergeFrom(value).buildPartial();
} else {
ids_ = value;
}
onChanged();
} else {
idsBuilder_.mergeFrom(value);
}
return this;
}
/**
* .milvus.proto.schema.IDs ids = 5;
*/
public Builder clearIds() {
if (idsBuilder_ == null) {
ids_ = null;
onChanged();
} else {
ids_ = null;
idsBuilder_ = null;
}
return this;
}
/**
* .milvus.proto.schema.IDs ids = 5;
*/
public io.milvus.grpc.IDs.Builder getIdsBuilder() {
onChanged();
return getIdsFieldBuilder().getBuilder();
}
/**
* .milvus.proto.schema.IDs ids = 5;
*/
public io.milvus.grpc.IDsOrBuilder getIdsOrBuilder() {
if (idsBuilder_ != null) {
return idsBuilder_.getMessageOrBuilder();
} else {
return ids_ == null ?
io.milvus.grpc.IDs.getDefaultInstance() : ids_;
}
}
/**
* .milvus.proto.schema.IDs ids = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.milvus.grpc.IDs, io.milvus.grpc.IDs.Builder, io.milvus.grpc.IDsOrBuilder>
getIdsFieldBuilder() {
if (idsBuilder_ == null) {
idsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.milvus.grpc.IDs, io.milvus.grpc.IDs.Builder, io.milvus.grpc.IDsOrBuilder>(
getIds(),
getParentForChildren(),
isClean());
ids_ = null;
}
return idsBuilder_;
}
private com.google.protobuf.Internal.LongList topks_ = emptyLongList();
private void ensureTopksIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
topks_ = mutableCopy(topks_);
bitField0_ |= 0x00000004;
}
}
/**
* repeated int64 topks = 6;
* @return A list containing the topks.
*/
public java.util.List
getTopksList() {
return ((bitField0_ & 0x00000004) != 0) ?
java.util.Collections.unmodifiableList(topks_) : topks_;
}
/**
* repeated int64 topks = 6;
* @return The count of topks.
*/
public int getTopksCount() {
return topks_.size();
}
/**
* repeated int64 topks = 6;
* @param index The index of the element to return.
* @return The topks at the given index.
*/
public long getTopks(int index) {
return topks_.getLong(index);
}
/**
* repeated int64 topks = 6;
* @param index The index to set the value at.
* @param value The topks to set.
* @return This builder for chaining.
*/
public Builder setTopks(
int index, long value) {
ensureTopksIsMutable();
topks_.setLong(index, value);
onChanged();
return this;
}
/**
* repeated int64 topks = 6;
* @param value The topks to add.
* @return This builder for chaining.
*/
public Builder addTopks(long value) {
ensureTopksIsMutable();
topks_.addLong(value);
onChanged();
return this;
}
/**
* repeated int64 topks = 6;
* @param values The topks to add.
* @return This builder for chaining.
*/
public Builder addAllTopks(
java.lang.Iterable extends java.lang.Long> values) {
ensureTopksIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, topks_);
onChanged();
return this;
}
/**
* repeated int64 topks = 6;
* @return This builder for chaining.
*/
public Builder clearTopks() {
topks_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000004);
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:milvus.proto.schema.SearchResultData)
}
// @@protoc_insertion_point(class_scope:milvus.proto.schema.SearchResultData)
private static final io.milvus.grpc.SearchResultData DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.milvus.grpc.SearchResultData();
}
public static io.milvus.grpc.SearchResultData getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SearchResultData parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SearchResultData(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 io.milvus.grpc.SearchResultData getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}