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

grpc.vectorindex._Item Maven / Gradle / Ivy

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

package grpc.vectorindex;

/**
 * Protobuf type {@code vectorindex._Item}
 */
public final class _Item extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:vectorindex._Item)
    _ItemOrBuilder {
private static final long serialVersionUID = 0L;
  // Use _Item.newBuilder() to construct.
  private _Item(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private _Item() {
    id_ = "";
    metadata_ = java.util.Collections.emptyList();
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return grpc.vectorindex.Vectorindex.internal_static_vectorindex__Item_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return grpc.vectorindex.Vectorindex.internal_static_vectorindex__Item_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            grpc.vectorindex._Item.class, grpc.vectorindex._Item.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 VECTOR_FIELD_NUMBER = 2;
  private grpc.vectorindex._Vector vector_;
  /**
   * .vectorindex._Vector vector = 2;
   * @return Whether the vector field is set.
   */
  @java.lang.Override
  public boolean hasVector() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * .vectorindex._Vector vector = 2;
   * @return The vector.
   */
  @java.lang.Override
  public grpc.vectorindex._Vector getVector() {
    return vector_ == null ? grpc.vectorindex._Vector.getDefaultInstance() : vector_;
  }
  /**
   * .vectorindex._Vector vector = 2;
   */
  @java.lang.Override
  public grpc.vectorindex._VectorOrBuilder getVectorOrBuilder() {
    return vector_ == null ? grpc.vectorindex._Vector.getDefaultInstance() : vector_;
  }

  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 
      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);
  }

  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 (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(2, getVector());
    }
    for (int i = 0; i < metadata_.size(); i++) {
      output.writeMessage(3, metadata_.get(i));
    }
    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 (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getVector());
    }
    for (int i = 0; i < metadata_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, metadata_.get(i));
    }
    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._Item)) {
      return super.equals(obj);
    }
    grpc.vectorindex._Item other = (grpc.vectorindex._Item) obj;

    if (!getId()
        .equals(other.getId())) return false;
    if (hasVector() != other.hasVector()) return false;
    if (hasVector()) {
      if (!getVector()
          .equals(other.getVector())) return false;
    }
    if (!getMetadataList()
        .equals(other.getMetadataList())) 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();
    if (hasVector()) {
      hash = (37 * hash) + VECTOR_FIELD_NUMBER;
      hash = (53 * hash) + getVector().hashCode();
    }
    if (getMetadataCount() > 0) {
      hash = (37 * hash) + METADATA_FIELD_NUMBER;
      hash = (53 * hash) + getMetadataList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static grpc.vectorindex._Item parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static grpc.vectorindex._Item parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static grpc.vectorindex._Item parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static grpc.vectorindex._Item 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._Item parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static grpc.vectorindex._Item parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static grpc.vectorindex._Item parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static grpc.vectorindex._Item 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._Item parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static grpc.vectorindex._Item 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._Item parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static grpc.vectorindex._Item 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._Item 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._Item}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:vectorindex._Item)
      grpc.vectorindex._ItemOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return grpc.vectorindex.Vectorindex.internal_static_vectorindex__Item_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return grpc.vectorindex.Vectorindex.internal_static_vectorindex__Item_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              grpc.vectorindex._Item.class, grpc.vectorindex._Item.Builder.class);
    }

    // Construct using grpc.vectorindex._Item.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getVectorFieldBuilder();
        getMetadataFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      id_ = "";
      vector_ = null;
      if (vectorBuilder_ != null) {
        vectorBuilder_.dispose();
        vectorBuilder_ = null;
      }
      if (metadataBuilder_ == null) {
        metadata_ = java.util.Collections.emptyList();
      } else {
        metadata_ = null;
        metadataBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000004);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return grpc.vectorindex.Vectorindex.internal_static_vectorindex__Item_descriptor;
    }

    @java.lang.Override
    public grpc.vectorindex._Item getDefaultInstanceForType() {
      return grpc.vectorindex._Item.getDefaultInstance();
    }

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

    @java.lang.Override
    public grpc.vectorindex._Item buildPartial() {
      grpc.vectorindex._Item result = new grpc.vectorindex._Item(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(grpc.vectorindex._Item 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._Item result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.id_ = id_;
      }
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000002) != 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._Item) {
        return mergeFrom((grpc.vectorindex._Item)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(grpc.vectorindex._Item other) {
      if (other == grpc.vectorindex._Item.getDefaultInstance()) return this;
      if (!other.getId().isEmpty()) {
        id_ = other.id_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.hasVector()) {
        mergeVector(other.getVector());
      }
      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_);
          }
        }
      }
      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 18: {
              input.readMessage(
                  getVectorFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000002;
              break;
            } // case 18
            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
            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 grpc.vectorindex._Vector vector_;
    private com.google.protobuf.SingleFieldBuilderV3<
        grpc.vectorindex._Vector, grpc.vectorindex._Vector.Builder, grpc.vectorindex._VectorOrBuilder> vectorBuilder_;
    /**
     * .vectorindex._Vector vector = 2;
     * @return Whether the vector field is set.
     */
    public boolean hasVector() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * .vectorindex._Vector vector = 2;
     * @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 = 2;
     */
    public Builder setVector(grpc.vectorindex._Vector value) {
      if (vectorBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        vector_ = value;
      } else {
        vectorBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * .vectorindex._Vector vector = 2;
     */
    public Builder setVector(
        grpc.vectorindex._Vector.Builder builderForValue) {
      if (vectorBuilder_ == null) {
        vector_ = builderForValue.build();
      } else {
        vectorBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * .vectorindex._Vector vector = 2;
     */
    public Builder mergeVector(grpc.vectorindex._Vector value) {
      if (vectorBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0) &&
          vector_ != null &&
          vector_ != grpc.vectorindex._Vector.getDefaultInstance()) {
          getVectorBuilder().mergeFrom(value);
        } else {
          vector_ = value;
        }
      } else {
        vectorBuilder_.mergeFrom(value);
      }
      if (vector_ != null) {
        bitField0_ |= 0x00000002;
        onChanged();
      }
      return this;
    }
    /**
     * .vectorindex._Vector vector = 2;
     */
    public Builder clearVector() {
      bitField0_ = (bitField0_ & ~0x00000002);
      vector_ = null;
      if (vectorBuilder_ != null) {
        vectorBuilder_.dispose();
        vectorBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * .vectorindex._Vector vector = 2;
     */
    public grpc.vectorindex._Vector.Builder getVectorBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return getVectorFieldBuilder().getBuilder();
    }
    /**
     * .vectorindex._Vector vector = 2;
     */
    public grpc.vectorindex._VectorOrBuilder getVectorOrBuilder() {
      if (vectorBuilder_ != null) {
        return vectorBuilder_.getMessageOrBuilder();
      } else {
        return vector_ == null ?
            grpc.vectorindex._Vector.getDefaultInstance() : vector_;
      }
    }
    /**
     * .vectorindex._Vector vector = 2;
     */
    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_;
    }

    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 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 
         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_;
    }
    @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._Item)
  }

  // @@protoc_insertion_point(class_scope:vectorindex._Item)
  private static final grpc.vectorindex._Item DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new grpc.vectorindex._Item();
  }

  public static grpc.vectorindex._Item getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<_Item>
      PARSER = new com.google.protobuf.AbstractParser<_Item>() {
    @java.lang.Override
    public _Item 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<_Item> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<_Item> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public grpc.vectorindex._Item getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy