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

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

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

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

/**
 * 
 * The request for the `query` operation.
 * 
* * Protobuf type {@code QueryRequest} */ public final class QueryRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:QueryRequest) QueryRequestOrBuilder { private static final long serialVersionUID = 0L; // Use QueryRequest.newBuilder() to construct. private QueryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private QueryRequest() { namespace_ = ""; queries_ = java.util.Collections.emptyList(); vector_ = emptyFloatList(); id_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new QueryRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.QueryRequest.class, io.pinecone.proto.QueryRequest.Builder.class); } private int bitField0_; public static final int NAMESPACE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object namespace_ = ""; /** *
   * The namespace to query.
   * 
* * string namespace = 1; * @return The namespace. */ @java.lang.Override public java.lang.String getNamespace() { java.lang.Object ref = namespace_; 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(); namespace_ = s; return s; } } /** *
   * The namespace to query.
   * 
* * string namespace = 1; * @return The bytes for namespace. */ @java.lang.Override public com.google.protobuf.ByteString getNamespaceBytes() { java.lang.Object ref = namespace_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); namespace_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TOP_K_FIELD_NUMBER = 2; private int topK_ = 0; /** *
   * The number of results to return for each query.
   * 
* * uint32 top_k = 2 [(.google.api.field_behavior) = REQUIRED]; * @return The topK. */ @java.lang.Override public int getTopK() { return topK_; } public static final int FILTER_FIELD_NUMBER = 3; private com.google.protobuf.Struct filter_; /** *
   * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
   * 
* * .google.protobuf.Struct filter = 3; * @return Whether the filter field is set. */ @java.lang.Override public boolean hasFilter() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
   * 
* * .google.protobuf.Struct filter = 3; * @return The filter. */ @java.lang.Override public com.google.protobuf.Struct getFilter() { return filter_ == null ? com.google.protobuf.Struct.getDefaultInstance() : filter_; } /** *
   * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
   * 
* * .google.protobuf.Struct filter = 3; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { return filter_ == null ? com.google.protobuf.Struct.getDefaultInstance() : filter_; } public static final int INCLUDE_VALUES_FIELD_NUMBER = 4; private boolean includeValues_ = false; /** *
   * Indicates whether vector values are included in the response.
   * 
* * bool include_values = 4; * @return The includeValues. */ @java.lang.Override public boolean getIncludeValues() { return includeValues_; } public static final int INCLUDE_METADATA_FIELD_NUMBER = 5; private boolean includeMetadata_ = false; /** *
   * Indicates whether metadata is included in the response as well as the ids.
   * 
* * bool include_metadata = 5; * @return The includeMetadata. */ @java.lang.Override public boolean getIncludeMetadata() { return includeMetadata_; } public static final int QUERIES_FIELD_NUMBER = 6; @SuppressWarnings("serial") private java.util.List queries_; /** *
   * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
   * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public java.util.List getQueriesList() { return queries_; } /** *
   * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
   * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public java.util.List getQueriesOrBuilderList() { return queries_; } /** *
   * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
   * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public int getQueriesCount() { return queries_.size(); } /** *
   * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
   * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public io.pinecone.proto.QueryVector getQueries(int index) { return queries_.get(index); } /** *
   * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
   * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public io.pinecone.proto.QueryVectorOrBuilder getQueriesOrBuilder( int index) { return queries_.get(index); } public static final int VECTOR_FIELD_NUMBER = 7; @SuppressWarnings("serial") private com.google.protobuf.Internal.FloatList vector_ = emptyFloatList(); /** *
   * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
   * 
* * repeated float vector = 7; * @return A list containing the vector. */ @java.lang.Override public java.util.List getVectorList() { return vector_; } /** *
   * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
   * 
* * repeated float vector = 7; * @return The count of vector. */ public int getVectorCount() { return vector_.size(); } /** *
   * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
   * 
* * repeated float vector = 7; * @param index The index of the element to return. * @return The vector at the given index. */ public float getVector(int index) { return vector_.getFloat(index); } private int vectorMemoizedSerializedSize = -1; public static final int SPARSE_VECTOR_FIELD_NUMBER = 9; private io.pinecone.proto.SparseValues sparseVector_; /** *
   * The query sparse values.
   * 
* * .SparseValues sparse_vector = 9; * @return Whether the sparseVector field is set. */ @java.lang.Override public boolean hasSparseVector() { return ((bitField0_ & 0x00000002) != 0); } /** *
   * The query sparse values.
   * 
* * .SparseValues sparse_vector = 9; * @return The sparseVector. */ @java.lang.Override public io.pinecone.proto.SparseValues getSparseVector() { return sparseVector_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseVector_; } /** *
   * The query sparse values.
   * 
* * .SparseValues sparse_vector = 9; */ @java.lang.Override public io.pinecone.proto.SparseValuesOrBuilder getSparseVectorOrBuilder() { return sparseVector_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseVector_; } public static final int ID_FIELD_NUMBER = 8; @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** *
   * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
   * 
* * string id = 8; * @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; } } /** *
   * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
   * 
* * string id = 8; * @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; } } 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(namespace_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_); } if (topK_ != 0) { output.writeUInt32(2, topK_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getFilter()); } if (includeValues_ != false) { output.writeBool(4, includeValues_); } if (includeMetadata_ != false) { output.writeBool(5, includeMetadata_); } for (int i = 0; i < queries_.size(); i++) { output.writeMessage(6, queries_.get(i)); } if (getVectorList().size() > 0) { output.writeUInt32NoTag(58); output.writeUInt32NoTag(vectorMemoizedSerializedSize); } for (int i = 0; i < vector_.size(); i++) { output.writeFloatNoTag(vector_.getFloat(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, id_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(9, getSparseVector()); } 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(namespace_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_); } if (topK_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, topK_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getFilter()); } if (includeValues_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, includeValues_); } if (includeMetadata_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, includeMetadata_); } for (int i = 0; i < queries_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, queries_.get(i)); } { int dataSize = 0; dataSize = 4 * getVectorList().size(); size += dataSize; if (!getVectorList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeInt32SizeNoTag(dataSize); } vectorMemoizedSerializedSize = dataSize; } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, id_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, getSparseVector()); } 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.QueryRequest)) { return super.equals(obj); } io.pinecone.proto.QueryRequest other = (io.pinecone.proto.QueryRequest) obj; if (!getNamespace() .equals(other.getNamespace())) return false; if (getTopK() != other.getTopK()) return false; if (hasFilter() != other.hasFilter()) return false; if (hasFilter()) { if (!getFilter() .equals(other.getFilter())) return false; } if (getIncludeValues() != other.getIncludeValues()) return false; if (getIncludeMetadata() != other.getIncludeMetadata()) return false; if (!getQueriesList() .equals(other.getQueriesList())) return false; if (!getVectorList() .equals(other.getVectorList())) return false; if (hasSparseVector() != other.hasSparseVector()) return false; if (hasSparseVector()) { if (!getSparseVector() .equals(other.getSparseVector())) return false; } if (!getId() .equals(other.getId())) 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) + NAMESPACE_FIELD_NUMBER; hash = (53 * hash) + getNamespace().hashCode(); hash = (37 * hash) + TOP_K_FIELD_NUMBER; hash = (53 * hash) + getTopK(); if (hasFilter()) { hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); } hash = (37 * hash) + INCLUDE_VALUES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIncludeValues()); hash = (37 * hash) + INCLUDE_METADATA_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIncludeMetadata()); if (getQueriesCount() > 0) { hash = (37 * hash) + QUERIES_FIELD_NUMBER; hash = (53 * hash) + getQueriesList().hashCode(); } if (getVectorCount() > 0) { hash = (37 * hash) + VECTOR_FIELD_NUMBER; hash = (53 * hash) + getVectorList().hashCode(); } if (hasSparseVector()) { hash = (37 * hash) + SPARSE_VECTOR_FIELD_NUMBER; hash = (53 * hash) + getSparseVector().hashCode(); } hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.pinecone.proto.QueryRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.pinecone.proto.QueryRequest 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.QueryRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.pinecone.proto.QueryRequest 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.QueryRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.pinecone.proto.QueryRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.pinecone.proto.QueryRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.pinecone.proto.QueryRequest 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.QueryRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.pinecone.proto.QueryRequest 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.QueryRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.pinecone.proto.QueryRequest 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.QueryRequest 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; } /** *
   * The request for the `query` operation.
   * 
* * Protobuf type {@code QueryRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:QueryRequest) io.pinecone.proto.QueryRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( io.pinecone.proto.QueryRequest.class, io.pinecone.proto.QueryRequest.Builder.class); } // Construct using io.pinecone.proto.QueryRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getFilterFieldBuilder(); getQueriesFieldBuilder(); getSparseVectorFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; namespace_ = ""; topK_ = 0; filter_ = null; if (filterBuilder_ != null) { filterBuilder_.dispose(); filterBuilder_ = null; } includeValues_ = false; includeMetadata_ = false; if (queriesBuilder_ == null) { queries_ = java.util.Collections.emptyList(); } else { queries_ = null; queriesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); vector_ = emptyFloatList(); sparseVector_ = null; if (sparseVectorBuilder_ != null) { sparseVectorBuilder_.dispose(); sparseVectorBuilder_ = null; } id_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryRequest_descriptor; } @java.lang.Override public io.pinecone.proto.QueryRequest getDefaultInstanceForType() { return io.pinecone.proto.QueryRequest.getDefaultInstance(); } @java.lang.Override public io.pinecone.proto.QueryRequest build() { io.pinecone.proto.QueryRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.pinecone.proto.QueryRequest buildPartial() { io.pinecone.proto.QueryRequest result = new io.pinecone.proto.QueryRequest(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(io.pinecone.proto.QueryRequest result) { if (queriesBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0)) { queries_ = java.util.Collections.unmodifiableList(queries_); bitField0_ = (bitField0_ & ~0x00000020); } result.queries_ = queries_; } else { result.queries_ = queriesBuilder_.build(); } } private void buildPartial0(io.pinecone.proto.QueryRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.namespace_ = namespace_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.topK_ = topK_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.filter_ = filterBuilder_ == null ? filter_ : filterBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000008) != 0)) { result.includeValues_ = includeValues_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.includeMetadata_ = includeMetadata_; } if (((from_bitField0_ & 0x00000040) != 0)) { vector_.makeImmutable(); result.vector_ = vector_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.sparseVector_ = sparseVectorBuilder_ == null ? sparseVector_ : sparseVectorBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000100) != 0)) { result.id_ = id_; } 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.QueryRequest) { return mergeFrom((io.pinecone.proto.QueryRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.pinecone.proto.QueryRequest other) { if (other == io.pinecone.proto.QueryRequest.getDefaultInstance()) return this; if (!other.getNamespace().isEmpty()) { namespace_ = other.namespace_; bitField0_ |= 0x00000001; onChanged(); } if (other.getTopK() != 0) { setTopK(other.getTopK()); } if (other.hasFilter()) { mergeFilter(other.getFilter()); } if (other.getIncludeValues() != false) { setIncludeValues(other.getIncludeValues()); } if (other.getIncludeMetadata() != false) { setIncludeMetadata(other.getIncludeMetadata()); } if (queriesBuilder_ == null) { if (!other.queries_.isEmpty()) { if (queries_.isEmpty()) { queries_ = other.queries_; bitField0_ = (bitField0_ & ~0x00000020); } else { ensureQueriesIsMutable(); queries_.addAll(other.queries_); } onChanged(); } } else { if (!other.queries_.isEmpty()) { if (queriesBuilder_.isEmpty()) { queriesBuilder_.dispose(); queriesBuilder_ = null; queries_ = other.queries_; bitField0_ = (bitField0_ & ~0x00000020); queriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getQueriesFieldBuilder() : null; } else { queriesBuilder_.addAllMessages(other.queries_); } } } if (!other.vector_.isEmpty()) { if (vector_.isEmpty()) { vector_ = other.vector_; vector_.makeImmutable(); bitField0_ |= 0x00000040; } else { ensureVectorIsMutable(); vector_.addAll(other.vector_); } onChanged(); } if (other.hasSparseVector()) { mergeSparseVector(other.getSparseVector()); } if (!other.getId().isEmpty()) { id_ = other.id_; bitField0_ |= 0x00000100; onChanged(); } 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: { namespace_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { topK_ = input.readUInt32(); bitField0_ |= 0x00000002; break; } // case 16 case 26: { input.readMessage( getFilterFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 32: { includeValues_ = input.readBool(); bitField0_ |= 0x00000008; break; } // case 32 case 40: { includeMetadata_ = input.readBool(); bitField0_ |= 0x00000010; break; } // case 40 case 50: { io.pinecone.proto.QueryVector m = input.readMessage( io.pinecone.proto.QueryVector.parser(), extensionRegistry); if (queriesBuilder_ == null) { ensureQueriesIsMutable(); queries_.add(m); } else { queriesBuilder_.addMessage(m); } break; } // case 50 case 61: { float v = input.readFloat(); ensureVectorIsMutable(); vector_.addFloat(v); break; } // case 61 case 58: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); int alloc = length > 4096 ? 4096 : length; ensureVectorIsMutable(alloc / 4); while (input.getBytesUntilLimit() > 0) { vector_.addFloat(input.readFloat()); } input.popLimit(limit); break; } // case 58 case 66: { id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000100; break; } // case 66 case 74: { input.readMessage( getSparseVectorFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; } // case 74 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 namespace_ = ""; /** *
     * The namespace to query.
     * 
* * string namespace = 1; * @return The namespace. */ public java.lang.String getNamespace() { java.lang.Object ref = namespace_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); namespace_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The namespace to query.
     * 
* * string namespace = 1; * @return The bytes for namespace. */ public com.google.protobuf.ByteString getNamespaceBytes() { java.lang.Object ref = namespace_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); namespace_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The namespace to query.
     * 
* * string namespace = 1; * @param value The namespace to set. * @return This builder for chaining. */ public Builder setNamespace( java.lang.String value) { if (value == null) { throw new NullPointerException(); } namespace_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * The namespace to query.
     * 
* * string namespace = 1; * @return This builder for chaining. */ public Builder clearNamespace() { namespace_ = getDefaultInstance().getNamespace(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * The namespace to query.
     * 
* * string namespace = 1; * @param value The bytes for namespace to set. * @return This builder for chaining. */ public Builder setNamespaceBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); namespace_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private int topK_ ; /** *
     * The number of results to return for each query.
     * 
* * uint32 top_k = 2 [(.google.api.field_behavior) = REQUIRED]; * @return The topK. */ @java.lang.Override public int getTopK() { return topK_; } /** *
     * The number of results to return for each query.
     * 
* * uint32 top_k = 2 [(.google.api.field_behavior) = REQUIRED]; * @param value The topK to set. * @return This builder for chaining. */ public Builder setTopK(int value) { topK_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The number of results to return for each query.
     * 
* * uint32 top_k = 2 [(.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ public Builder clearTopK() { bitField0_ = (bitField0_ & ~0x00000002); topK_ = 0; onChanged(); return this; } private com.google.protobuf.Struct filter_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> filterBuilder_; /** *
     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
     * 
* * .google.protobuf.Struct filter = 3; * @return Whether the filter field is set. */ public boolean hasFilter() { return ((bitField0_ & 0x00000004) != 0); } /** *
     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
     * 
* * .google.protobuf.Struct filter = 3; * @return The filter. */ public com.google.protobuf.Struct getFilter() { if (filterBuilder_ == null) { return filter_ == null ? com.google.protobuf.Struct.getDefaultInstance() : filter_; } else { return filterBuilder_.getMessage(); } } /** *
     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
     * 
* * .google.protobuf.Struct filter = 3; */ public Builder setFilter(com.google.protobuf.Struct value) { if (filterBuilder_ == null) { if (value == null) { throw new NullPointerException(); } filter_ = value; } else { filterBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
     * 
* * .google.protobuf.Struct filter = 3; */ public Builder setFilter( com.google.protobuf.Struct.Builder builderForValue) { if (filterBuilder_ == null) { filter_ = builderForValue.build(); } else { filterBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
     * 
* * .google.protobuf.Struct filter = 3; */ public Builder mergeFilter(com.google.protobuf.Struct value) { if (filterBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && filter_ != null && filter_ != com.google.protobuf.Struct.getDefaultInstance()) { getFilterBuilder().mergeFrom(value); } else { filter_ = value; } } else { filterBuilder_.mergeFrom(value); } if (filter_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** *
     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
     * 
* * .google.protobuf.Struct filter = 3; */ public Builder clearFilter() { bitField0_ = (bitField0_ & ~0x00000004); filter_ = null; if (filterBuilder_ != null) { filterBuilder_.dispose(); filterBuilder_ = null; } onChanged(); return this; } /** *
     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
     * 
* * .google.protobuf.Struct filter = 3; */ public com.google.protobuf.Struct.Builder getFilterBuilder() { bitField0_ |= 0x00000004; onChanged(); return getFilterFieldBuilder().getBuilder(); } /** *
     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
     * 
* * .google.protobuf.Struct filter = 3; */ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() { if (filterBuilder_ != null) { return filterBuilder_.getMessageOrBuilder(); } else { return filter_ == null ? com.google.protobuf.Struct.getDefaultInstance() : filter_; } } /** *
     * The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.
     * 
* * .google.protobuf.Struct filter = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> getFilterFieldBuilder() { if (filterBuilder_ == null) { filterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( getFilter(), getParentForChildren(), isClean()); filter_ = null; } return filterBuilder_; } private boolean includeValues_ ; /** *
     * Indicates whether vector values are included in the response.
     * 
* * bool include_values = 4; * @return The includeValues. */ @java.lang.Override public boolean getIncludeValues() { return includeValues_; } /** *
     * Indicates whether vector values are included in the response.
     * 
* * bool include_values = 4; * @param value The includeValues to set. * @return This builder for chaining. */ public Builder setIncludeValues(boolean value) { includeValues_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * Indicates whether vector values are included in the response.
     * 
* * bool include_values = 4; * @return This builder for chaining. */ public Builder clearIncludeValues() { bitField0_ = (bitField0_ & ~0x00000008); includeValues_ = false; onChanged(); return this; } private boolean includeMetadata_ ; /** *
     * Indicates whether metadata is included in the response as well as the ids.
     * 
* * bool include_metadata = 5; * @return The includeMetadata. */ @java.lang.Override public boolean getIncludeMetadata() { return includeMetadata_; } /** *
     * Indicates whether metadata is included in the response as well as the ids.
     * 
* * bool include_metadata = 5; * @param value The includeMetadata to set. * @return This builder for chaining. */ public Builder setIncludeMetadata(boolean value) { includeMetadata_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * Indicates whether metadata is included in the response as well as the ids.
     * 
* * bool include_metadata = 5; * @return This builder for chaining. */ public Builder clearIncludeMetadata() { bitField0_ = (bitField0_ & ~0x00000010); includeMetadata_ = false; onChanged(); return this; } private java.util.List queries_ = java.util.Collections.emptyList(); private void ensureQueriesIsMutable() { if (!((bitField0_ & 0x00000020) != 0)) { queries_ = new java.util.ArrayList(queries_); bitField0_ |= 0x00000020; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.pinecone.proto.QueryVector, io.pinecone.proto.QueryVector.Builder, io.pinecone.proto.QueryVectorOrBuilder> queriesBuilder_; /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public java.util.List getQueriesList() { if (queriesBuilder_ == null) { return java.util.Collections.unmodifiableList(queries_); } else { return queriesBuilder_.getMessageList(); } } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public int getQueriesCount() { if (queriesBuilder_ == null) { return queries_.size(); } else { return queriesBuilder_.getCount(); } } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.QueryVector getQueries(int index) { if (queriesBuilder_ == null) { return queries_.get(index); } else { return queriesBuilder_.getMessage(index); } } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder setQueries( int index, io.pinecone.proto.QueryVector value) { if (queriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureQueriesIsMutable(); queries_.set(index, value); onChanged(); } else { queriesBuilder_.setMessage(index, value); } return this; } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder setQueries( int index, io.pinecone.proto.QueryVector.Builder builderForValue) { if (queriesBuilder_ == null) { ensureQueriesIsMutable(); queries_.set(index, builderForValue.build()); onChanged(); } else { queriesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder addQueries(io.pinecone.proto.QueryVector value) { if (queriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureQueriesIsMutable(); queries_.add(value); onChanged(); } else { queriesBuilder_.addMessage(value); } return this; } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder addQueries( int index, io.pinecone.proto.QueryVector value) { if (queriesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureQueriesIsMutable(); queries_.add(index, value); onChanged(); } else { queriesBuilder_.addMessage(index, value); } return this; } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder addQueries( io.pinecone.proto.QueryVector.Builder builderForValue) { if (queriesBuilder_ == null) { ensureQueriesIsMutable(); queries_.add(builderForValue.build()); onChanged(); } else { queriesBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder addQueries( int index, io.pinecone.proto.QueryVector.Builder builderForValue) { if (queriesBuilder_ == null) { ensureQueriesIsMutable(); queries_.add(index, builderForValue.build()); onChanged(); } else { queriesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder addAllQueries( java.lang.Iterable values) { if (queriesBuilder_ == null) { ensureQueriesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, queries_); onChanged(); } else { queriesBuilder_.addAllMessages(values); } return this; } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder clearQueries() { if (queriesBuilder_ == null) { queries_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { queriesBuilder_.clear(); } return this; } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public Builder removeQueries(int index) { if (queriesBuilder_ == null) { ensureQueriesIsMutable(); queries_.remove(index); onChanged(); } else { queriesBuilder_.remove(index); } return this; } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.QueryVector.Builder getQueriesBuilder( int index) { return getQueriesFieldBuilder().getBuilder(index); } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.QueryVectorOrBuilder getQueriesOrBuilder( int index) { if (queriesBuilder_ == null) { return queries_.get(index); } else { return queriesBuilder_.getMessageOrBuilder(index); } } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public java.util.List getQueriesOrBuilderList() { if (queriesBuilder_ != null) { return queriesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(queries_); } } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.QueryVector.Builder addQueriesBuilder() { return getQueriesFieldBuilder().addBuilder( io.pinecone.proto.QueryVector.getDefaultInstance()); } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public io.pinecone.proto.QueryVector.Builder addQueriesBuilder( int index) { return getQueriesFieldBuilder().addBuilder( index, io.pinecone.proto.QueryVector.getDefaultInstance()); } /** *
     * DEPRECATED. The query vectors. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * repeated .QueryVector queries = 6 [deprecated = true]; */ @java.lang.Deprecated public java.util.List getQueriesBuilderList() { return getQueriesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.pinecone.proto.QueryVector, io.pinecone.proto.QueryVector.Builder, io.pinecone.proto.QueryVectorOrBuilder> getQueriesFieldBuilder() { if (queriesBuilder_ == null) { queriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.pinecone.proto.QueryVector, io.pinecone.proto.QueryVector.Builder, io.pinecone.proto.QueryVectorOrBuilder>( queries_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); queries_ = null; } return queriesBuilder_; } private com.google.protobuf.Internal.FloatList vector_ = emptyFloatList(); private void ensureVectorIsMutable() { if (!vector_.isModifiable()) { vector_ = makeMutableCopy(vector_); } bitField0_ |= 0x00000040; } private void ensureVectorIsMutable(int capacity) { if (!vector_.isModifiable()) { vector_ = makeMutableCopy(vector_, capacity); } bitField0_ |= 0x00000040; } /** *
     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
     * 
* * repeated float vector = 7; * @return A list containing the vector. */ public java.util.List getVectorList() { vector_.makeImmutable(); return vector_; } /** *
     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
     * 
* * repeated float vector = 7; * @return The count of vector. */ public int getVectorCount() { return vector_.size(); } /** *
     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
     * 
* * repeated float vector = 7; * @param index The index of the element to return. * @return The vector at the given index. */ public float getVector(int index) { return vector_.getFloat(index); } /** *
     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
     * 
* * repeated float vector = 7; * @param index The index to set the value at. * @param value The vector to set. * @return This builder for chaining. */ public Builder setVector( int index, float value) { ensureVectorIsMutable(); vector_.setFloat(index, value); bitField0_ |= 0x00000040; onChanged(); return this; } /** *
     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
     * 
* * repeated float vector = 7; * @param value The vector to add. * @return This builder for chaining. */ public Builder addVector(float value) { ensureVectorIsMutable(); vector_.addFloat(value); bitField0_ |= 0x00000040; onChanged(); return this; } /** *
     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
     * 
* * repeated float vector = 7; * @param values The vector to add. * @return This builder for chaining. */ public Builder addAllVector( java.lang.Iterable values) { ensureVectorIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, vector_); bitField0_ |= 0x00000040; onChanged(); return this; } /** *
     * The query vector. This should be the same length as the dimension of the index being queried. Each `query()` request can contain only one of the parameters `id` or `vector`.
     * 
* * repeated float vector = 7; * @return This builder for chaining. */ public Builder clearVector() { vector_ = emptyFloatList(); bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } private io.pinecone.proto.SparseValues sparseVector_; private com.google.protobuf.SingleFieldBuilderV3< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> sparseVectorBuilder_; /** *
     * The query sparse values.
     * 
* * .SparseValues sparse_vector = 9; * @return Whether the sparseVector field is set. */ public boolean hasSparseVector() { return ((bitField0_ & 0x00000080) != 0); } /** *
     * The query sparse values.
     * 
* * .SparseValues sparse_vector = 9; * @return The sparseVector. */ public io.pinecone.proto.SparseValues getSparseVector() { if (sparseVectorBuilder_ == null) { return sparseVector_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseVector_; } else { return sparseVectorBuilder_.getMessage(); } } /** *
     * The query sparse values.
     * 
* * .SparseValues sparse_vector = 9; */ public Builder setSparseVector(io.pinecone.proto.SparseValues value) { if (sparseVectorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sparseVector_ = value; } else { sparseVectorBuilder_.setMessage(value); } bitField0_ |= 0x00000080; onChanged(); return this; } /** *
     * The query sparse values.
     * 
* * .SparseValues sparse_vector = 9; */ public Builder setSparseVector( io.pinecone.proto.SparseValues.Builder builderForValue) { if (sparseVectorBuilder_ == null) { sparseVector_ = builderForValue.build(); } else { sparseVectorBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000080; onChanged(); return this; } /** *
     * The query sparse values.
     * 
* * .SparseValues sparse_vector = 9; */ public Builder mergeSparseVector(io.pinecone.proto.SparseValues value) { if (sparseVectorBuilder_ == null) { if (((bitField0_ & 0x00000080) != 0) && sparseVector_ != null && sparseVector_ != io.pinecone.proto.SparseValues.getDefaultInstance()) { getSparseVectorBuilder().mergeFrom(value); } else { sparseVector_ = value; } } else { sparseVectorBuilder_.mergeFrom(value); } if (sparseVector_ != null) { bitField0_ |= 0x00000080; onChanged(); } return this; } /** *
     * The query sparse values.
     * 
* * .SparseValues sparse_vector = 9; */ public Builder clearSparseVector() { bitField0_ = (bitField0_ & ~0x00000080); sparseVector_ = null; if (sparseVectorBuilder_ != null) { sparseVectorBuilder_.dispose(); sparseVectorBuilder_ = null; } onChanged(); return this; } /** *
     * The query sparse values.
     * 
* * .SparseValues sparse_vector = 9; */ public io.pinecone.proto.SparseValues.Builder getSparseVectorBuilder() { bitField0_ |= 0x00000080; onChanged(); return getSparseVectorFieldBuilder().getBuilder(); } /** *
     * The query sparse values.
     * 
* * .SparseValues sparse_vector = 9; */ public io.pinecone.proto.SparseValuesOrBuilder getSparseVectorOrBuilder() { if (sparseVectorBuilder_ != null) { return sparseVectorBuilder_.getMessageOrBuilder(); } else { return sparseVector_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseVector_; } } /** *
     * The query sparse values.
     * 
* * .SparseValues sparse_vector = 9; */ private com.google.protobuf.SingleFieldBuilderV3< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> getSparseVectorFieldBuilder() { if (sparseVectorBuilder_ == null) { sparseVectorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder>( getSparseVector(), getParentForChildren(), isClean()); sparseVector_ = null; } return sparseVectorBuilder_; } private java.lang.Object id_ = ""; /** *
     * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * string id = 8; * @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; } } /** *
     * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * string id = 8; * @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; } } /** *
     * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * string id = 8; * @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_ |= 0x00000100; onChanged(); return this; } /** *
     * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * string id = 8; * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } /** *
     * The unique ID of the vector to be used as a query vector. Each `query()` request can contain only one of the parameters `queries`, `vector`, or  `id`.
     * 
* * string id = 8; * @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_ |= 0x00000100; 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:QueryRequest) } // @@protoc_insertion_point(class_scope:QueryRequest) private static final io.pinecone.proto.QueryRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.pinecone.proto.QueryRequest(); } public static io.pinecone.proto.QueryRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public QueryRequest 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.QueryRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy