All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.milvus.grpc.Hits Maven / Gradle / Ivy

Go to download

Java SDK for Milvus, a distributed high-performance vector search engine. update grpc to 1.42.1 update protobuf to 3.19.1

There is a newer version: 2.2.2.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: milvus.proto

package io.milvus.grpc;

/**
 * Protobuf type {@code milvus.proto.milvus.Hits}
 */
public final class Hits extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:milvus.proto.milvus.Hits)
    HitsOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Hits.newBuilder() to construct.
  private Hits(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private Hits() {
    iDs_ = emptyLongList();
    rowData_ = java.util.Collections.emptyList();
    scores_ = emptyFloatList();
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new Hits();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private Hits(
      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: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              iDs_ = newLongList();
              mutable_bitField0_ |= 0x00000001;
            }
            iDs_.addLong(input.readInt64());
            break;
          }
          case 10: {
            int length = input.readRawVarint32();
            int limit = input.pushLimit(length);
            if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
              iDs_ = newLongList();
              mutable_bitField0_ |= 0x00000001;
            }
            while (input.getBytesUntilLimit() > 0) {
              iDs_.addLong(input.readInt64());
            }
            input.popLimit(limit);
            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000002) != 0)) {
              rowData_ = new java.util.ArrayList();
              mutable_bitField0_ |= 0x00000002;
            }
            rowData_.add(input.readBytes());
            break;
          }
          case 29: {
            if (!((mutable_bitField0_ & 0x00000004) != 0)) {
              scores_ = newFloatList();
              mutable_bitField0_ |= 0x00000004;
            }
            scores_.addFloat(input.readFloat());
            break;
          }
          case 26: {
            int length = input.readRawVarint32();
            int limit = input.pushLimit(length);
            if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
              scores_ = newFloatList();
              mutable_bitField0_ |= 0x00000004;
            }
            while (input.getBytesUntilLimit() > 0) {
              scores_.addFloat(input.readFloat());
            }
            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)) {
        iDs_.makeImmutable(); // C
      }
      if (((mutable_bitField0_ & 0x00000002) != 0)) {
        rowData_ = java.util.Collections.unmodifiableList(rowData_); // C
      }
      if (((mutable_bitField0_ & 0x00000004) != 0)) {
        scores_.makeImmutable(); // C
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.milvus.grpc.MilvusProto.internal_static_milvus_proto_milvus_Hits_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.milvus.grpc.MilvusProto.internal_static_milvus_proto_milvus_Hits_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.milvus.grpc.Hits.class, io.milvus.grpc.Hits.Builder.class);
  }

  public static final int IDS_FIELD_NUMBER = 1;
  private com.google.protobuf.Internal.LongList iDs_;
  /**
   * repeated int64 IDs = 1;
   * @return A list containing the iDs.
   */
  @java.lang.Override
  public java.util.List
      getIDsList() {
    return iDs_;
  }
  /**
   * repeated int64 IDs = 1;
   * @return The count of iDs.
   */
  public int getIDsCount() {
    return iDs_.size();
  }
  /**
   * repeated int64 IDs = 1;
   * @param index The index of the element to return.
   * @return The iDs at the given index.
   */
  public long getIDs(int index) {
    return iDs_.getLong(index);
  }
  private int iDsMemoizedSerializedSize = -1;

  public static final int ROW_DATA_FIELD_NUMBER = 2;
  private java.util.List rowData_;
  /**
   * repeated bytes row_data = 2;
   * @return A list containing the rowData.
   */
  @java.lang.Override
  public java.util.List
      getRowDataList() {
    return rowData_;
  }
  /**
   * repeated bytes row_data = 2;
   * @return The count of rowData.
   */
  public int getRowDataCount() {
    return rowData_.size();
  }
  /**
   * repeated bytes row_data = 2;
   * @param index The index of the element to return.
   * @return The rowData at the given index.
   */
  public com.google.protobuf.ByteString getRowData(int index) {
    return rowData_.get(index);
  }

  public static final int SCORES_FIELD_NUMBER = 3;
  private com.google.protobuf.Internal.FloatList scores_;
  /**
   * repeated float scores = 3;
   * @return A list containing the scores.
   */
  @java.lang.Override
  public java.util.List
      getScoresList() {
    return scores_;
  }
  /**
   * repeated float scores = 3;
   * @return The count of scores.
   */
  public int getScoresCount() {
    return scores_.size();
  }
  /**
   * repeated float scores = 3;
   * @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;

  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 (getIDsList().size() > 0) {
      output.writeUInt32NoTag(10);
      output.writeUInt32NoTag(iDsMemoizedSerializedSize);
    }
    for (int i = 0; i < iDs_.size(); i++) {
      output.writeInt64NoTag(iDs_.getLong(i));
    }
    for (int i = 0; i < rowData_.size(); i++) {
      output.writeBytes(2, rowData_.get(i));
    }
    if (getScoresList().size() > 0) {
      output.writeUInt32NoTag(26);
      output.writeUInt32NoTag(scoresMemoizedSerializedSize);
    }
    for (int i = 0; i < scores_.size(); i++) {
      output.writeFloatNoTag(scores_.getFloat(i));
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    {
      int dataSize = 0;
      for (int i = 0; i < iDs_.size(); i++) {
        dataSize += com.google.protobuf.CodedOutputStream
          .computeInt64SizeNoTag(iDs_.getLong(i));
      }
      size += dataSize;
      if (!getIDsList().isEmpty()) {
        size += 1;
        size += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(dataSize);
      }
      iDsMemoizedSerializedSize = dataSize;
    }
    {
      int dataSize = 0;
      for (int i = 0; i < rowData_.size(); i++) {
        dataSize += com.google.protobuf.CodedOutputStream
          .computeBytesSizeNoTag(rowData_.get(i));
      }
      size += dataSize;
      size += 1 * getRowDataList().size();
    }
    {
      int dataSize = 0;
      dataSize = 4 * getScoresList().size();
      size += dataSize;
      if (!getScoresList().isEmpty()) {
        size += 1;
        size += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(dataSize);
      }
      scoresMemoizedSerializedSize = 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.Hits)) {
      return super.equals(obj);
    }
    io.milvus.grpc.Hits other = (io.milvus.grpc.Hits) obj;

    if (!getIDsList()
        .equals(other.getIDsList())) return false;
    if (!getRowDataList()
        .equals(other.getRowDataList())) return false;
    if (!getScoresList()
        .equals(other.getScoresList())) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getIDsCount() > 0) {
      hash = (37 * hash) + IDS_FIELD_NUMBER;
      hash = (53 * hash) + getIDsList().hashCode();
    }
    if (getRowDataCount() > 0) {
      hash = (37 * hash) + ROW_DATA_FIELD_NUMBER;
      hash = (53 * hash) + getRowDataList().hashCode();
    }
    if (getScoresCount() > 0) {
      hash = (37 * hash) + SCORES_FIELD_NUMBER;
      hash = (53 * hash) + getScoresList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.milvus.grpc.Hits parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.milvus.grpc.Hits 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.Hits parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.milvus.grpc.Hits 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.Hits parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.milvus.grpc.Hits parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.milvus.grpc.Hits parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.milvus.grpc.Hits 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.Hits parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static io.milvus.grpc.Hits 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.Hits parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.milvus.grpc.Hits 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.Hits 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.milvus.Hits}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:milvus.proto.milvus.Hits)
      io.milvus.grpc.HitsOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.milvus.grpc.MilvusProto.internal_static_milvus_proto_milvus_Hits_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.milvus.grpc.MilvusProto.internal_static_milvus_proto_milvus_Hits_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.milvus.grpc.Hits.class, io.milvus.grpc.Hits.Builder.class);
    }

    // Construct using io.milvus.grpc.Hits.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      iDs_ = emptyLongList();
      bitField0_ = (bitField0_ & ~0x00000001);
      rowData_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000002);
      scores_ = emptyFloatList();
      bitField0_ = (bitField0_ & ~0x00000004);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return io.milvus.grpc.MilvusProto.internal_static_milvus_proto_milvus_Hits_descriptor;
    }

    @java.lang.Override
    public io.milvus.grpc.Hits getDefaultInstanceForType() {
      return io.milvus.grpc.Hits.getDefaultInstance();
    }

    @java.lang.Override
    public io.milvus.grpc.Hits build() {
      io.milvus.grpc.Hits result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public io.milvus.grpc.Hits buildPartial() {
      io.milvus.grpc.Hits result = new io.milvus.grpc.Hits(this);
      int from_bitField0_ = bitField0_;
      if (((bitField0_ & 0x00000001) != 0)) {
        iDs_.makeImmutable();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.iDs_ = iDs_;
      if (((bitField0_ & 0x00000002) != 0)) {
        rowData_ = java.util.Collections.unmodifiableList(rowData_);
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.rowData_ = rowData_;
      if (((bitField0_ & 0x00000004) != 0)) {
        scores_.makeImmutable();
        bitField0_ = (bitField0_ & ~0x00000004);
      }
      result.scores_ = scores_;
      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.Hits) {
        return mergeFrom((io.milvus.grpc.Hits)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.milvus.grpc.Hits other) {
      if (other == io.milvus.grpc.Hits.getDefaultInstance()) return this;
      if (!other.iDs_.isEmpty()) {
        if (iDs_.isEmpty()) {
          iDs_ = other.iDs_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureIDsIsMutable();
          iDs_.addAll(other.iDs_);
        }
        onChanged();
      }
      if (!other.rowData_.isEmpty()) {
        if (rowData_.isEmpty()) {
          rowData_ = other.rowData_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensureRowDataIsMutable();
          rowData_.addAll(other.rowData_);
        }
        onChanged();
      }
      if (!other.scores_.isEmpty()) {
        if (scores_.isEmpty()) {
          scores_ = other.scores_;
          bitField0_ = (bitField0_ & ~0x00000004);
        } else {
          ensureScoresIsMutable();
          scores_.addAll(other.scores_);
        }
        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.Hits parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (io.milvus.grpc.Hits) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private com.google.protobuf.Internal.LongList iDs_ = emptyLongList();
    private void ensureIDsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        iDs_ = mutableCopy(iDs_);
        bitField0_ |= 0x00000001;
       }
    }
    /**
     * repeated int64 IDs = 1;
     * @return A list containing the iDs.
     */
    public java.util.List
        getIDsList() {
      return ((bitField0_ & 0x00000001) != 0) ?
               java.util.Collections.unmodifiableList(iDs_) : iDs_;
    }
    /**
     * repeated int64 IDs = 1;
     * @return The count of iDs.
     */
    public int getIDsCount() {
      return iDs_.size();
    }
    /**
     * repeated int64 IDs = 1;
     * @param index The index of the element to return.
     * @return The iDs at the given index.
     */
    public long getIDs(int index) {
      return iDs_.getLong(index);
    }
    /**
     * repeated int64 IDs = 1;
     * @param index The index to set the value at.
     * @param value The iDs to set.
     * @return This builder for chaining.
     */
    public Builder setIDs(
        int index, long value) {
      ensureIDsIsMutable();
      iDs_.setLong(index, value);
      onChanged();
      return this;
    }
    /**
     * repeated int64 IDs = 1;
     * @param value The iDs to add.
     * @return This builder for chaining.
     */
    public Builder addIDs(long value) {
      ensureIDsIsMutable();
      iDs_.addLong(value);
      onChanged();
      return this;
    }
    /**
     * repeated int64 IDs = 1;
     * @param values The iDs to add.
     * @return This builder for chaining.
     */
    public Builder addAllIDs(
        java.lang.Iterable values) {
      ensureIDsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, iDs_);
      onChanged();
      return this;
    }
    /**
     * repeated int64 IDs = 1;
     * @return This builder for chaining.
     */
    public Builder clearIDs() {
      iDs_ = emptyLongList();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }

    private java.util.List rowData_ = java.util.Collections.emptyList();
    private void ensureRowDataIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        rowData_ = new java.util.ArrayList(rowData_);
        bitField0_ |= 0x00000002;
       }
    }
    /**
     * repeated bytes row_data = 2;
     * @return A list containing the rowData.
     */
    public java.util.List
        getRowDataList() {
      return ((bitField0_ & 0x00000002) != 0) ?
               java.util.Collections.unmodifiableList(rowData_) : rowData_;
    }
    /**
     * repeated bytes row_data = 2;
     * @return The count of rowData.
     */
    public int getRowDataCount() {
      return rowData_.size();
    }
    /**
     * repeated bytes row_data = 2;
     * @param index The index of the element to return.
     * @return The rowData at the given index.
     */
    public com.google.protobuf.ByteString getRowData(int index) {
      return rowData_.get(index);
    }
    /**
     * repeated bytes row_data = 2;
     * @param index The index to set the value at.
     * @param value The rowData to set.
     * @return This builder for chaining.
     */
    public Builder setRowData(
        int index, com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureRowDataIsMutable();
      rowData_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * repeated bytes row_data = 2;
     * @param value The rowData to add.
     * @return This builder for chaining.
     */
    public Builder addRowData(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureRowDataIsMutable();
      rowData_.add(value);
      onChanged();
      return this;
    }
    /**
     * repeated bytes row_data = 2;
     * @param values The rowData to add.
     * @return This builder for chaining.
     */
    public Builder addAllRowData(
        java.lang.Iterable values) {
      ensureRowDataIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, rowData_);
      onChanged();
      return this;
    }
    /**
     * repeated bytes row_data = 2;
     * @return This builder for chaining.
     */
    public Builder clearRowData() {
      rowData_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }

    private com.google.protobuf.Internal.FloatList scores_ = emptyFloatList();
    private void ensureScoresIsMutable() {
      if (!((bitField0_ & 0x00000004) != 0)) {
        scores_ = mutableCopy(scores_);
        bitField0_ |= 0x00000004;
       }
    }
    /**
     * repeated float scores = 3;
     * @return A list containing the scores.
     */
    public java.util.List
        getScoresList() {
      return ((bitField0_ & 0x00000004) != 0) ?
               java.util.Collections.unmodifiableList(scores_) : scores_;
    }
    /**
     * repeated float scores = 3;
     * @return The count of scores.
     */
    public int getScoresCount() {
      return scores_.size();
    }
    /**
     * repeated float scores = 3;
     * @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 = 3;
     * @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 = 3;
     * @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 = 3;
     * @param values The scores to add.
     * @return This builder for chaining.
     */
    public Builder addAllScores(
        java.lang.Iterable values) {
      ensureScoresIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, scores_);
      onChanged();
      return this;
    }
    /**
     * repeated float scores = 3;
     * @return This builder for chaining.
     */
    public Builder clearScores() {
      scores_ = emptyFloatList();
      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.milvus.Hits)
  }

  // @@protoc_insertion_point(class_scope:milvus.proto.milvus.Hits)
  private static final io.milvus.grpc.Hits DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new io.milvus.grpc.Hits();
  }

  public static io.milvus.grpc.Hits getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public Hits parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new Hits(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.Hits getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy