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

io.pinecone.proto.ScoredVector Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: vector_service.proto

// Protobuf Java Version: 3.25.3
package io.pinecone.proto;

/**
 * Protobuf type {@code ScoredVector}
 */
public final class ScoredVector extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:ScoredVector)
    ScoredVectorOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ScoredVector.newBuilder() to construct.
  private ScoredVector(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private ScoredVector() {
    id_ = "";
    values_ = emptyFloatList();
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.pinecone.proto.VectorServiceOuterClass.internal_static_ScoredVector_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.pinecone.proto.VectorServiceOuterClass.internal_static_ScoredVector_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.pinecone.proto.ScoredVector.class, io.pinecone.proto.ScoredVector.Builder.class);
  }

  private int bitField0_;
  public static final int ID_FIELD_NUMBER = 1;
  @SuppressWarnings("serial")
  private volatile java.lang.Object id_ = "";
  /**
   * 
   * This is the vector's unique id.
   * 
* * string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @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; } } /** *
   * This is the vector's unique id.
   * 
* * string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SCORE_FIELD_NUMBER = 2; private float score_ = 0F; /** *
   * This is a measure of similarity between this vector and the query vector.  The higher the score, the more they are similar.
   * 
* * float score = 2; * @return The score. */ @java.lang.Override public float getScore() { return score_; } public static final int VALUES_FIELD_NUMBER = 3; @SuppressWarnings("serial") private com.google.protobuf.Internal.FloatList values_ = emptyFloatList(); /** *
   * This is the vector data, if it is requested.
   * 
* * repeated float values = 3; * @return A list containing the values. */ @java.lang.Override public java.util.List getValuesList() { return values_; } /** *
   * This is the vector data, if it is requested.
   * 
* * repeated float values = 3; * @return The count of values. */ public int getValuesCount() { return values_.size(); } /** *
   * This is the vector data, if it is requested.
   * 
* * repeated float values = 3; * @param index The index of the element to return. * @return The values at the given index. */ public float getValues(int index) { return values_.getFloat(index); } private int valuesMemoizedSerializedSize = -1; public static final int SPARSE_VALUES_FIELD_NUMBER = 5; private io.pinecone.proto.SparseValues sparseValues_; /** *
   * This is the sparse data, if it is requested.
   * 
* * .SparseValues sparse_values = 5; * @return Whether the sparseValues field is set. */ @java.lang.Override public boolean hasSparseValues() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * This is the sparse data, if it is requested.
   * 
* * .SparseValues sparse_values = 5; * @return The sparseValues. */ @java.lang.Override public io.pinecone.proto.SparseValues getSparseValues() { return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_; } /** *
   * This is the sparse data, if it is requested.
   * 
* * .SparseValues sparse_values = 5; */ @java.lang.Override public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_; } public static final int METADATA_FIELD_NUMBER = 4; private com.google.protobuf.Struct metadata_; /** *
   * This is the metadata, if it is requested.
   * 
* * .google.protobuf.Struct metadata = 4; * @return Whether the metadata field is set. */ @java.lang.Override public boolean hasMetadata() { return ((bitField0_ & 0x00000002) != 0); } /** *
   * This is the metadata, if it is requested.
   * 
* * .google.protobuf.Struct metadata = 4; * @return The metadata. */ @java.lang.Override public com.google.protobuf.Struct getMetadata() { return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; } /** *
   * This is the metadata, if it is requested.
   * 
* * .google.protobuf.Struct metadata = 4; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; } 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (java.lang.Float.floatToRawIntBits(score_) != 0) { output.writeFloat(2, score_); } if (getValuesList().size() > 0) { output.writeUInt32NoTag(26); output.writeUInt32NoTag(valuesMemoizedSerializedSize); } for (int i = 0; i < values_.size(); i++) { output.writeFloatNoTag(values_.getFloat(i)); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getMetadata()); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getSparseValues()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } if (java.lang.Float.floatToRawIntBits(score_) != 0) { size += com.google.protobuf.CodedOutputStream .computeFloatSize(2, score_); } { int dataSize = 0; dataSize = 4 * getValuesList().size(); size += dataSize; if (!getValuesList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeInt32SizeNoTag(dataSize); } valuesMemoizedSerializedSize = dataSize; } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getMetadata()); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getSparseValues()); } 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 io.pinecone.proto.ScoredVector)) { return super.equals(obj); } io.pinecone.proto.ScoredVector other = (io.pinecone.proto.ScoredVector) obj; if (!getId() .equals(other.getId())) return false; if (java.lang.Float.floatToIntBits(getScore()) != java.lang.Float.floatToIntBits( other.getScore())) return false; if (!getValuesList() .equals(other.getValuesList())) return false; if (hasSparseValues() != other.hasSparseValues()) return false; if (hasSparseValues()) { if (!getSparseValues() .equals(other.getSparseValues())) return false; } if (hasMetadata() != other.hasMetadata()) return false; if (hasMetadata()) { if (!getMetadata() .equals(other.getMetadata())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + SCORE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getScore()); if (getValuesCount() > 0) { hash = (37 * hash) + VALUES_FIELD_NUMBER; hash = (53 * hash) + getValuesList().hashCode(); } if (hasSparseValues()) { hash = (37 * hash) + SPARSE_VALUES_FIELD_NUMBER; hash = (53 * hash) + getSparseValues().hashCode(); } if (hasMetadata()) { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + getMetadata().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.pinecone.proto.ScoredVector parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.pinecone.proto.ScoredVector parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.pinecone.proto.ScoredVector parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.pinecone.proto.ScoredVector parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.pinecone.proto.ScoredVector parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.pinecone.proto.ScoredVector parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.pinecone.proto.ScoredVector parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.pinecone.proto.ScoredVector 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.pinecone.proto.ScoredVector parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.pinecone.proto.ScoredVector 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.pinecone.proto.ScoredVector parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.pinecone.proto.ScoredVector 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.pinecone.proto.ScoredVector 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 ScoredVector} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:ScoredVector) io.pinecone.proto.ScoredVectorOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.pinecone.proto.VectorServiceOuterClass.internal_static_ScoredVector_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.pinecone.proto.VectorServiceOuterClass.internal_static_ScoredVector_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.ScoredVector.class, io.pinecone.proto.ScoredVector.Builder.class); } // Construct using io.pinecone.proto.ScoredVector.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getSparseValuesFieldBuilder(); getMetadataFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; score_ = 0F; values_ = emptyFloatList(); sparseValues_ = null; if (sparseValuesBuilder_ != null) { sparseValuesBuilder_.dispose(); sparseValuesBuilder_ = null; } metadata_ = null; if (metadataBuilder_ != null) { metadataBuilder_.dispose(); metadataBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.pinecone.proto.VectorServiceOuterClass.internal_static_ScoredVector_descriptor; } @java.lang.Override public io.pinecone.proto.ScoredVector getDefaultInstanceForType() { return io.pinecone.proto.ScoredVector.getDefaultInstance(); } @java.lang.Override public io.pinecone.proto.ScoredVector build() { io.pinecone.proto.ScoredVector result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.pinecone.proto.ScoredVector buildPartial() { io.pinecone.proto.ScoredVector result = new io.pinecone.proto.ScoredVector(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(io.pinecone.proto.ScoredVector result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.id_ = id_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.score_ = score_; } if (((from_bitField0_ & 0x00000004) != 0)) { values_.makeImmutable(); result.values_ = values_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000008) != 0)) { result.sparseValues_ = sparseValuesBuilder_ == null ? sparseValues_ : sparseValuesBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000010) != 0)) { result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); to_bitField0_ |= 0x00000002; } 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 io.pinecone.proto.ScoredVector) { return mergeFrom((io.pinecone.proto.ScoredVector)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.pinecone.proto.ScoredVector other) { if (other == io.pinecone.proto.ScoredVector.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; bitField0_ |= 0x00000001; onChanged(); } if (other.getScore() != 0F) { setScore(other.getScore()); } if (!other.values_.isEmpty()) { if (values_.isEmpty()) { values_ = other.values_; values_.makeImmutable(); bitField0_ |= 0x00000004; } else { ensureValuesIsMutable(); values_.addAll(other.values_); } onChanged(); } if (other.hasSparseValues()) { mergeSparseValues(other.getSparseValues()); } if (other.hasMetadata()) { mergeMetadata(other.getMetadata()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 21: { score_ = input.readFloat(); bitField0_ |= 0x00000002; break; } // case 21 case 29: { float v = input.readFloat(); ensureValuesIsMutable(); values_.addFloat(v); break; } // case 29 case 26: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); int alloc = length > 4096 ? 4096 : length; ensureValuesIsMutable(alloc / 4); while (input.getBytesUntilLimit() > 0) { values_.addFloat(input.readFloat()); } input.popLimit(limit); break; } // case 26 case 34: { input.readMessage( getMetadataFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 34 case 42: { input.readMessage( getSparseValuesFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 42 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_ = ""; /** *
     * This is the vector's unique id.
     * 
* * string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @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; } } /** *
     * This is the vector's unique id.
     * 
* * string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @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; } } /** *
     * This is the vector's unique id.
     * 
* * string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @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; } /** *
     * This is the vector's unique id.
     * 
* * string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * This is the vector's unique id.
     * 
* * string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @param value The bytes for id to set. * @return This builder for chaining. */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private float score_ ; /** *
     * This is a measure of similarity between this vector and the query vector.  The higher the score, the more they are similar.
     * 
* * float score = 2; * @return The score. */ @java.lang.Override public float getScore() { return score_; } /** *
     * This is a measure of similarity between this vector and the query vector.  The higher the score, the more they are similar.
     * 
* * float score = 2; * @param value The score to set. * @return This builder for chaining. */ public Builder setScore(float value) { score_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * This is a measure of similarity between this vector and the query vector.  The higher the score, the more they are similar.
     * 
* * float score = 2; * @return This builder for chaining. */ public Builder clearScore() { bitField0_ = (bitField0_ & ~0x00000002); score_ = 0F; onChanged(); return this; } private com.google.protobuf.Internal.FloatList values_ = emptyFloatList(); private void ensureValuesIsMutable() { if (!values_.isModifiable()) { values_ = makeMutableCopy(values_); } bitField0_ |= 0x00000004; } private void ensureValuesIsMutable(int capacity) { if (!values_.isModifiable()) { values_ = makeMutableCopy(values_, capacity); } bitField0_ |= 0x00000004; } /** *
     * This is the vector data, if it is requested.
     * 
* * repeated float values = 3; * @return A list containing the values. */ public java.util.List getValuesList() { values_.makeImmutable(); return values_; } /** *
     * This is the vector data, if it is requested.
     * 
* * repeated float values = 3; * @return The count of values. */ public int getValuesCount() { return values_.size(); } /** *
     * This is the vector data, if it is requested.
     * 
* * repeated float values = 3; * @param index The index of the element to return. * @return The values at the given index. */ public float getValues(int index) { return values_.getFloat(index); } /** *
     * This is the vector data, if it is requested.
     * 
* * repeated float values = 3; * @param index The index to set the value at. * @param value The values to set. * @return This builder for chaining. */ public Builder setValues( int index, float value) { ensureValuesIsMutable(); values_.setFloat(index, value); bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * This is the vector data, if it is requested.
     * 
* * repeated float values = 3; * @param value The values to add. * @return This builder for chaining. */ public Builder addValues(float value) { ensureValuesIsMutable(); values_.addFloat(value); bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * This is the vector data, if it is requested.
     * 
* * repeated float values = 3; * @param values The values to add. * @return This builder for chaining. */ public Builder addAllValues( java.lang.Iterable values) { ensureValuesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, values_); bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * This is the vector data, if it is requested.
     * 
* * repeated float values = 3; * @return This builder for chaining. */ public Builder clearValues() { values_ = emptyFloatList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } private io.pinecone.proto.SparseValues sparseValues_; private com.google.protobuf.SingleFieldBuilderV3< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> sparseValuesBuilder_; /** *
     * This is the sparse data, if it is requested.
     * 
* * .SparseValues sparse_values = 5; * @return Whether the sparseValues field is set. */ public boolean hasSparseValues() { return ((bitField0_ & 0x00000008) != 0); } /** *
     * This is the sparse data, if it is requested.
     * 
* * .SparseValues sparse_values = 5; * @return The sparseValues. */ public io.pinecone.proto.SparseValues getSparseValues() { if (sparseValuesBuilder_ == null) { return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_; } else { return sparseValuesBuilder_.getMessage(); } } /** *
     * This is the sparse data, if it is requested.
     * 
* * .SparseValues sparse_values = 5; */ public Builder setSparseValues(io.pinecone.proto.SparseValues value) { if (sparseValuesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sparseValues_ = value; } else { sparseValuesBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * This is the sparse data, if it is requested.
     * 
* * .SparseValues sparse_values = 5; */ public Builder setSparseValues( io.pinecone.proto.SparseValues.Builder builderForValue) { if (sparseValuesBuilder_ == null) { sparseValues_ = builderForValue.build(); } else { sparseValuesBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * This is the sparse data, if it is requested.
     * 
* * .SparseValues sparse_values = 5; */ public Builder mergeSparseValues(io.pinecone.proto.SparseValues value) { if (sparseValuesBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && sparseValues_ != null && sparseValues_ != io.pinecone.proto.SparseValues.getDefaultInstance()) { getSparseValuesBuilder().mergeFrom(value); } else { sparseValues_ = value; } } else { sparseValuesBuilder_.mergeFrom(value); } if (sparseValues_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** *
     * This is the sparse data, if it is requested.
     * 
* * .SparseValues sparse_values = 5; */ public Builder clearSparseValues() { bitField0_ = (bitField0_ & ~0x00000008); sparseValues_ = null; if (sparseValuesBuilder_ != null) { sparseValuesBuilder_.dispose(); sparseValuesBuilder_ = null; } onChanged(); return this; } /** *
     * This is the sparse data, if it is requested.
     * 
* * .SparseValues sparse_values = 5; */ public io.pinecone.proto.SparseValues.Builder getSparseValuesBuilder() { bitField0_ |= 0x00000008; onChanged(); return getSparseValuesFieldBuilder().getBuilder(); } /** *
     * This is the sparse data, if it is requested.
     * 
* * .SparseValues sparse_values = 5; */ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { if (sparseValuesBuilder_ != null) { return sparseValuesBuilder_.getMessageOrBuilder(); } else { return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_; } } /** *
     * This is the sparse data, if it is requested.
     * 
* * .SparseValues sparse_values = 5; */ private com.google.protobuf.SingleFieldBuilderV3< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> getSparseValuesFieldBuilder() { if (sparseValuesBuilder_ == null) { sparseValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder>( getSparseValues(), getParentForChildren(), isClean()); sparseValues_ = null; } return sparseValuesBuilder_; } private com.google.protobuf.Struct metadata_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> metadataBuilder_; /** *
     * This is the metadata, if it is requested.
     * 
* * .google.protobuf.Struct metadata = 4; * @return Whether the metadata field is set. */ public boolean hasMetadata() { return ((bitField0_ & 0x00000010) != 0); } /** *
     * This is the metadata, if it is requested.
     * 
* * .google.protobuf.Struct metadata = 4; * @return The metadata. */ public com.google.protobuf.Struct getMetadata() { if (metadataBuilder_ == null) { return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; } else { return metadataBuilder_.getMessage(); } } /** *
     * This is the metadata, if it is requested.
     * 
* * .google.protobuf.Struct metadata = 4; */ public Builder setMetadata(com.google.protobuf.Struct value) { if (metadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } metadata_ = value; } else { metadataBuilder_.setMessage(value); } bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * This is the metadata, if it is requested.
     * 
* * .google.protobuf.Struct metadata = 4; */ public Builder setMetadata( com.google.protobuf.Struct.Builder builderForValue) { if (metadataBuilder_ == null) { metadata_ = builderForValue.build(); } else { metadataBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * This is the metadata, if it is requested.
     * 
* * .google.protobuf.Struct metadata = 4; */ public Builder mergeMetadata(com.google.protobuf.Struct value) { if (metadataBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0) && metadata_ != null && metadata_ != com.google.protobuf.Struct.getDefaultInstance()) { getMetadataBuilder().mergeFrom(value); } else { metadata_ = value; } } else { metadataBuilder_.mergeFrom(value); } if (metadata_ != null) { bitField0_ |= 0x00000010; onChanged(); } return this; } /** *
     * This is the metadata, if it is requested.
     * 
* * .google.protobuf.Struct metadata = 4; */ public Builder clearMetadata() { bitField0_ = (bitField0_ & ~0x00000010); metadata_ = null; if (metadataBuilder_ != null) { metadataBuilder_.dispose(); metadataBuilder_ = null; } onChanged(); return this; } /** *
     * This is the metadata, if it is requested.
     * 
* * .google.protobuf.Struct metadata = 4; */ public com.google.protobuf.Struct.Builder getMetadataBuilder() { bitField0_ |= 0x00000010; onChanged(); return getMetadataFieldBuilder().getBuilder(); } /** *
     * This is the metadata, if it is requested.
     * 
* * .google.protobuf.Struct metadata = 4; */ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { if (metadataBuilder_ != null) { return metadataBuilder_.getMessageOrBuilder(); } else { return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; } } /** *
     * This is the metadata, if it is requested.
     * 
* * .google.protobuf.Struct metadata = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getMetadataFieldBuilder() { if (metadataBuilder_ == null) { metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( getMetadata(), 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:ScoredVector) } // @@protoc_insertion_point(class_scope:ScoredVector) private static final io.pinecone.proto.ScoredVector DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.pinecone.proto.ScoredVector(); } public static io.pinecone.proto.ScoredVector getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ScoredVector parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.pinecone.proto.ScoredVector getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy