diff --git a/src/main/java/io/pinecone/PineconeClient.java b/src/main/java/io/pinecone/PineconeClient.java index 727c972d..5f4d6dae 100644 --- a/src/main/java/io/pinecone/PineconeClient.java +++ b/src/main/java/io/pinecone/PineconeClient.java @@ -1,3 +1,7 @@ + +//Copyright (c) 2020-2021 Pinecone Systems Inc. All right reserved. + + package io.pinecone; /** diff --git a/src/main/java/io/pinecone/PineconeClientConfig.java b/src/main/java/io/pinecone/PineconeClientConfig.java index f68f864b..9f7b1ac3 100644 --- a/src/main/java/io/pinecone/PineconeClientConfig.java +++ b/src/main/java/io/pinecone/PineconeClientConfig.java @@ -1,3 +1,7 @@ + +//Copyright (c) 2020-2021 Pinecone Systems Inc. All right reserved. + + package io.pinecone; import java.util.Arrays; diff --git a/src/main/java/io/pinecone/PineconeConnection.java b/src/main/java/io/pinecone/PineconeConnection.java index 2b35b065..c5ff6df9 100644 --- a/src/main/java/io/pinecone/PineconeConnection.java +++ b/src/main/java/io/pinecone/PineconeConnection.java @@ -1,3 +1,7 @@ + +//Copyright (c) 2020-2021 Pinecone Systems Inc. All right reserved. + + package io.pinecone; import io.grpc.ManagedChannel; diff --git a/src/main/java/io/pinecone/PineconeConnectionConfig.java b/src/main/java/io/pinecone/PineconeConnectionConfig.java index a2eb9ef0..7313cf74 100644 --- a/src/main/java/io/pinecone/PineconeConnectionConfig.java +++ b/src/main/java/io/pinecone/PineconeConnectionConfig.java @@ -1,3 +1,7 @@ + +//Copyright (c) 2020-2021 Pinecone Systems Inc. All right reserved. + + package io.pinecone; import io.grpc.ManagedChannel; diff --git a/src/main/java/io/pinecone/PineconeException.java b/src/main/java/io/pinecone/PineconeException.java index c3b841b5..d14f6620 100644 --- a/src/main/java/io/pinecone/PineconeException.java +++ b/src/main/java/io/pinecone/PineconeException.java @@ -1,3 +1,7 @@ + +//Copyright (c) 2020-2021 Pinecone Systems Inc. All right reserved. + + package io.pinecone; public class PineconeException extends RuntimeException { diff --git a/src/main/java/io/pinecone/PineconePackageInfo.java b/src/main/java/io/pinecone/PineconePackageInfo.java index c554d6b7..8091b1da 100644 --- a/src/main/java/io/pinecone/PineconePackageInfo.java +++ b/src/main/java/io/pinecone/PineconePackageInfo.java @@ -1,3 +1,7 @@ + +//Copyright (c) 2020-2021 Pinecone Systems Inc. All right reserved. + + package io.pinecone; import org.slf4j.Logger; diff --git a/src/main/java/io/pinecone/PineconeValidationException.java b/src/main/java/io/pinecone/PineconeValidationException.java index 6f4ae7f7..637373ae 100644 --- a/src/main/java/io/pinecone/PineconeValidationException.java +++ b/src/main/java/io/pinecone/PineconeValidationException.java @@ -1,3 +1,7 @@ + +//Copyright (c) 2020-2021 Pinecone Systems Inc. All right reserved. + + package io.pinecone; public class PineconeValidationException extends PineconeException { diff --git a/src/main/java/io/pinecone/proto/DeleteRequest.java b/src/main/java/io/pinecone/proto/DeleteRequest.java new file mode 100644 index 00000000..78769b29 --- /dev/null +++ b/src/main/java/io/pinecone/proto/DeleteRequest.java @@ -0,0 +1,1181 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: vector_service.proto + +package io.pinecone.proto; + +/** + *
+ * The request for the `Delete` operation. + *+ * + * Protobuf type {@code DeleteRequest} + */ +public final class DeleteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:DeleteRequest) + DeleteRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteRequest.newBuilder() to construct. + private DeleteRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private DeleteRequest() { + ids_ = com.google.protobuf.LazyStringArrayList.EMPTY; + namespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ids_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ids_.add(s); + break; + } + case 16: { + + deleteAll_ = input.readBool(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + namespace_ = s; + break; + } + case 34: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (filter_ != null) { + subBuilder = filter_.toBuilder(); + } + filter_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(filter_); + filter_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ids_ = ids_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.pinecone.proto.DeleteRequest.class, io.pinecone.proto.DeleteRequest.Builder.class); + } + + public static final int IDS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList ids_; + /** + *
+ * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the ids.
+ */
+ public com.google.protobuf.ProtocolStringList
+ getIdsList() {
+ return ids_;
+ }
+ /**
+ * + * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of ids.
+ */
+ public int getIdsCount() {
+ return ids_.size();
+ }
+ /**
+ * + * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the element to return.
+ * @return The ids at the given index.
+ */
+ public java.lang.String getIds(int index) {
+ return ids_.get(index);
+ }
+ /**
+ * + * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the value to return.
+ * @return The bytes of the ids at the given index.
+ */
+ public com.google.protobuf.ByteString
+ getIdsBytes(int index) {
+ return ids_.getByteString(index);
+ }
+
+ public static final int DELETE_ALL_FIELD_NUMBER = 2;
+ private boolean deleteAll_;
+ /**
+ * + * This indicates that all vectors in the index namespace should be deleted. + *+ * + *
bool delete_all = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The deleteAll.
+ */
+ @java.lang.Override
+ public boolean getDeleteAll() {
+ return deleteAll_;
+ }
+
+ public static final int NAMESPACE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object namespace_;
+ /**
+ * + * The namespace to delete vectors from, if applicable. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 delete vectors from, if applicable. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 FILTER_FIELD_NUMBER = 4;
+ private com.google.protobuf.Struct filter_;
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ * @return Whether the filter field is set.
+ */
+ @java.lang.Override
+ public boolean hasFilter() {
+ return filter_ != null;
+ }
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ * @return The filter.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Struct getFilter() {
+ return filter_ == null ? com.google.protobuf.Struct.getDefaultInstance() : filter_;
+ }
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() {
+ return getFilter();
+ }
+
+ 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 {
+ for (int i = 0; i < ids_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ids_.getRaw(i));
+ }
+ if (deleteAll_ != false) {
+ output.writeBool(2, deleteAll_);
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, namespace_);
+ }
+ if (filter_ != null) {
+ output.writeMessage(4, getFilter());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ for (int i = 0; i < ids_.size(); i++) {
+ dataSize += computeStringSizeNoTag(ids_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getIdsList().size();
+ }
+ if (deleteAll_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(2, deleteAll_);
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, namespace_);
+ }
+ if (filter_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, getFilter());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.pinecone.proto.DeleteRequest)) {
+ return super.equals(obj);
+ }
+ io.pinecone.proto.DeleteRequest other = (io.pinecone.proto.DeleteRequest) obj;
+
+ if (!getIdsList()
+ .equals(other.getIdsList())) return false;
+ if (getDeleteAll()
+ != other.getDeleteAll()) return false;
+ if (!getNamespace()
+ .equals(other.getNamespace())) return false;
+ if (hasFilter() != other.hasFilter()) return false;
+ if (hasFilter()) {
+ if (!getFilter()
+ .equals(other.getFilter())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getIdsCount() > 0) {
+ hash = (37 * hash) + IDS_FIELD_NUMBER;
+ hash = (53 * hash) + getIdsList().hashCode();
+ }
+ hash = (37 * hash) + DELETE_ALL_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getDeleteAll());
+ hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
+ hash = (53 * hash) + getNamespace().hashCode();
+ if (hasFilter()) {
+ hash = (37 * hash) + FILTER_FIELD_NUMBER;
+ hash = (53 * hash) + getFilter().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.pinecone.proto.DeleteRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.DeleteRequest 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.DeleteRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.DeleteRequest 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.DeleteRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.DeleteRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.pinecone.proto.DeleteRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.DeleteRequest 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.DeleteRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.DeleteRequest 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.DeleteRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.DeleteRequest 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.DeleteRequest 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 `Delete` operation. + *+ * + * Protobuf type {@code DeleteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the ids.
+ */
+ public com.google.protobuf.ProtocolStringList
+ getIdsList() {
+ return ids_.getUnmodifiableView();
+ }
+ /**
+ * + * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of ids.
+ */
+ public int getIdsCount() {
+ return ids_.size();
+ }
+ /**
+ * + * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the element to return.
+ * @return The ids at the given index.
+ */
+ public java.lang.String getIds(int index) {
+ return ids_.get(index);
+ }
+ /**
+ * + * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the value to return.
+ * @return The bytes of the ids at the given index.
+ */
+ public com.google.protobuf.ByteString
+ getIdsBytes(int index) {
+ return ids_.getByteString(index);
+ }
+ /**
+ * + * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index to set the value at.
+ * @param value The ids to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIds(
+ int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIdsIsMutable();
+ ids_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The ids to add.
+ * @return This builder for chaining.
+ */
+ public Builder addIds(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIdsIsMutable();
+ ids_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param values The ids to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllIds(
+ java.lang.Iterable+ * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearIds() {
+ ids_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The bytes of the ids to add.
+ * @return This builder for chaining.
+ */
+ public Builder addIdsBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureIdsIsMutable();
+ ids_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private boolean deleteAll_ ;
+ /**
+ * + * This indicates that all vectors in the index namespace should be deleted. + *+ * + *
bool delete_all = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The deleteAll.
+ */
+ @java.lang.Override
+ public boolean getDeleteAll() {
+ return deleteAll_;
+ }
+ /**
+ * + * This indicates that all vectors in the index namespace should be deleted. + *+ * + *
bool delete_all = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The deleteAll to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDeleteAll(boolean value) {
+
+ deleteAll_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This indicates that all vectors in the index namespace should be deleted. + *+ * + *
bool delete_all = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearDeleteAll() {
+
+ deleteAll_ = false;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object namespace_ = "";
+ /**
+ * + * The namespace to delete vectors from, if applicable. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 delete vectors from, if applicable. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 delete vectors from, if applicable. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The namespace to delete vectors from, if applicable. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearNamespace() {
+
+ namespace_ = getDefaultInstance().getNamespace();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The namespace to delete vectors from, if applicable. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ 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_;
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ * @return Whether the filter field is set.
+ */
+ public boolean hasFilter() {
+ return filterBuilder_ != null || filter_ != null;
+ }
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ * @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();
+ }
+ }
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ */
+ public Builder setFilter(com.google.protobuf.Struct value) {
+ if (filterBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ filter_ = value;
+ onChanged();
+ } else {
+ filterBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ */
+ public Builder setFilter(
+ com.google.protobuf.Struct.Builder builderForValue) {
+ if (filterBuilder_ == null) {
+ filter_ = builderForValue.build();
+ onChanged();
+ } else {
+ filterBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ */
+ public Builder mergeFilter(com.google.protobuf.Struct value) {
+ if (filterBuilder_ == null) {
+ if (filter_ != null) {
+ filter_ =
+ com.google.protobuf.Struct.newBuilder(filter_).mergeFrom(value).buildPartial();
+ } else {
+ filter_ = value;
+ }
+ onChanged();
+ } else {
+ filterBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ */
+ public Builder clearFilter() {
+ if (filterBuilder_ == null) {
+ filter_ = null;
+ onChanged();
+ } else {
+ filter_ = null;
+ filterBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ */
+ public com.google.protobuf.Struct.Builder getFilterBuilder() {
+
+ onChanged();
+ return getFilterFieldBuilder().getBuilder();
+ }
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ */
+ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() {
+ if (filterBuilder_ != null) {
+ return filterBuilder_.getMessageOrBuilder();
+ } else {
+ return filter_ == null ?
+ com.google.protobuf.Struct.getDefaultInstance() : filter_;
+ }
+ }
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ */
+ 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_;
+ }
+ @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:DeleteRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:DeleteRequest)
+ private static final io.pinecone.proto.DeleteRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.pinecone.proto.DeleteRequest();
+ }
+
+ public static io.pinecone.proto.DeleteRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the ids.
+ */
+ java.util.List+ * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of ids.
+ */
+ int getIdsCount();
+ /**
+ * + * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the element to return.
+ * @return The ids at the given index.
+ */
+ java.lang.String getIds(int index);
+ /**
+ * + * Vectors to delete. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the value to return.
+ * @return The bytes of the ids at the given index.
+ */
+ com.google.protobuf.ByteString
+ getIdsBytes(int index);
+
+ /**
+ * + * This indicates that all vectors in the index namespace should be deleted. + *+ * + *
bool delete_all = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The deleteAll.
+ */
+ boolean getDeleteAll();
+
+ /**
+ * + * The namespace to delete vectors from, if applicable. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The namespace.
+ */
+ java.lang.String getNamespace();
+ /**
+ * + * The namespace to delete vectors from, if applicable. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The bytes for namespace.
+ */
+ com.google.protobuf.ByteString
+ getNamespaceBytes();
+
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ * @return Whether the filter field is set.
+ */
+ boolean hasFilter();
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ * @return The filter.
+ */
+ com.google.protobuf.Struct getFilter();
+ /**
+ * + * If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive + * with specifying ids to delete in the ids param or using delete_all=True. + * See https://www.pinecone.io/docs/metadata-filtering/. + *+ * + *
.google.protobuf.Struct filter = 4;
+ */
+ com.google.protobuf.StructOrBuilder getFilterOrBuilder();
+}
diff --git a/src/main/java/io/pinecone/proto/DeleteResponse.java b/src/main/java/io/pinecone/proto/DeleteResponse.java
new file mode 100644
index 00000000..637285d0
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/DeleteResponse.java
@@ -0,0 +1,427 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+package io.pinecone.proto;
+
+/**
+ * + * The response for the `Delete` operation. + *+ * + * Protobuf type {@code DeleteResponse} + */ +public final class DeleteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:DeleteResponse) + DeleteResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteResponse.newBuilder() to construct. + private DeleteResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private DeleteResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_DeleteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.pinecone.proto.DeleteResponse.class, io.pinecone.proto.DeleteResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.pinecone.proto.DeleteResponse)) { + return super.equals(obj); + } + io.pinecone.proto.DeleteResponse other = (io.pinecone.proto.DeleteResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.pinecone.proto.DeleteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.pinecone.proto.DeleteResponse 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.DeleteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.pinecone.proto.DeleteResponse 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.DeleteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.pinecone.proto.DeleteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.pinecone.proto.DeleteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.pinecone.proto.DeleteResponse 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.DeleteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.pinecone.proto.DeleteResponse 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.DeleteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.pinecone.proto.DeleteResponse 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.DeleteResponse 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 response for the `Delete` operation. + *+ * + * Protobuf type {@code DeleteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * The request for the `DescribeIndexStats` operation. + *+ * + * Protobuf type {@code DescribeIndexStatsRequest} + */ +public final class DescribeIndexStatsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:DescribeIndexStatsRequest) + DescribeIndexStatsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DescribeIndexStatsRequest.newBuilder() to construct. + private DescribeIndexStatsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private DescribeIndexStatsRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DescribeIndexStatsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DescribeIndexStatsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.pinecone.proto.DescribeIndexStatsRequest.class, io.pinecone.proto.DescribeIndexStatsRequest.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.pinecone.proto.DescribeIndexStatsRequest)) { + return super.equals(obj); + } + io.pinecone.proto.DescribeIndexStatsRequest other = (io.pinecone.proto.DescribeIndexStatsRequest) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.pinecone.proto.DescribeIndexStatsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.pinecone.proto.DescribeIndexStatsRequest 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.DescribeIndexStatsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.pinecone.proto.DescribeIndexStatsRequest 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.DescribeIndexStatsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.pinecone.proto.DescribeIndexStatsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.pinecone.proto.DescribeIndexStatsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.pinecone.proto.DescribeIndexStatsRequest 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.DescribeIndexStatsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.pinecone.proto.DescribeIndexStatsRequest 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.DescribeIndexStatsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.pinecone.proto.DescribeIndexStatsRequest 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.DescribeIndexStatsRequest 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 `DescribeIndexStats` operation. + *+ * + * Protobuf type {@code DescribeIndexStatsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * The response for the `DescribeIndexStats` operation. + *+ * + * Protobuf type {@code DescribeIndexStatsResponse} + */ +public final class DescribeIndexStatsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:DescribeIndexStatsResponse) + DescribeIndexStatsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DescribeIndexStatsResponse.newBuilder() to construct. + private DescribeIndexStatsResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private DescribeIndexStatsResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DescribeIndexStatsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DescribeIndexStatsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + namespaces_ = com.google.protobuf.MapField.newMapField( + NamespacesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry
+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+
+ @java.lang.Override
+ public boolean containsNamespaces(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ return internalGetNamespaces().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getNamespacesMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+ @java.lang.Override
+
+ public java.util.Map+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+ @java.lang.Override
+
+ public io.pinecone.proto.NamespaceSummary getNamespacesOrDefault(
+ java.lang.String key,
+ io.pinecone.proto.NamespaceSummary defaultValue) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+ @java.lang.Override
+
+ public io.pinecone.proto.NamespaceSummary getNamespacesOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map+ * The dimension of the indexed vectors. + *+ * + *
uint32 dimension = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The dimension.
+ */
+ @java.lang.Override
+ public int getDimension() {
+ return dimension_;
+ }
+
+ public static final int INDEX_FULLNESS_FIELD_NUMBER = 3;
+ private float indexFullness_;
+ /**
+ * + * The fullness of the index. + *+ * + *
float index_fullness = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The indexFullness.
+ */
+ @java.lang.Override
+ public float getIndexFullness() {
+ return indexFullness_;
+ }
+
+ 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 {
+ com.google.protobuf.GeneratedMessageV3
+ .serializeStringMapTo(
+ output,
+ internalGetNamespaces(),
+ NamespacesDefaultEntryHolder.defaultEntry,
+ 1);
+ if (dimension_ != 0) {
+ output.writeUInt32(2, dimension_);
+ }
+ if (indexFullness_ != 0F) {
+ output.writeFloat(3, indexFullness_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (java.util.Map.Entry+ * The response for the `DescribeIndexStats` operation. + *+ * + * Protobuf type {@code DescribeIndexStatsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+
+ @java.lang.Override
+ public boolean containsNamespaces(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ return internalGetNamespaces().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getNamespacesMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+ @java.lang.Override
+
+ public java.util.Map+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+ @java.lang.Override
+
+ public io.pinecone.proto.NamespaceSummary getNamespacesOrDefault(
+ java.lang.String key,
+ io.pinecone.proto.NamespaceSummary defaultValue) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+ @java.lang.Override
+
+ public io.pinecone.proto.NamespaceSummary getNamespacesOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+
+ public Builder removeNamespaces(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ internalGetMutableNamespaces().getMutableMap()
+ .remove(key);
+ return this;
+ }
+ /**
+ * Use alternate mutation accessors instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Map+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+ public Builder putNamespaces(
+ java.lang.String key,
+ io.pinecone.proto.NamespaceSummary value) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ if (value == null) { throw new java.lang.NullPointerException(); }
+ internalGetMutableNamespaces().getMutableMap()
+ .put(key, value);
+ return this;
+ }
+ /**
+ * + * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+
+ public Builder putAllNamespaces(
+ java.util.Map+ * The dimension of the indexed vectors. + *+ * + *
uint32 dimension = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The dimension.
+ */
+ @java.lang.Override
+ public int getDimension() {
+ return dimension_;
+ }
+ /**
+ * + * The dimension of the indexed vectors. + *+ * + *
uint32 dimension = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The dimension to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDimension(int value) {
+
+ dimension_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The dimension of the indexed vectors. + *+ * + *
uint32 dimension = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearDimension() {
+
+ dimension_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private float indexFullness_ ;
+ /**
+ * + * The fullness of the index. + *+ * + *
float index_fullness = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The indexFullness.
+ */
+ @java.lang.Override
+ public float getIndexFullness() {
+ return indexFullness_;
+ }
+ /**
+ * + * The fullness of the index. + *+ * + *
float index_fullness = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The indexFullness to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIndexFullness(float value) {
+
+ indexFullness_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The fullness of the index. + *+ * + *
float index_fullness = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearIndexFullness() {
+
+ indexFullness_ = 0F;
+ 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:DescribeIndexStatsResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:DescribeIndexStatsResponse)
+ private static final io.pinecone.proto.DescribeIndexStatsResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.pinecone.proto.DescribeIndexStatsResponse();
+ }
+
+ public static io.pinecone.proto.DescribeIndexStatsResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+ int getNamespacesCount();
+ /**
+ * + * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+ boolean containsNamespaces(
+ java.lang.String key);
+ /**
+ * Use {@link #getNamespacesMap()} instead.
+ */
+ @java.lang.Deprecated
+ java.util.Map+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+ java.util.Map+ * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+
+ io.pinecone.proto.NamespaceSummary getNamespacesOrDefault(
+ java.lang.String key,
+ io.pinecone.proto.NamespaceSummary defaultValue);
+ /**
+ * + * A mapping for each namespace in the index from namespace name to a summary of its contents. + *+ * + *
map<string, .NamespaceSummary> namespaces = 1;
+ */
+
+ io.pinecone.proto.NamespaceSummary getNamespacesOrThrow(
+ java.lang.String key);
+
+ /**
+ * + * The dimension of the indexed vectors. + *+ * + *
uint32 dimension = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The dimension.
+ */
+ int getDimension();
+
+ /**
+ * + * The fullness of the index. + *+ * + *
float index_fullness = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The indexFullness.
+ */
+ float getIndexFullness();
+}
diff --git a/src/main/java/io/pinecone/proto/FetchRequest.java b/src/main/java/io/pinecone/proto/FetchRequest.java
new file mode 100644
index 00000000..00fe9707
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/FetchRequest.java
@@ -0,0 +1,812 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+package io.pinecone.proto;
+
+/**
+ * + * The request for the `Fetch` operation. + *+ * + * Protobuf type {@code FetchRequest} + */ +public final class FetchRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:FetchRequest) + FetchRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use FetchRequest.newBuilder() to construct. + private FetchRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private FetchRequest() { + ids_ = com.google.protobuf.LazyStringArrayList.EMPTY; + namespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FetchRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FetchRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ids_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ids_.add(s); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + namespace_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ids_ = ids_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_FetchRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.pinecone.proto.FetchRequest.class, io.pinecone.proto.FetchRequest.Builder.class); + } + + public static final int IDS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList ids_; + /** + *
+ * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the ids.
+ */
+ public com.google.protobuf.ProtocolStringList
+ getIdsList() {
+ return ids_;
+ }
+ /**
+ * + * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of ids.
+ */
+ public int getIdsCount() {
+ return ids_.size();
+ }
+ /**
+ * + * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the element to return.
+ * @return The ids at the given index.
+ */
+ public java.lang.String getIds(int index) {
+ return ids_.get(index);
+ }
+ /**
+ * + * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the value to return.
+ * @return The bytes of the ids at the given index.
+ */
+ public com.google.protobuf.ByteString
+ getIdsBytes(int index) {
+ return ids_.getByteString(index);
+ }
+
+ public static final int NAMESPACE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object namespace_;
+ /**
+ * string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+
+ 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 {
+ for (int i = 0; i < ids_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ids_.getRaw(i));
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespace_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ for (int i = 0; i < ids_.size(); i++) {
+ dataSize += computeStringSizeNoTag(ids_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getIdsList().size();
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespace_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.pinecone.proto.FetchRequest)) {
+ return super.equals(obj);
+ }
+ io.pinecone.proto.FetchRequest other = (io.pinecone.proto.FetchRequest) obj;
+
+ if (!getIdsList()
+ .equals(other.getIdsList())) return false;
+ if (!getNamespace()
+ .equals(other.getNamespace())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getIdsCount() > 0) {
+ hash = (37 * hash) + IDS_FIELD_NUMBER;
+ hash = (53 * hash) + getIdsList().hashCode();
+ }
+ hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
+ hash = (53 * hash) + getNamespace().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.pinecone.proto.FetchRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.FetchRequest 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.FetchRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.FetchRequest 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.FetchRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.FetchRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.pinecone.proto.FetchRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.FetchRequest 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.FetchRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.FetchRequest 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.FetchRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.FetchRequest 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.FetchRequest 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 `Fetch` operation. + *+ * + * Protobuf type {@code FetchRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the ids.
+ */
+ public com.google.protobuf.ProtocolStringList
+ getIdsList() {
+ return ids_.getUnmodifiableView();
+ }
+ /**
+ * + * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of ids.
+ */
+ public int getIdsCount() {
+ return ids_.size();
+ }
+ /**
+ * + * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the element to return.
+ * @return The ids at the given index.
+ */
+ public java.lang.String getIds(int index) {
+ return ids_.get(index);
+ }
+ /**
+ * + * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the value to return.
+ * @return The bytes of the ids at the given index.
+ */
+ public com.google.protobuf.ByteString
+ getIdsBytes(int index) {
+ return ids_.getByteString(index);
+ }
+ /**
+ * + * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index to set the value at.
+ * @param value The ids to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIds(
+ int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIdsIsMutable();
+ ids_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The ids to add.
+ * @return This builder for chaining.
+ */
+ public Builder addIds(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureIdsIsMutable();
+ ids_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param values The ids to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllIds(
+ java.lang.Iterable+ * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearIds() {
+ ids_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The bytes of the ids to add.
+ * @return This builder for chaining.
+ */
+ public Builder addIdsBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureIdsIsMutable();
+ ids_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object namespace_ = "";
+ /**
+ * string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearNamespace() {
+
+ namespace_ = getDefaultInstance().getNamespace();
+ onChanged();
+ return this;
+ }
+ /**
+ * string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ 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:FetchRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:FetchRequest)
+ private static final io.pinecone.proto.FetchRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.pinecone.proto.FetchRequest();
+ }
+
+ public static io.pinecone.proto.FetchRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the ids.
+ */
+ java.util.List+ * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of ids.
+ */
+ int getIdsCount();
+ /**
+ * + * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the element to return.
+ * @return The ids at the given index.
+ */
+ java.lang.String getIds(int index);
+ /**
+ * + * The vector ids to fetch. Does not accept values containing spaces. + *+ * + *
repeated string ids = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the value to return.
+ * @return The bytes of the ids at the given index.
+ */
+ com.google.protobuf.ByteString
+ getIdsBytes(int index);
+
+ /**
+ * string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The namespace.
+ */
+ java.lang.String getNamespace();
+ /**
+ * string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The bytes for namespace.
+ */
+ com.google.protobuf.ByteString
+ getNamespaceBytes();
+}
diff --git a/src/main/java/io/pinecone/proto/FetchResponse.java b/src/main/java/io/pinecone/proto/FetchResponse.java
new file mode 100644
index 00000000..9200d5e5
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/FetchResponse.java
@@ -0,0 +1,923 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+package io.pinecone.proto;
+
+/**
+ * + * The response for the `Fetch` operation. + *+ * + * Protobuf type {@code FetchResponse} + */ +public final class FetchResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:FetchResponse) + FetchResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use FetchResponse.newBuilder() to construct. + private FetchResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private FetchResponse() { + namespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FetchResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FetchResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + vectors_ = com.google.protobuf.MapField.newMapField( + VectorsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry
+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+
+ @java.lang.Override
+ public boolean containsVectors(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ return internalGetVectors().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getVectorsMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+ @java.lang.Override
+
+ public java.util.Map+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+ @java.lang.Override
+
+ public io.pinecone.proto.Vector getVectorsOrDefault(
+ java.lang.String key,
+ io.pinecone.proto.Vector defaultValue) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+ @java.lang.Override
+
+ public io.pinecone.proto.Vector getVectorsOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map+ * The namespace of the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 of the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+
+ 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 {
+ com.google.protobuf.GeneratedMessageV3
+ .serializeStringMapTo(
+ output,
+ internalGetVectors(),
+ VectorsDefaultEntryHolder.defaultEntry,
+ 1);
+ if (!getNamespaceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespace_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (java.util.Map.Entry+ * The response for the `Fetch` operation. + *+ * + * Protobuf type {@code FetchResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+
+ @java.lang.Override
+ public boolean containsVectors(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ return internalGetVectors().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getVectorsMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+ @java.lang.Override
+
+ public java.util.Map+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+ @java.lang.Override
+
+ public io.pinecone.proto.Vector getVectorsOrDefault(
+ java.lang.String key,
+ io.pinecone.proto.Vector defaultValue) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+ @java.lang.Override
+
+ public io.pinecone.proto.Vector getVectorsOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+
+ public Builder removeVectors(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ internalGetMutableVectors().getMutableMap()
+ .remove(key);
+ return this;
+ }
+ /**
+ * Use alternate mutation accessors instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Map+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+ public Builder putVectors(
+ java.lang.String key,
+ io.pinecone.proto.Vector value) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ if (value == null) { throw new java.lang.NullPointerException(); }
+ internalGetMutableVectors().getMutableMap()
+ .put(key, value);
+ return this;
+ }
+ /**
+ * + * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+
+ public Builder putAllVectors(
+ java.util.Map+ * The namespace of the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 of the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 of the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The namespace of the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearNamespace() {
+
+ namespace_ = getDefaultInstance().getNamespace();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The namespace of the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ 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:FetchResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:FetchResponse)
+ private static final io.pinecone.proto.FetchResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.pinecone.proto.FetchResponse();
+ }
+
+ public static io.pinecone.proto.FetchResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+ int getVectorsCount();
+ /**
+ * + * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+ boolean containsVectors(
+ java.lang.String key);
+ /**
+ * Use {@link #getVectorsMap()} instead.
+ */
+ @java.lang.Deprecated
+ java.util.Map+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+ java.util.Map+ * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+
+ io.pinecone.proto.Vector getVectorsOrDefault(
+ java.lang.String key,
+ io.pinecone.proto.Vector defaultValue);
+ /**
+ * + * The fetched vectors, in the form of a map between the fetched ids and the fetched vectors + *+ * + *
map<string, .Vector> vectors = 1;
+ */
+
+ io.pinecone.proto.Vector getVectorsOrThrow(
+ java.lang.String key);
+
+ /**
+ * + * The namespace of the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The namespace.
+ */
+ java.lang.String getNamespace();
+ /**
+ * + * The namespace of the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The bytes for namespace.
+ */
+ com.google.protobuf.ByteString
+ getNamespaceBytes();
+}
diff --git a/src/main/java/io/pinecone/proto/NamespaceSummary.java b/src/main/java/io/pinecone/proto/NamespaceSummary.java
new file mode 100644
index 00000000..062cc3d9
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/NamespaceSummary.java
@@ -0,0 +1,511 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+package io.pinecone.proto;
+
+/**
+ * + * A summary of the contents of a namespace. + *+ * + * Protobuf type {@code NamespaceSummary} + */ +public final class NamespaceSummary extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:NamespaceSummary) + NamespaceSummaryOrBuilder { +private static final long serialVersionUID = 0L; + // Use NamespaceSummary.newBuilder() to construct. + private NamespaceSummary(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private NamespaceSummary() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NamespaceSummary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private NamespaceSummary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + vectorCount_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_NamespaceSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_NamespaceSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.pinecone.proto.NamespaceSummary.class, io.pinecone.proto.NamespaceSummary.Builder.class); + } + + public static final int VECTOR_COUNT_FIELD_NUMBER = 1; + private int vectorCount_; + /** + *
+ * The number of vectors stored in this namespace. Note that updates to this field may lag behind updates to the + * underlying index and corresponding query results, etc. + *+ * + *
uint32 vector_count = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The vectorCount.
+ */
+ @java.lang.Override
+ public int getVectorCount() {
+ return vectorCount_;
+ }
+
+ 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 (vectorCount_ != 0) {
+ output.writeUInt32(1, vectorCount_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (vectorCount_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, vectorCount_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.pinecone.proto.NamespaceSummary)) {
+ return super.equals(obj);
+ }
+ io.pinecone.proto.NamespaceSummary other = (io.pinecone.proto.NamespaceSummary) obj;
+
+ if (getVectorCount()
+ != other.getVectorCount()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + VECTOR_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + getVectorCount();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.pinecone.proto.NamespaceSummary parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.NamespaceSummary 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.NamespaceSummary parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.NamespaceSummary 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.NamespaceSummary parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.NamespaceSummary parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.pinecone.proto.NamespaceSummary parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.NamespaceSummary 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.NamespaceSummary parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.NamespaceSummary 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.NamespaceSummary parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.NamespaceSummary 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.NamespaceSummary 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;
+ }
+ /**
+ * + * A summary of the contents of a namespace. + *+ * + * Protobuf type {@code NamespaceSummary} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * The number of vectors stored in this namespace. Note that updates to this field may lag behind updates to the + * underlying index and corresponding query results, etc. + *+ * + *
uint32 vector_count = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The vectorCount.
+ */
+ @java.lang.Override
+ public int getVectorCount() {
+ return vectorCount_;
+ }
+ /**
+ * + * The number of vectors stored in this namespace. Note that updates to this field may lag behind updates to the + * underlying index and corresponding query results, etc. + *+ * + *
uint32 vector_count = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The vectorCount to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVectorCount(int value) {
+
+ vectorCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The number of vectors stored in this namespace. Note that updates to this field may lag behind updates to the + * underlying index and corresponding query results, etc. + *+ * + *
uint32 vector_count = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearVectorCount() {
+
+ vectorCount_ = 0;
+ 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:NamespaceSummary)
+ }
+
+ // @@protoc_insertion_point(class_scope:NamespaceSummary)
+ private static final io.pinecone.proto.NamespaceSummary DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.pinecone.proto.NamespaceSummary();
+ }
+
+ public static io.pinecone.proto.NamespaceSummary getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The number of vectors stored in this namespace. Note that updates to this field may lag behind updates to the + * underlying index and corresponding query results, etc. + *+ * + *
uint32 vector_count = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The vectorCount.
+ */
+ int getVectorCount();
+}
diff --git a/src/main/java/io/pinecone/proto/QueryRequest.java b/src/main/java/io/pinecone/proto/QueryRequest.java
new file mode 100644
index 00000000..571f4fb8
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/QueryRequest.java
@@ -0,0 +1,1894 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+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(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QueryRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + namespace_ = s; + break; + } + case 16: { + + topK_ = input.readUInt32(); + break; + } + case 26: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (filter_ != null) { + subBuilder = filter_.toBuilder(); + } + filter_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(filter_); + filter_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + + includeValues_ = input.readBool(); + break; + } + case 40: { + + includeMetadata_ = input.readBool(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + queries_ = new java.util.ArrayList
+ * The namespace to query. + *+ * + *
string namespace = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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_;
+ /**
+ * + * The number of results to return for each query. + *+ * + *
uint32 top_k = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the filter field is set.
+ */
+ @java.lang.Override
+ public boolean hasFilter() {
+ return filter_ != null;
+ }
+ /**
+ * + * 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() {
+ return getFilter();
+ }
+
+ public static final int INCLUDE_VALUES_FIELD_NUMBER = 4;
+ private boolean includeValues_;
+ /**
+ * + * Indicates whether vector values are included in the response. + *+ * + *
bool include_values = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The includeValues.
+ */
+ @java.lang.Override
+ public boolean getIncludeValues() {
+ return includeValues_;
+ }
+
+ public static final int INCLUDE_METADATA_FIELD_NUMBER = 5;
+ private boolean includeMetadata_;
+ /**
+ * + * Indicates whether metadata is included in the response as well as the ids. + *+ * + *
bool include_metadata = 5 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The includeMetadata.
+ */
+ @java.lang.Override
+ public boolean getIncludeMetadata() {
+ return includeMetadata_;
+ }
+
+ public static final int QUERIES_FIELD_NUMBER = 6;
+ private java.util.List+ * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ @java.lang.Deprecated public java.util.List+ * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ @java.lang.Deprecated public java.util.List extends io.pinecone.proto.QueryVectorOrBuilder>
+ getQueriesOrBuilderList() {
+ return queries_;
+ }
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ @java.lang.Deprecated public int getQueriesCount() {
+ return queries_.size();
+ }
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ @java.lang.Deprecated public io.pinecone.proto.QueryVector getQueries(int index) {
+ return queries_.get(index);
+ }
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @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;
+ private com.google.protobuf.Internal.FloatList vector_;
+ /**
+ * + * The query vector. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the vector.
+ */
+ @java.lang.Override
+ public java.util.List+ * The query vector. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 ID_FIELD_NUMBER = 8;
+ private volatile java.lang.Object id_;
+ /**
+ * + * The vector's unique id. + *+ * + *
string id = 8 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 vector's unique id. + *+ * + *
string id = 8 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 (!getNamespaceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_);
+ }
+ if (topK_ != 0) {
+ output.writeUInt32(2, topK_);
+ }
+ if (filter_ != null) {
+ 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 (!getIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 8, id_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNamespaceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_);
+ }
+ if (topK_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(2, topK_);
+ }
+ if (filter_ != null) {
+ 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 (!getIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, id_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.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 (!getId()
+ .equals(other.getId())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + 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();
+ }
+ hash = (37 * hash) + ID_FIELD_NUMBER;
+ hash = (53 * hash) + getId().hashCode();
+ hash = (29 * hash) + unknownFields.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
+ * The namespace to query. + *+ * + *
string namespace = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The namespace to query. + *+ * + *
string namespace = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearNamespace() {
+
+ namespace_ = getDefaultInstance().getNamespace();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The namespace to query. + *+ * + *
string namespace = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+
+ private int topK_ ;
+ /**
+ * + * The number of results to return for each query. + *+ * + *
uint32 top_k = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The topK.
+ */
+ @java.lang.Override
+ public int getTopK() {
+ return topK_;
+ }
+ /**
+ * + * The number of results to return for each query. + *+ * + *
uint32 top_k = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The topK to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTopK(int value) {
+
+ topK_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The number of results to return for each query. + *+ * + *
uint32 top_k = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearTopK() {
+
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the filter field is set.
+ */
+ public boolean hasFilter() {
+ return filterBuilder_ != null || filter_ != null;
+ }
+ /**
+ * + * 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder setFilter(com.google.protobuf.Struct value) {
+ if (filterBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ filter_ = value;
+ onChanged();
+ } else {
+ filterBuilder_.setMessage(value);
+ }
+
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder setFilter(
+ com.google.protobuf.Struct.Builder builderForValue) {
+ if (filterBuilder_ == null) {
+ filter_ = builderForValue.build();
+ onChanged();
+ } else {
+ filterBuilder_.setMessage(builderForValue.build());
+ }
+
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder mergeFilter(com.google.protobuf.Struct value) {
+ if (filterBuilder_ == null) {
+ if (filter_ != null) {
+ filter_ =
+ com.google.protobuf.Struct.newBuilder(filter_).mergeFrom(value).buildPartial();
+ } else {
+ filter_ = value;
+ }
+ onChanged();
+ } else {
+ filterBuilder_.mergeFrom(value);
+ }
+
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder clearFilter() {
+ if (filterBuilder_ == null) {
+ filter_ = null;
+ onChanged();
+ } else {
+ filter_ = null;
+ filterBuilder_ = null;
+ }
+
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public com.google.protobuf.Struct.Builder getFilterBuilder() {
+
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The includeValues.
+ */
+ @java.lang.Override
+ public boolean getIncludeValues() {
+ return includeValues_;
+ }
+ /**
+ * + * Indicates whether vector values are included in the response. + *+ * + *
bool include_values = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The includeValues to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIncludeValues(boolean value) {
+
+ includeValues_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Indicates whether vector values are included in the response. + *+ * + *
bool include_values = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearIncludeValues() {
+
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The includeMetadata to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIncludeMetadata(boolean value) {
+
+ includeMetadata_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Indicates whether metadata is included in the response as well as the ids. + *+ * + *
bool include_metadata = 5 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearIncludeMetadata() {
+
+ includeMetadata_ = false;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List+ * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated public java.util.List+ * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated public int getQueriesCount() {
+ if (queriesBuilder_ == null) {
+ return queries_.size();
+ } else {
+ return queriesBuilder_.getCount();
+ }
+ }
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @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. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @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. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @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. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @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. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @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. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @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. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @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. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated public Builder addAllQueries(
+ java.lang.Iterable extends io.pinecone.proto.QueryVector> values) {
+ if (queriesBuilder_ == null) {
+ ensureQueriesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, queries_);
+ onChanged();
+ } else {
+ queriesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated public Builder clearQueries() {
+ if (queriesBuilder_ == null) {
+ queries_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ queriesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @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. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated public io.pinecone.proto.QueryVector.Builder getQueriesBuilder(
+ int index) {
+ return getQueriesFieldBuilder().getBuilder(index);
+ }
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @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. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated public java.util.List extends io.pinecone.proto.QueryVectorOrBuilder>
+ getQueriesOrBuilderList() {
+ if (queriesBuilder_ != null) {
+ return queriesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(queries_);
+ }
+ }
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated public io.pinecone.proto.QueryVector.Builder addQueriesBuilder() {
+ return getQueriesFieldBuilder().addBuilder(
+ io.pinecone.proto.QueryVector.getDefaultInstance());
+ }
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @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. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated public java.util.List+ * The query vector. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the vector.
+ */
+ public java.util.List+ * The query vector. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The query vector. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The vector to add.
+ * @return This builder for chaining.
+ */
+ public Builder addVector(float value) {
+ ensureVectorIsMutable();
+ vector_.addFloat(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The query vector. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param values The vector to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllVector(
+ java.lang.Iterable extends java.lang.Float> values) {
+ ensureVectorIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, vector_);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The query vector. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearVector() {
+ vector_ = emptyFloatList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object id_ = "";
+ /**
+ * + * The vector's unique id. + *+ * + *
string id = 8 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 vector's unique id. + *+ * + *
string id = 8 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 vector's unique id. + *+ * + *
string id = 8 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The vector's unique id. + *+ * + *
string id = 8 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearId() {
+
+ id_ = getDefaultInstance().getId();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The vector's unique id. + *+ * + *
string id = 8 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ 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+ * The namespace to query. + *+ * + *
string namespace = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The namespace.
+ */
+ java.lang.String getNamespace();
+ /**
+ * + * The namespace to query. + *+ * + *
string namespace = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The bytes for namespace.
+ */
+ com.google.protobuf.ByteString
+ getNamespaceBytes();
+
+ /**
+ * + * The number of results to return for each query. + *+ * + *
uint32 top_k = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The topK.
+ */
+ int getTopK();
+
+ /**
+ * + * 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the filter field is set.
+ */
+ boolean hasFilter();
+ /**
+ * + * 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The filter.
+ */
+ com.google.protobuf.Struct getFilter();
+ /**
+ * + * 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ com.google.protobuf.StructOrBuilder getFilterOrBuilder();
+
+ /**
+ * + * Indicates whether vector values are included in the response. + *+ * + *
bool include_values = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The includeValues.
+ */
+ boolean getIncludeValues();
+
+ /**
+ * + * Indicates whether metadata is included in the response as well as the ids. + *+ * + *
bool include_metadata = 5 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The includeMetadata.
+ */
+ boolean getIncludeMetadata();
+
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated java.util.List+ * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated io.pinecone.proto.QueryVector getQueries(int index);
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated int getQueriesCount();
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated java.util.List extends io.pinecone.proto.QueryVectorOrBuilder>
+ getQueriesOrBuilderList();
+ /**
+ * + * DEPRECATED. The query vectors. + *+ * + *
repeated .QueryVector queries = 6 [deprecated = true, (.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Deprecated io.pinecone.proto.QueryVectorOrBuilder getQueriesOrBuilder(
+ int index);
+
+ /**
+ * + * The query vector. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the vector.
+ */
+ java.util.List+ * The query vector. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of vector.
+ */
+ int getVectorCount();
+ /**
+ * + * The query vector. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float vector = 7 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the element to return.
+ * @return The vector at the given index.
+ */
+ float getVector(int index);
+
+ /**
+ * + * The vector's unique id. + *+ * + *
string id = 8 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The id.
+ */
+ java.lang.String getId();
+ /**
+ * + * The vector's unique id. + *+ * + *
string id = 8 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The bytes for id.
+ */
+ com.google.protobuf.ByteString
+ getIdBytes();
+}
diff --git a/src/main/java/io/pinecone/proto/QueryResponse.java b/src/main/java/io/pinecone/proto/QueryResponse.java
new file mode 100644
index 00000000..6f637f8f
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/QueryResponse.java
@@ -0,0 +1,1476 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+package io.pinecone.proto;
+
+/**
+ * + * The response for the `Query` operation. These are the matches found for a particular query vector. The matches are ordered from most similar to least similar. + *+ * + * Protobuf type {@code QueryResponse} + */ +public final class QueryResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:QueryResponse) + QueryResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueryResponse.newBuilder() to construct. + private QueryResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private QueryResponse() { + results_ = java.util.Collections.emptyList(); + matches_ = java.util.Collections.emptyList(); + namespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueryResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QueryResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + results_ = new java.util.ArrayList
+ * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Override
+ @java.lang.Deprecated public java.util.List+ * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Override
+ @java.lang.Deprecated public java.util.List extends io.pinecone.proto.SingleQueryResultsOrBuilder>
+ getResultsOrBuilderList() {
+ return results_;
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Override
+ @java.lang.Deprecated public int getResultsCount() {
+ return results_.size();
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Override
+ @java.lang.Deprecated public io.pinecone.proto.SingleQueryResults getResults(int index) {
+ return results_.get(index);
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Override
+ @java.lang.Deprecated public io.pinecone.proto.SingleQueryResultsOrBuilder getResultsOrBuilder(
+ int index) {
+ return results_.get(index);
+ }
+
+ public static final int MATCHES_FIELD_NUMBER = 2;
+ private java.util.List+ * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ @java.lang.Override
+ public java.util.List+ * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ @java.lang.Override
+ public java.util.List extends io.pinecone.proto.ScoredVectorOrBuilder>
+ getMatchesOrBuilderList() {
+ return matches_;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ @java.lang.Override
+ public int getMatchesCount() {
+ return matches_.size();
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ @java.lang.Override
+ public io.pinecone.proto.ScoredVector getMatches(int index) {
+ return matches_.get(index);
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ @java.lang.Override
+ public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder(
+ int index) {
+ return matches_.get(index);
+ }
+
+ public static final int NAMESPACE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object namespace_;
+ /**
+ * + * The namespace for the vectors. + *+ * + *
string namespace = 3;
+ * @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 for the vectors. + *+ * + *
string namespace = 3;
+ * @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;
+ }
+ }
+
+ 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 {
+ for (int i = 0; i < results_.size(); i++) {
+ output.writeMessage(1, results_.get(i));
+ }
+ for (int i = 0; i < matches_.size(); i++) {
+ output.writeMessage(2, matches_.get(i));
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, namespace_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < results_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, results_.get(i));
+ }
+ for (int i = 0; i < matches_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, matches_.get(i));
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, namespace_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.pinecone.proto.QueryResponse)) {
+ return super.equals(obj);
+ }
+ io.pinecone.proto.QueryResponse other = (io.pinecone.proto.QueryResponse) obj;
+
+ if (!getResultsList()
+ .equals(other.getResultsList())) return false;
+ if (!getMatchesList()
+ .equals(other.getMatchesList())) return false;
+ if (!getNamespace()
+ .equals(other.getNamespace())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getResultsCount() > 0) {
+ hash = (37 * hash) + RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getResultsList().hashCode();
+ }
+ if (getMatchesCount() > 0) {
+ hash = (37 * hash) + MATCHES_FIELD_NUMBER;
+ hash = (53 * hash) + getMatchesList().hashCode();
+ }
+ hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
+ hash = (53 * hash) + getNamespace().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.pinecone.proto.QueryResponse parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.QueryResponse 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.QueryResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.QueryResponse 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.QueryResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.QueryResponse parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.pinecone.proto.QueryResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.QueryResponse 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.QueryResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.QueryResponse 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.QueryResponse parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.QueryResponse 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.QueryResponse 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 response for the `Query` operation. These are the matches found for a particular query vector. The matches are ordered from most similar to least similar. + *+ * + * Protobuf type {@code QueryResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public java.util.List+ * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public int getResultsCount() {
+ if (resultsBuilder_ == null) {
+ return results_.size();
+ } else {
+ return resultsBuilder_.getCount();
+ }
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public io.pinecone.proto.SingleQueryResults getResults(int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public Builder setResults(
+ int index, io.pinecone.proto.SingleQueryResults value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.set(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public Builder setResults(
+ int index, io.pinecone.proto.SingleQueryResults.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public Builder addResults(io.pinecone.proto.SingleQueryResults value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public Builder addResults(
+ int index, io.pinecone.proto.SingleQueryResults value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public Builder addResults(
+ io.pinecone.proto.SingleQueryResults.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public Builder addResults(
+ int index, io.pinecone.proto.SingleQueryResults.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public Builder addAllResults(
+ java.lang.Iterable extends io.pinecone.proto.SingleQueryResults> values) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, results_);
+ onChanged();
+ } else {
+ resultsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public Builder clearResults() {
+ if (resultsBuilder_ == null) {
+ results_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ resultsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public Builder removeResults(int index) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.remove(index);
+ onChanged();
+ } else {
+ resultsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public io.pinecone.proto.SingleQueryResults.Builder getResultsBuilder(
+ int index) {
+ return getResultsFieldBuilder().getBuilder(index);
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public io.pinecone.proto.SingleQueryResultsOrBuilder getResultsOrBuilder(
+ int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index); } else {
+ return resultsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public java.util.List extends io.pinecone.proto.SingleQueryResultsOrBuilder>
+ getResultsOrBuilderList() {
+ if (resultsBuilder_ != null) {
+ return resultsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(results_);
+ }
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public io.pinecone.proto.SingleQueryResults.Builder addResultsBuilder() {
+ return getResultsFieldBuilder().addBuilder(
+ io.pinecone.proto.SingleQueryResults.getDefaultInstance());
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public io.pinecone.proto.SingleQueryResults.Builder addResultsBuilder(
+ int index) {
+ return getResultsFieldBuilder().addBuilder(
+ index, io.pinecone.proto.SingleQueryResults.getDefaultInstance());
+ }
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated public java.util.List+ * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public java.util.List+ * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public int getMatchesCount() {
+ if (matchesBuilder_ == null) {
+ return matches_.size();
+ } else {
+ return matchesBuilder_.getCount();
+ }
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public io.pinecone.proto.ScoredVector getMatches(int index) {
+ if (matchesBuilder_ == null) {
+ return matches_.get(index);
+ } else {
+ return matchesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public Builder setMatches(
+ int index, io.pinecone.proto.ScoredVector value) {
+ if (matchesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMatchesIsMutable();
+ matches_.set(index, value);
+ onChanged();
+ } else {
+ matchesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public Builder setMatches(
+ int index, io.pinecone.proto.ScoredVector.Builder builderForValue) {
+ if (matchesBuilder_ == null) {
+ ensureMatchesIsMutable();
+ matches_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ matchesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public Builder addMatches(io.pinecone.proto.ScoredVector value) {
+ if (matchesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMatchesIsMutable();
+ matches_.add(value);
+ onChanged();
+ } else {
+ matchesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public Builder addMatches(
+ int index, io.pinecone.proto.ScoredVector value) {
+ if (matchesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMatchesIsMutable();
+ matches_.add(index, value);
+ onChanged();
+ } else {
+ matchesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public Builder addMatches(
+ io.pinecone.proto.ScoredVector.Builder builderForValue) {
+ if (matchesBuilder_ == null) {
+ ensureMatchesIsMutable();
+ matches_.add(builderForValue.build());
+ onChanged();
+ } else {
+ matchesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public Builder addMatches(
+ int index, io.pinecone.proto.ScoredVector.Builder builderForValue) {
+ if (matchesBuilder_ == null) {
+ ensureMatchesIsMutable();
+ matches_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ matchesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public Builder addAllMatches(
+ java.lang.Iterable extends io.pinecone.proto.ScoredVector> values) {
+ if (matchesBuilder_ == null) {
+ ensureMatchesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, matches_);
+ onChanged();
+ } else {
+ matchesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public Builder clearMatches() {
+ if (matchesBuilder_ == null) {
+ matches_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ matchesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public Builder removeMatches(int index) {
+ if (matchesBuilder_ == null) {
+ ensureMatchesIsMutable();
+ matches_.remove(index);
+ onChanged();
+ } else {
+ matchesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public io.pinecone.proto.ScoredVector.Builder getMatchesBuilder(
+ int index) {
+ return getMatchesFieldBuilder().getBuilder(index);
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder(
+ int index) {
+ if (matchesBuilder_ == null) {
+ return matches_.get(index); } else {
+ return matchesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public java.util.List extends io.pinecone.proto.ScoredVectorOrBuilder>
+ getMatchesOrBuilderList() {
+ if (matchesBuilder_ != null) {
+ return matchesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(matches_);
+ }
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder() {
+ return getMatchesFieldBuilder().addBuilder(
+ io.pinecone.proto.ScoredVector.getDefaultInstance());
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder(
+ int index) {
+ return getMatchesFieldBuilder().addBuilder(
+ index, io.pinecone.proto.ScoredVector.getDefaultInstance());
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ public java.util.List+ * The namespace for the vectors. + *+ * + *
string namespace = 3;
+ * @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 for the vectors. + *+ * + *
string namespace = 3;
+ * @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 for the vectors. + *+ * + *
string namespace = 3;
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The namespace for the vectors. + *+ * + *
string namespace = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearNamespace() {
+
+ namespace_ = getDefaultInstance().getNamespace();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The namespace for the vectors. + *+ * + *
string namespace = 3;
+ * @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;
+ 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:QueryResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:QueryResponse)
+ private static final io.pinecone.proto.QueryResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.pinecone.proto.QueryResponse();
+ }
+
+ public static io.pinecone.proto.QueryResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated java.util.List+ * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated io.pinecone.proto.SingleQueryResults getResults(int index);
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated int getResultsCount();
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated java.util.List extends io.pinecone.proto.SingleQueryResultsOrBuilder>
+ getResultsOrBuilderList();
+ /**
+ * + * DEPRECATED. The results of each query. The order is the same as `QueryRequest.queries`. + *+ * + *
repeated .SingleQueryResults results = 1 [deprecated = true];
+ */
+ @java.lang.Deprecated io.pinecone.proto.SingleQueryResultsOrBuilder getResultsOrBuilder(
+ int index);
+
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ java.util.List+ * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ io.pinecone.proto.ScoredVector getMatches(int index);
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ int getMatchesCount();
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ java.util.List extends io.pinecone.proto.ScoredVectorOrBuilder>
+ getMatchesOrBuilderList();
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 2;
+ */
+ io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder(
+ int index);
+
+ /**
+ * + * The namespace for the vectors. + *+ * + *
string namespace = 3;
+ * @return The namespace.
+ */
+ java.lang.String getNamespace();
+ /**
+ * + * The namespace for the vectors. + *+ * + *
string namespace = 3;
+ * @return The bytes for namespace.
+ */
+ com.google.protobuf.ByteString
+ getNamespaceBytes();
+}
diff --git a/src/main/java/io/pinecone/proto/QueryVector.java b/src/main/java/io/pinecone/proto/QueryVector.java
new file mode 100644
index 00000000..17a6f93c
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/QueryVector.java
@@ -0,0 +1,1126 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+package io.pinecone.proto;
+
+/**
+ * + * A single query vector within a `QueryRequest`. + *+ * + * Protobuf type {@code QueryVector} + */ +public final class QueryVector extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:QueryVector) + QueryVectorOrBuilder { +private static final long serialVersionUID = 0L; + // Use QueryVector.newBuilder() to construct. + private QueryVector(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private QueryVector() { + values_ = emptyFloatList(); + namespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QueryVector(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QueryVector( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + values_.addFloat(input.readFloat()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + values_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + values_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 16: { + + topK_ = input.readUInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + namespace_ = s; + break; + } + case 34: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (filter_ != null) { + subBuilder = filter_.toBuilder(); + } + filter_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(filter_); + filter_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryVector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_QueryVector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.pinecone.proto.QueryVector.class, io.pinecone.proto.QueryVector.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.FloatList values_; + /** + *
+ * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the values.
+ */
+ @java.lang.Override
+ public java.util.List+ * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of values.
+ */
+ public int getValuesCount() {
+ return values_.size();
+ }
+ /**
+ * + * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 TOP_K_FIELD_NUMBER = 2;
+ private int topK_;
+ /**
+ * + * An override for the number of results to return for this query vector. + *+ * + *
uint32 top_k = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The topK.
+ */
+ @java.lang.Override
+ public int getTopK() {
+ return topK_;
+ }
+
+ public static final int NAMESPACE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object namespace_;
+ /**
+ * + * An override the namespace to search. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * + * An override the namespace to search. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 FILTER_FIELD_NUMBER = 4;
+ private com.google.protobuf.Struct filter_;
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the filter field is set.
+ */
+ @java.lang.Override
+ public boolean hasFilter() {
+ return filter_ != null;
+ }
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The filter.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Struct getFilter() {
+ return filter_ == null ? com.google.protobuf.Struct.getDefaultInstance() : filter_;
+ }
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() {
+ return getFilter();
+ }
+
+ 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 (getValuesList().size() > 0) {
+ output.writeUInt32NoTag(10);
+ output.writeUInt32NoTag(valuesMemoizedSerializedSize);
+ }
+ for (int i = 0; i < values_.size(); i++) {
+ output.writeFloatNoTag(values_.getFloat(i));
+ }
+ if (topK_ != 0) {
+ output.writeUInt32(2, topK_);
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, namespace_);
+ }
+ if (filter_ != null) {
+ output.writeMessage(4, getFilter());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ dataSize = 4 * getValuesList().size();
+ size += dataSize;
+ if (!getValuesList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32SizeNoTag(dataSize);
+ }
+ valuesMemoizedSerializedSize = dataSize;
+ }
+ if (topK_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(2, topK_);
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, namespace_);
+ }
+ if (filter_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, getFilter());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.pinecone.proto.QueryVector)) {
+ return super.equals(obj);
+ }
+ io.pinecone.proto.QueryVector other = (io.pinecone.proto.QueryVector) obj;
+
+ if (!getValuesList()
+ .equals(other.getValuesList())) return false;
+ if (getTopK()
+ != other.getTopK()) return false;
+ if (!getNamespace()
+ .equals(other.getNamespace())) return false;
+ if (hasFilter() != other.hasFilter()) return false;
+ if (hasFilter()) {
+ if (!getFilter()
+ .equals(other.getFilter())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getValuesCount() > 0) {
+ hash = (37 * hash) + VALUES_FIELD_NUMBER;
+ hash = (53 * hash) + getValuesList().hashCode();
+ }
+ hash = (37 * hash) + TOP_K_FIELD_NUMBER;
+ hash = (53 * hash) + getTopK();
+ hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
+ hash = (53 * hash) + getNamespace().hashCode();
+ if (hasFilter()) {
+ hash = (37 * hash) + FILTER_FIELD_NUMBER;
+ hash = (53 * hash) + getFilter().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.pinecone.proto.QueryVector parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.QueryVector 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.QueryVector parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.QueryVector 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.QueryVector parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.QueryVector parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.pinecone.proto.QueryVector parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.QueryVector 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.QueryVector parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.QueryVector 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.QueryVector parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.QueryVector 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.QueryVector 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;
+ }
+ /**
+ * + * A single query vector within a `QueryRequest`. + *+ * + * Protobuf type {@code QueryVector} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the values.
+ */
+ public java.util.List+ * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of values.
+ */
+ public int getValuesCount() {
+ return values_.size();
+ }
+ /**
+ * + * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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);
+ }
+ /**
+ * + * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The values to add.
+ * @return This builder for chaining.
+ */
+ public Builder addValues(float value) {
+ ensureValuesIsMutable();
+ values_.addFloat(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param values The values to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllValues(
+ java.lang.Iterable extends java.lang.Float> values) {
+ ensureValuesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, values_);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearValues() {
+ values_ = emptyFloatList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ private int topK_ ;
+ /**
+ * + * An override for the number of results to return for this query vector. + *+ * + *
uint32 top_k = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The topK.
+ */
+ @java.lang.Override
+ public int getTopK() {
+ return topK_;
+ }
+ /**
+ * + * An override for the number of results to return for this query vector. + *+ * + *
uint32 top_k = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The topK to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTopK(int value) {
+
+ topK_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * An override for the number of results to return for this query vector. + *+ * + *
uint32 top_k = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearTopK() {
+
+ topK_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object namespace_ = "";
+ /**
+ * + * An override the namespace to search. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * + * An override the namespace to search. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * + * An override the namespace to search. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * An override the namespace to search. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearNamespace() {
+
+ namespace_ = getDefaultInstance().getNamespace();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * An override the namespace to search. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ 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_;
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the filter field is set.
+ */
+ public boolean hasFilter() {
+ return filterBuilder_ != null || filter_ != null;
+ }
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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();
+ }
+ }
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder setFilter(com.google.protobuf.Struct value) {
+ if (filterBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ filter_ = value;
+ onChanged();
+ } else {
+ filterBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder setFilter(
+ com.google.protobuf.Struct.Builder builderForValue) {
+ if (filterBuilder_ == null) {
+ filter_ = builderForValue.build();
+ onChanged();
+ } else {
+ filterBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder mergeFilter(com.google.protobuf.Struct value) {
+ if (filterBuilder_ == null) {
+ if (filter_ != null) {
+ filter_ =
+ com.google.protobuf.Struct.newBuilder(filter_).mergeFrom(value).buildPartial();
+ } else {
+ filter_ = value;
+ }
+ onChanged();
+ } else {
+ filterBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder clearFilter() {
+ if (filterBuilder_ == null) {
+ filter_ = null;
+ onChanged();
+ } else {
+ filter_ = null;
+ filterBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public com.google.protobuf.Struct.Builder getFilterBuilder() {
+
+ onChanged();
+ return getFilterFieldBuilder().getBuilder();
+ }
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public com.google.protobuf.StructOrBuilder getFilterOrBuilder() {
+ if (filterBuilder_ != null) {
+ return filterBuilder_.getMessageOrBuilder();
+ } else {
+ return filter_ == null ?
+ com.google.protobuf.Struct.getDefaultInstance() : filter_;
+ }
+ }
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ 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_;
+ }
+ @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:QueryVector)
+ }
+
+ // @@protoc_insertion_point(class_scope:QueryVector)
+ private static final io.pinecone.proto.QueryVector DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.pinecone.proto.QueryVector();
+ }
+
+ public static io.pinecone.proto.QueryVector getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the values.
+ */
+ java.util.List+ * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of values.
+ */
+ int getValuesCount();
+ /**
+ * + * The query vector values. This should be the same length as the dimension of the index being queried. + *+ * + *
repeated float values = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the element to return.
+ * @return The values at the given index.
+ */
+ float getValues(int index);
+
+ /**
+ * + * An override for the number of results to return for this query vector. + *+ * + *
uint32 top_k = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The topK.
+ */
+ int getTopK();
+
+ /**
+ * + * An override the namespace to search. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The namespace.
+ */
+ java.lang.String getNamespace();
+ /**
+ * + * An override the namespace to search. + *+ * + *
string namespace = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The bytes for namespace.
+ */
+ com.google.protobuf.ByteString
+ getNamespaceBytes();
+
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the filter field is set.
+ */
+ boolean hasFilter();
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The filter.
+ */
+ com.google.protobuf.Struct getFilter();
+ /**
+ * + * An override for the metadata filter to apply. This replaces the request-level filter. + *+ * + *
.google.protobuf.Struct filter = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ com.google.protobuf.StructOrBuilder getFilterOrBuilder();
+}
diff --git a/src/main/java/io/pinecone/proto/ScoredVector.java b/src/main/java/io/pinecone/proto/ScoredVector.java
new file mode 100644
index 00000000..e685e89b
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/ScoredVector.java
@@ -0,0 +1,1120 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+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();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ScoredVector(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ id_ = s;
+ break;
+ }
+ case 21: {
+
+ score_ = input.readFloat();
+ break;
+ }
+ case 29: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ values_ = newFloatList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ values_.addFloat(input.readFloat());
+ break;
+ }
+ case 26: {
+ int length = input.readRawVarint32();
+ int limit = input.pushLimit(length);
+ if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
+ values_ = newFloatList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ while (input.getBytesUntilLimit() > 0) {
+ values_.addFloat(input.readFloat());
+ }
+ input.popLimit(limit);
+ break;
+ }
+ case 34: {
+ com.google.protobuf.Struct.Builder subBuilder = null;
+ if (metadata_ != null) {
+ subBuilder = metadata_.toBuilder();
+ }
+ metadata_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(metadata_);
+ metadata_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000001) != 0)) {
+ values_.makeImmutable(); // C
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ 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);
+ }
+
+ public static final int ID_FIELD_NUMBER = 1;
+ private volatile java.lang.Object id_;
+ /**
+ * + * This is the vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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_;
+ /**
+ * + * 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The score.
+ */
+ @java.lang.Override
+ public float getScore() {
+ return score_;
+ }
+
+ public static final int VALUES_FIELD_NUMBER = 3;
+ private com.google.protobuf.Internal.FloatList values_;
+ /**
+ * + * This is the vector data, if it is requested. + *+ * + *
repeated float values = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the values.
+ */
+ @java.lang.Override
+ public java.util.List+ * This is the vector data, if it is requested. + *+ * + *
repeated float values = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of values.
+ */
+ public int getValuesCount() {
+ return values_.size();
+ }
+ /**
+ * + * This is the vector data, if it is requested. + *+ * + *
repeated float values = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 METADATA_FIELD_NUMBER = 4;
+ private com.google.protobuf.Struct metadata_;
+ /**
+ * + * This is the metadata, if it is requested. + *+ * + *
.google.protobuf.Struct metadata = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the metadata field is set.
+ */
+ @java.lang.Override
+ public boolean hasMetadata() {
+ return metadata_ != null;
+ }
+ /**
+ * + * This is the metadata, if it is requested. + *+ * + *
.google.protobuf.Struct metadata = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
+ return getMetadata();
+ }
+
+ 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 (!getIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
+ }
+ if (score_ != 0F) {
+ 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 (metadata_ != null) {
+ output.writeMessage(4, getMetadata());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
+ }
+ if (score_ != 0F) {
+ 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 (metadata_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, getMetadata());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.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 (hasMetadata() != other.hasMetadata()) return false;
+ if (hasMetadata()) {
+ if (!getMetadata()
+ .equals(other.getMetadata())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + 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 (hasMetadata()) {
+ hash = (37 * hash) + METADATA_FIELD_NUMBER;
+ hash = (53 * hash) + getMetadata().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.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+ * This is the vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This is the vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearId() {
+
+ id_ = getDefaultInstance().getId();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This is the vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The score to set.
+ * @return This builder for chaining.
+ */
+ public Builder setScore(float value) {
+
+ score_ = value;
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearScore() {
+
+ score_ = 0F;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.FloatList values_ = emptyFloatList();
+ private void ensureValuesIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ values_ = mutableCopy(values_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+ /**
+ * + * This is the vector data, if it is requested. + *+ * + *
repeated float values = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the values.
+ */
+ public java.util.List+ * This is the vector data, if it is requested. + *+ * + *
repeated float values = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of values.
+ */
+ public int getValuesCount() {
+ return values_.size();
+ }
+ /**
+ * + * This is the vector data, if it is requested. + *+ * + *
repeated float values = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This is the vector data, if it is requested. + *+ * + *
repeated float values = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The values to add.
+ * @return This builder for chaining.
+ */
+ public Builder addValues(float value) {
+ ensureValuesIsMutable();
+ values_.addFloat(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This is the vector data, if it is requested. + *+ * + *
repeated float values = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param values The values to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllValues(
+ java.lang.Iterable extends java.lang.Float> values) {
+ ensureValuesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, values_);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This is the vector data, if it is requested. + *+ * + *
repeated float values = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearValues() {
+ values_ = emptyFloatList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the metadata field is set.
+ */
+ public boolean hasMetadata() {
+ return metadataBuilder_ != null || metadata_ != null;
+ }
+ /**
+ * + * This is the metadata, if it is requested. + *+ * + *
.google.protobuf.Struct metadata = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder setMetadata(com.google.protobuf.Struct value) {
+ if (metadataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ metadata_ = value;
+ onChanged();
+ } else {
+ metadataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * This is the metadata, if it is requested. + *+ * + *
.google.protobuf.Struct metadata = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder setMetadata(
+ com.google.protobuf.Struct.Builder builderForValue) {
+ if (metadataBuilder_ == null) {
+ metadata_ = builderForValue.build();
+ onChanged();
+ } else {
+ metadataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * This is the metadata, if it is requested. + *+ * + *
.google.protobuf.Struct metadata = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder mergeMetadata(com.google.protobuf.Struct value) {
+ if (metadataBuilder_ == null) {
+ if (metadata_ != null) {
+ metadata_ =
+ com.google.protobuf.Struct.newBuilder(metadata_).mergeFrom(value).buildPartial();
+ } else {
+ metadata_ = value;
+ }
+ onChanged();
+ } else {
+ metadataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * This is the metadata, if it is requested. + *+ * + *
.google.protobuf.Struct metadata = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder clearMetadata() {
+ if (metadataBuilder_ == null) {
+ metadata_ = null;
+ onChanged();
+ } else {
+ metadata_ = null;
+ metadataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * This is the metadata, if it is requested. + *+ * + *
.google.protobuf.Struct metadata = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public com.google.protobuf.Struct.Builder getMetadataBuilder() {
+
+ onChanged();
+ return getMetadataFieldBuilder().getBuilder();
+ }
+ /**
+ * + * This is the metadata, if it is requested. + *+ * + *
.google.protobuf.Struct metadata = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ 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+ * This is the vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The id.
+ */
+ java.lang.String getId();
+ /**
+ * + * This is the vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The bytes for id.
+ */
+ com.google.protobuf.ByteString
+ getIdBytes();
+
+ /**
+ * + * 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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The score.
+ */
+ float getScore();
+
+ /**
+ * + * This is the vector data, if it is requested. + *+ * + *
repeated float values = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the values.
+ */
+ java.util.List+ * This is the vector data, if it is requested. + *+ * + *
repeated float values = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of values.
+ */
+ int getValuesCount();
+ /**
+ * + * This is the vector data, if it is requested. + *+ * + *
repeated float values = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the element to return.
+ * @return The values at the given index.
+ */
+ float getValues(int index);
+
+ /**
+ * + * This is the metadata, if it is requested. + *+ * + *
.google.protobuf.Struct metadata = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the metadata field is set.
+ */
+ boolean hasMetadata();
+ /**
+ * + * This is the metadata, if it is requested. + *+ * + *
.google.protobuf.Struct metadata = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The metadata.
+ */
+ com.google.protobuf.Struct getMetadata();
+ /**
+ * + * This is the metadata, if it is requested. + *+ * + *
.google.protobuf.Struct metadata = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ com.google.protobuf.StructOrBuilder getMetadataOrBuilder();
+}
diff --git a/src/main/java/io/pinecone/proto/SingleQueryResults.java b/src/main/java/io/pinecone/proto/SingleQueryResults.java
new file mode 100644
index 00000000..4310ba28
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/SingleQueryResults.java
@@ -0,0 +1,1036 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+package io.pinecone.proto;
+
+/**
+ * + * The query results for a single `QueryVector` + *+ * + * Protobuf type {@code SingleQueryResults} + */ +public final class SingleQueryResults extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SingleQueryResults) + SingleQueryResultsOrBuilder { +private static final long serialVersionUID = 0L; + // Use SingleQueryResults.newBuilder() to construct. + private SingleQueryResults(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private SingleQueryResults() { + matches_ = java.util.Collections.emptyList(); + namespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SingleQueryResults(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SingleQueryResults( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + matches_ = new java.util.ArrayList
+ * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ @java.lang.Override
+ public java.util.List+ * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ @java.lang.Override
+ public java.util.List extends io.pinecone.proto.ScoredVectorOrBuilder>
+ getMatchesOrBuilderList() {
+ return matches_;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ @java.lang.Override
+ public int getMatchesCount() {
+ return matches_.size();
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ @java.lang.Override
+ public io.pinecone.proto.ScoredVector getMatches(int index) {
+ return matches_.get(index);
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ @java.lang.Override
+ public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder(
+ int index) {
+ return matches_.get(index);
+ }
+
+ public static final int NAMESPACE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object namespace_;
+ /**
+ * + * The namespace for the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 for the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+
+ 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 {
+ for (int i = 0; i < matches_.size(); i++) {
+ output.writeMessage(1, matches_.get(i));
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespace_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < matches_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, matches_.get(i));
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespace_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.pinecone.proto.SingleQueryResults)) {
+ return super.equals(obj);
+ }
+ io.pinecone.proto.SingleQueryResults other = (io.pinecone.proto.SingleQueryResults) obj;
+
+ if (!getMatchesList()
+ .equals(other.getMatchesList())) return false;
+ if (!getNamespace()
+ .equals(other.getNamespace())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getMatchesCount() > 0) {
+ hash = (37 * hash) + MATCHES_FIELD_NUMBER;
+ hash = (53 * hash) + getMatchesList().hashCode();
+ }
+ hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
+ hash = (53 * hash) + getNamespace().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.pinecone.proto.SingleQueryResults parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.SingleQueryResults 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.SingleQueryResults parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.SingleQueryResults 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.SingleQueryResults parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.SingleQueryResults parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.pinecone.proto.SingleQueryResults parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.SingleQueryResults 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.SingleQueryResults parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.SingleQueryResults 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.SingleQueryResults parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.SingleQueryResults 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.SingleQueryResults 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 query results for a single `QueryVector` + *+ * + * Protobuf type {@code SingleQueryResults} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public java.util.List+ * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public int getMatchesCount() {
+ if (matchesBuilder_ == null) {
+ return matches_.size();
+ } else {
+ return matchesBuilder_.getCount();
+ }
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public io.pinecone.proto.ScoredVector getMatches(int index) {
+ if (matchesBuilder_ == null) {
+ return matches_.get(index);
+ } else {
+ return matchesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public Builder setMatches(
+ int index, io.pinecone.proto.ScoredVector value) {
+ if (matchesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMatchesIsMutable();
+ matches_.set(index, value);
+ onChanged();
+ } else {
+ matchesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public Builder setMatches(
+ int index, io.pinecone.proto.ScoredVector.Builder builderForValue) {
+ if (matchesBuilder_ == null) {
+ ensureMatchesIsMutable();
+ matches_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ matchesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public Builder addMatches(io.pinecone.proto.ScoredVector value) {
+ if (matchesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMatchesIsMutable();
+ matches_.add(value);
+ onChanged();
+ } else {
+ matchesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public Builder addMatches(
+ int index, io.pinecone.proto.ScoredVector value) {
+ if (matchesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMatchesIsMutable();
+ matches_.add(index, value);
+ onChanged();
+ } else {
+ matchesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public Builder addMatches(
+ io.pinecone.proto.ScoredVector.Builder builderForValue) {
+ if (matchesBuilder_ == null) {
+ ensureMatchesIsMutable();
+ matches_.add(builderForValue.build());
+ onChanged();
+ } else {
+ matchesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public Builder addMatches(
+ int index, io.pinecone.proto.ScoredVector.Builder builderForValue) {
+ if (matchesBuilder_ == null) {
+ ensureMatchesIsMutable();
+ matches_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ matchesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public Builder addAllMatches(
+ java.lang.Iterable extends io.pinecone.proto.ScoredVector> values) {
+ if (matchesBuilder_ == null) {
+ ensureMatchesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, matches_);
+ onChanged();
+ } else {
+ matchesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public Builder clearMatches() {
+ if (matchesBuilder_ == null) {
+ matches_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ matchesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public Builder removeMatches(int index) {
+ if (matchesBuilder_ == null) {
+ ensureMatchesIsMutable();
+ matches_.remove(index);
+ onChanged();
+ } else {
+ matchesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public io.pinecone.proto.ScoredVector.Builder getMatchesBuilder(
+ int index) {
+ return getMatchesFieldBuilder().getBuilder(index);
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder(
+ int index) {
+ if (matchesBuilder_ == null) {
+ return matches_.get(index); } else {
+ return matchesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public java.util.List extends io.pinecone.proto.ScoredVectorOrBuilder>
+ getMatchesOrBuilderList() {
+ if (matchesBuilder_ != null) {
+ return matchesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(matches_);
+ }
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder() {
+ return getMatchesFieldBuilder().addBuilder(
+ io.pinecone.proto.ScoredVector.getDefaultInstance());
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public io.pinecone.proto.ScoredVector.Builder addMatchesBuilder(
+ int index) {
+ return getMatchesFieldBuilder().addBuilder(
+ index, io.pinecone.proto.ScoredVector.getDefaultInstance());
+ }
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ public java.util.List+ * The namespace for the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 for the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 for the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The namespace for the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearNamespace() {
+
+ namespace_ = getDefaultInstance().getNamespace();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The namespace for the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ 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:SingleQueryResults)
+ }
+
+ // @@protoc_insertion_point(class_scope:SingleQueryResults)
+ private static final io.pinecone.proto.SingleQueryResults DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.pinecone.proto.SingleQueryResults();
+ }
+
+ public static io.pinecone.proto.SingleQueryResults getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ java.util.List+ * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ io.pinecone.proto.ScoredVector getMatches(int index);
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ int getMatchesCount();
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ java.util.List extends io.pinecone.proto.ScoredVectorOrBuilder>
+ getMatchesOrBuilderList();
+ /**
+ * + * The matches for the vectors. + *+ * + *
repeated .ScoredVector matches = 1;
+ */
+ io.pinecone.proto.ScoredVectorOrBuilder getMatchesOrBuilder(
+ int index);
+
+ /**
+ * + * The namespace for the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The namespace.
+ */
+ java.lang.String getNamespace();
+ /**
+ * + * The namespace for the vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The bytes for namespace.
+ */
+ com.google.protobuf.ByteString
+ getNamespaceBytes();
+}
diff --git a/src/main/java/io/pinecone/proto/UpdateRequest.java b/src/main/java/io/pinecone/proto/UpdateRequest.java
new file mode 100644
index 00000000..76dfcbcf
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/UpdateRequest.java
@@ -0,0 +1,1212 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+package io.pinecone.proto;
+
+/**
+ * + * The request for the `Upsert` operation. + *+ * + * Protobuf type {@code UpdateRequest} + */ +public final class UpdateRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:UpdateRequest) + UpdateRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateRequest.newBuilder() to construct. + private UpdateRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private UpdateRequest() { + id_ = ""; + values_ = emptyFloatList(); + namespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 21: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + values_.addFloat(input.readFloat()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + values_ = newFloatList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + values_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 26: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (setMetadata_ != null) { + subBuilder = setMetadata_.toBuilder(); + } + setMetadata_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(setMetadata_); + setMetadata_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + namespace_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.pinecone.proto.UpdateRequest.class, io.pinecone.proto.UpdateRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + *
+ * Vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * + * Vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 VALUES_FIELD_NUMBER = 2;
+ private com.google.protobuf.Internal.FloatList values_;
+ /**
+ * + * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the values.
+ */
+ @java.lang.Override
+ public java.util.List+ * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of values.
+ */
+ public int getValuesCount() {
+ return values_.size();
+ }
+ /**
+ * + * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 SET_METADATA_FIELD_NUMBER = 3;
+ private com.google.protobuf.Struct setMetadata_;
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the setMetadata field is set.
+ */
+ @java.lang.Override
+ public boolean hasSetMetadata() {
+ return setMetadata_ != null;
+ }
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The setMetadata.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Struct getSetMetadata() {
+ return setMetadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : setMetadata_;
+ }
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getSetMetadataOrBuilder() {
+ return getSetMetadata();
+ }
+
+ public static final int NAMESPACE_FIELD_NUMBER = 4;
+ private volatile java.lang.Object namespace_;
+ /**
+ * + * Namespace name where to update the vector. + *+ * + *
string namespace = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * + * Namespace name where to update the vector. + *+ * + *
string namespace = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+
+ 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 (!getIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
+ }
+ if (getValuesList().size() > 0) {
+ output.writeUInt32NoTag(18);
+ output.writeUInt32NoTag(valuesMemoizedSerializedSize);
+ }
+ for (int i = 0; i < values_.size(); i++) {
+ output.writeFloatNoTag(values_.getFloat(i));
+ }
+ if (setMetadata_ != null) {
+ output.writeMessage(3, getSetMetadata());
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, namespace_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
+ }
+ {
+ int dataSize = 0;
+ dataSize = 4 * getValuesList().size();
+ size += dataSize;
+ if (!getValuesList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32SizeNoTag(dataSize);
+ }
+ valuesMemoizedSerializedSize = dataSize;
+ }
+ if (setMetadata_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getSetMetadata());
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, namespace_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.pinecone.proto.UpdateRequest)) {
+ return super.equals(obj);
+ }
+ io.pinecone.proto.UpdateRequest other = (io.pinecone.proto.UpdateRequest) obj;
+
+ if (!getId()
+ .equals(other.getId())) return false;
+ if (!getValuesList()
+ .equals(other.getValuesList())) return false;
+ if (hasSetMetadata() != other.hasSetMetadata()) return false;
+ if (hasSetMetadata()) {
+ if (!getSetMetadata()
+ .equals(other.getSetMetadata())) return false;
+ }
+ if (!getNamespace()
+ .equals(other.getNamespace())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + ID_FIELD_NUMBER;
+ hash = (53 * hash) + getId().hashCode();
+ if (getValuesCount() > 0) {
+ hash = (37 * hash) + VALUES_FIELD_NUMBER;
+ hash = (53 * hash) + getValuesList().hashCode();
+ }
+ if (hasSetMetadata()) {
+ hash = (37 * hash) + SET_METADATA_FIELD_NUMBER;
+ hash = (53 * hash) + getSetMetadata().hashCode();
+ }
+ hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
+ hash = (53 * hash) + getNamespace().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.pinecone.proto.UpdateRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.UpdateRequest 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.UpdateRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.UpdateRequest 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.UpdateRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.UpdateRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.pinecone.proto.UpdateRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.UpdateRequest 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.UpdateRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.UpdateRequest 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.UpdateRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.UpdateRequest 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.UpdateRequest 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 `Upsert` operation. + *+ * + * Protobuf type {@code UpdateRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * Vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * + * Vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * + * Vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearId() {
+
+ id_ = getDefaultInstance().getId();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.FloatList values_ = emptyFloatList();
+ private void ensureValuesIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ values_ = mutableCopy(values_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+ /**
+ * + * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the values.
+ */
+ public java.util.List+ * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of values.
+ */
+ public int getValuesCount() {
+ return values_.size();
+ }
+ /**
+ * + * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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);
+ }
+ /**
+ * + * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The values to add.
+ * @return This builder for chaining.
+ */
+ public Builder addValues(float value) {
+ ensureValuesIsMutable();
+ values_.addFloat(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param values The values to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllValues(
+ java.lang.Iterable extends java.lang.Float> values) {
+ ensureValuesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, values_);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearValues() {
+ values_ = emptyFloatList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Struct setMetadata_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> setMetadataBuilder_;
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the setMetadata field is set.
+ */
+ public boolean hasSetMetadata() {
+ return setMetadataBuilder_ != null || setMetadata_ != null;
+ }
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The setMetadata.
+ */
+ public com.google.protobuf.Struct getSetMetadata() {
+ if (setMetadataBuilder_ == null) {
+ return setMetadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : setMetadata_;
+ } else {
+ return setMetadataBuilder_.getMessage();
+ }
+ }
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder setSetMetadata(com.google.protobuf.Struct value) {
+ if (setMetadataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ setMetadata_ = value;
+ onChanged();
+ } else {
+ setMetadataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder setSetMetadata(
+ com.google.protobuf.Struct.Builder builderForValue) {
+ if (setMetadataBuilder_ == null) {
+ setMetadata_ = builderForValue.build();
+ onChanged();
+ } else {
+ setMetadataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder mergeSetMetadata(com.google.protobuf.Struct value) {
+ if (setMetadataBuilder_ == null) {
+ if (setMetadata_ != null) {
+ setMetadata_ =
+ com.google.protobuf.Struct.newBuilder(setMetadata_).mergeFrom(value).buildPartial();
+ } else {
+ setMetadata_ = value;
+ }
+ onChanged();
+ } else {
+ setMetadataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder clearSetMetadata() {
+ if (setMetadataBuilder_ == null) {
+ setMetadata_ = null;
+ onChanged();
+ } else {
+ setMetadata_ = null;
+ setMetadataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public com.google.protobuf.Struct.Builder getSetMetadataBuilder() {
+
+ onChanged();
+ return getSetMetadataFieldBuilder().getBuilder();
+ }
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public com.google.protobuf.StructOrBuilder getSetMetadataOrBuilder() {
+ if (setMetadataBuilder_ != null) {
+ return setMetadataBuilder_.getMessageOrBuilder();
+ } else {
+ return setMetadata_ == null ?
+ com.google.protobuf.Struct.getDefaultInstance() : setMetadata_;
+ }
+ }
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>
+ getSetMetadataFieldBuilder() {
+ if (setMetadataBuilder_ == null) {
+ setMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
+ getSetMetadata(),
+ getParentForChildren(),
+ isClean());
+ setMetadata_ = null;
+ }
+ return setMetadataBuilder_;
+ }
+
+ private java.lang.Object namespace_ = "";
+ /**
+ * + * Namespace name where to update the vector. + *+ * + *
string namespace = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * + * Namespace name where to update the vector. + *+ * + *
string namespace = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * + * Namespace name where to update the vector. + *+ * + *
string namespace = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Namespace name where to update the vector. + *+ * + *
string namespace = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearNamespace() {
+
+ namespace_ = getDefaultInstance().getNamespace();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * Namespace name where to update the vector. + *+ * + *
string namespace = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ 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:UpdateRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:UpdateRequest)
+ private static final io.pinecone.proto.UpdateRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.pinecone.proto.UpdateRequest();
+ }
+
+ public static io.pinecone.proto.UpdateRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The id.
+ */
+ java.lang.String getId();
+ /**
+ * + * Vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The bytes for id.
+ */
+ com.google.protobuf.ByteString
+ getIdBytes();
+
+ /**
+ * + * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the values.
+ */
+ java.util.List+ * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of values.
+ */
+ int getValuesCount();
+ /**
+ * + * Vector data. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the element to return.
+ * @return The values at the given index.
+ */
+ float getValues(int index);
+
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the setMetadata field is set.
+ */
+ boolean hasSetMetadata();
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The setMetadata.
+ */
+ com.google.protobuf.Struct getSetMetadata();
+ /**
+ * + * Metadata to *set* for the vector. + *+ * + *
.google.protobuf.Struct set_metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ com.google.protobuf.StructOrBuilder getSetMetadataOrBuilder();
+
+ /**
+ * + * Namespace name where to update the vector. + *+ * + *
string namespace = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The namespace.
+ */
+ java.lang.String getNamespace();
+ /**
+ * + * Namespace name where to update the vector. + *+ * + *
string namespace = 4 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The bytes for namespace.
+ */
+ com.google.protobuf.ByteString
+ getNamespaceBytes();
+}
diff --git a/src/main/java/io/pinecone/proto/UpdateResponse.java b/src/main/java/io/pinecone/proto/UpdateResponse.java
new file mode 100644
index 00000000..5c73d81d
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/UpdateResponse.java
@@ -0,0 +1,427 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+package io.pinecone.proto;
+
+/**
+ * + * The response for the `Update` operation. + *+ * + * Protobuf type {@code UpdateResponse} + */ +public final class UpdateResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:UpdateResponse) + UpdateResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateResponse.newBuilder() to construct. + private UpdateResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private UpdateResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.pinecone.proto.UpdateResponse.class, io.pinecone.proto.UpdateResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.pinecone.proto.UpdateResponse)) { + return super.equals(obj); + } + io.pinecone.proto.UpdateResponse other = (io.pinecone.proto.UpdateResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.pinecone.proto.UpdateResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.pinecone.proto.UpdateResponse 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.UpdateResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.pinecone.proto.UpdateResponse 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.UpdateResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.pinecone.proto.UpdateResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.pinecone.proto.UpdateResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.pinecone.proto.UpdateResponse 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.UpdateResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.pinecone.proto.UpdateResponse 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.UpdateResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.pinecone.proto.UpdateResponse 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.UpdateResponse 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 response for the `Update` operation. + *+ * + * Protobuf type {@code UpdateResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * The request for the `Upsert` operation. + *+ * + * Protobuf type {@code UpsertRequest} + */ +public final class UpsertRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:UpsertRequest) + UpsertRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpsertRequest.newBuilder() to construct. + private UpsertRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private UpsertRequest() { + vectors_ = java.util.Collections.emptyList(); + namespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpsertRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpsertRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + vectors_ = new java.util.ArrayList
+ * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ public java.util.List+ * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ public java.util.List extends io.pinecone.proto.VectorOrBuilder>
+ getVectorsOrBuilderList() {
+ return vectors_;
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ public int getVectorsCount() {
+ return vectors_.size();
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ public io.pinecone.proto.Vector getVectors(int index) {
+ return vectors_.get(index);
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ public io.pinecone.proto.VectorOrBuilder getVectorsOrBuilder(
+ int index) {
+ return vectors_.get(index);
+ }
+
+ public static final int NAMESPACE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object namespace_;
+ /**
+ * + * This is the namespace name where you upsert vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * + * This is the namespace name where you upsert vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+
+ 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 {
+ for (int i = 0; i < vectors_.size(); i++) {
+ output.writeMessage(1, vectors_.get(i));
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, namespace_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < vectors_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, vectors_.get(i));
+ }
+ if (!getNamespaceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, namespace_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.pinecone.proto.UpsertRequest)) {
+ return super.equals(obj);
+ }
+ io.pinecone.proto.UpsertRequest other = (io.pinecone.proto.UpsertRequest) obj;
+
+ if (!getVectorsList()
+ .equals(other.getVectorsList())) return false;
+ if (!getNamespace()
+ .equals(other.getNamespace())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getVectorsCount() > 0) {
+ hash = (37 * hash) + VECTORS_FIELD_NUMBER;
+ hash = (53 * hash) + getVectorsList().hashCode();
+ }
+ hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
+ hash = (53 * hash) + getNamespace().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.pinecone.proto.UpsertRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.UpsertRequest 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.UpsertRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.UpsertRequest 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.UpsertRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.UpsertRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.pinecone.proto.UpsertRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.UpsertRequest 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.UpsertRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.UpsertRequest 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.UpsertRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.UpsertRequest 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.UpsertRequest 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 `Upsert` operation. + *+ * + * Protobuf type {@code UpsertRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public java.util.List+ * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public int getVectorsCount() {
+ if (vectorsBuilder_ == null) {
+ return vectors_.size();
+ } else {
+ return vectorsBuilder_.getCount();
+ }
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public io.pinecone.proto.Vector getVectors(int index) {
+ if (vectorsBuilder_ == null) {
+ return vectors_.get(index);
+ } else {
+ return vectorsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder setVectors(
+ int index, io.pinecone.proto.Vector value) {
+ if (vectorsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureVectorsIsMutable();
+ vectors_.set(index, value);
+ onChanged();
+ } else {
+ vectorsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder setVectors(
+ int index, io.pinecone.proto.Vector.Builder builderForValue) {
+ if (vectorsBuilder_ == null) {
+ ensureVectorsIsMutable();
+ vectors_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ vectorsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder addVectors(io.pinecone.proto.Vector value) {
+ if (vectorsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureVectorsIsMutable();
+ vectors_.add(value);
+ onChanged();
+ } else {
+ vectorsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder addVectors(
+ int index, io.pinecone.proto.Vector value) {
+ if (vectorsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureVectorsIsMutable();
+ vectors_.add(index, value);
+ onChanged();
+ } else {
+ vectorsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder addVectors(
+ io.pinecone.proto.Vector.Builder builderForValue) {
+ if (vectorsBuilder_ == null) {
+ ensureVectorsIsMutable();
+ vectors_.add(builderForValue.build());
+ onChanged();
+ } else {
+ vectorsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder addVectors(
+ int index, io.pinecone.proto.Vector.Builder builderForValue) {
+ if (vectorsBuilder_ == null) {
+ ensureVectorsIsMutable();
+ vectors_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ vectorsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder addAllVectors(
+ java.lang.Iterable extends io.pinecone.proto.Vector> values) {
+ if (vectorsBuilder_ == null) {
+ ensureVectorsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, vectors_);
+ onChanged();
+ } else {
+ vectorsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder clearVectors() {
+ if (vectorsBuilder_ == null) {
+ vectors_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ vectorsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder removeVectors(int index) {
+ if (vectorsBuilder_ == null) {
+ ensureVectorsIsMutable();
+ vectors_.remove(index);
+ onChanged();
+ } else {
+ vectorsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public io.pinecone.proto.Vector.Builder getVectorsBuilder(
+ int index) {
+ return getVectorsFieldBuilder().getBuilder(index);
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public io.pinecone.proto.VectorOrBuilder getVectorsOrBuilder(
+ int index) {
+ if (vectorsBuilder_ == null) {
+ return vectors_.get(index); } else {
+ return vectorsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public java.util.List extends io.pinecone.proto.VectorOrBuilder>
+ getVectorsOrBuilderList() {
+ if (vectorsBuilder_ != null) {
+ return vectorsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(vectors_);
+ }
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public io.pinecone.proto.Vector.Builder addVectorsBuilder() {
+ return getVectorsFieldBuilder().addBuilder(
+ io.pinecone.proto.Vector.getDefaultInstance());
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public io.pinecone.proto.Vector.Builder addVectorsBuilder(
+ int index) {
+ return getVectorsFieldBuilder().addBuilder(
+ index, io.pinecone.proto.Vector.getDefaultInstance());
+ }
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public java.util.List+ * This is the namespace name where you upsert vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * + * This is the namespace name where you upsert vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ }
+ }
+ /**
+ * + * This is the namespace name where you upsert vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This is the namespace name where you upsert vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearNamespace() {
+
+ namespace_ = getDefaultInstance().getNamespace();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This is the namespace name where you upsert vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ 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:UpsertRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:UpsertRequest)
+ private static final io.pinecone.proto.UpsertRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.pinecone.proto.UpsertRequest();
+ }
+
+ public static io.pinecone.proto.UpsertRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ java.util.List+ * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ io.pinecone.proto.Vector getVectors(int index);
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ int getVectorsCount();
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ java.util.List extends io.pinecone.proto.VectorOrBuilder>
+ getVectorsOrBuilderList();
+ /**
+ * + * This is the actual array data. + *+ * + *
repeated .Vector vectors = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ io.pinecone.proto.VectorOrBuilder getVectorsOrBuilder(
+ int index);
+
+ /**
+ * + * This is the namespace name where you upsert vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The namespace.
+ */
+ java.lang.String getNamespace();
+ /**
+ * + * This is the namespace name where you upsert vectors. + *+ * + *
string namespace = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The bytes for namespace.
+ */
+ com.google.protobuf.ByteString
+ getNamespaceBytes();
+}
diff --git a/src/main/java/io/pinecone/proto/UpsertResponse.java b/src/main/java/io/pinecone/proto/UpsertResponse.java
new file mode 100644
index 00000000..6bd11976
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/UpsertResponse.java
@@ -0,0 +1,507 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+package io.pinecone.proto;
+
+/**
+ * + * The response for the `Upsert` operation. + *+ * + * Protobuf type {@code UpsertResponse} + */ +public final class UpsertResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:UpsertResponse) + UpsertResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpsertResponse.newBuilder() to construct. + private UpsertResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private UpsertResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpsertResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpsertResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + upsertedCount_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpsertResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpsertResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.pinecone.proto.UpsertResponse.class, io.pinecone.proto.UpsertResponse.Builder.class); + } + + public static final int UPSERTED_COUNT_FIELD_NUMBER = 1; + private int upsertedCount_; + /** + *
+ * The number of vectors upserted. + *+ * + *
uint32 upserted_count = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The upsertedCount.
+ */
+ @java.lang.Override
+ public int getUpsertedCount() {
+ return upsertedCount_;
+ }
+
+ 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 (upsertedCount_ != 0) {
+ output.writeUInt32(1, upsertedCount_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (upsertedCount_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, upsertedCount_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.pinecone.proto.UpsertResponse)) {
+ return super.equals(obj);
+ }
+ io.pinecone.proto.UpsertResponse other = (io.pinecone.proto.UpsertResponse) obj;
+
+ if (getUpsertedCount()
+ != other.getUpsertedCount()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + UPSERTED_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + getUpsertedCount();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.pinecone.proto.UpsertResponse parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.UpsertResponse 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.UpsertResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.UpsertResponse 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.UpsertResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.UpsertResponse parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.pinecone.proto.UpsertResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.UpsertResponse 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.UpsertResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.UpsertResponse 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.UpsertResponse parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.UpsertResponse 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.UpsertResponse 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 response for the `Upsert` operation. + *+ * + * Protobuf type {@code UpsertResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
+ * The number of vectors upserted. + *+ * + *
uint32 upserted_count = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The upsertedCount.
+ */
+ @java.lang.Override
+ public int getUpsertedCount() {
+ return upsertedCount_;
+ }
+ /**
+ * + * The number of vectors upserted. + *+ * + *
uint32 upserted_count = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The upsertedCount to set.
+ * @return This builder for chaining.
+ */
+ public Builder setUpsertedCount(int value) {
+
+ upsertedCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * The number of vectors upserted. + *+ * + *
uint32 upserted_count = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearUpsertedCount() {
+
+ upsertedCount_ = 0;
+ 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:UpsertResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:UpsertResponse)
+ private static final io.pinecone.proto.UpsertResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.pinecone.proto.UpsertResponse();
+ }
+
+ public static io.pinecone.proto.UpsertResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The number of vectors upserted. + *+ * + *
uint32 upserted_count = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The upsertedCount.
+ */
+ int getUpsertedCount();
+}
diff --git a/src/main/java/io/pinecone/proto/Vector.java b/src/main/java/io/pinecone/proto/Vector.java
new file mode 100644
index 00000000..27fa35aa
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/Vector.java
@@ -0,0 +1,1038 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: vector_service.proto
+
+package io.pinecone.proto;
+
+/**
+ * Protobuf type {@code Vector}
+ */
+public final class Vector extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:Vector)
+ VectorOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use Vector.newBuilder() to construct.
+ private Vector(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Vector() {
+ id_ = "";
+ values_ = emptyFloatList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new Vector();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Vector(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ id_ = s;
+ break;
+ }
+ case 21: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ values_ = newFloatList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ values_.addFloat(input.readFloat());
+ break;
+ }
+ case 18: {
+ int length = input.readRawVarint32();
+ int limit = input.pushLimit(length);
+ if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
+ values_ = newFloatList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ while (input.getBytesUntilLimit() > 0) {
+ values_.addFloat(input.readFloat());
+ }
+ input.popLimit(limit);
+ break;
+ }
+ case 26: {
+ com.google.protobuf.Struct.Builder subBuilder = null;
+ if (metadata_ != null) {
+ subBuilder = metadata_.toBuilder();
+ }
+ metadata_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(metadata_);
+ metadata_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000001) != 0)) {
+ values_.makeImmutable(); // C
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return io.pinecone.proto.VectorServiceOuterClass.internal_static_Vector_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return io.pinecone.proto.VectorServiceOuterClass.internal_static_Vector_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.pinecone.proto.Vector.class, io.pinecone.proto.Vector.Builder.class);
+ }
+
+ public static final int ID_FIELD_NUMBER = 1;
+ private volatile java.lang.Object id_;
+ /**
+ * + * This is the vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 VALUES_FIELD_NUMBER = 2;
+ private com.google.protobuf.Internal.FloatList values_;
+ /**
+ * + * This is the vector data included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the values.
+ */
+ @java.lang.Override
+ public java.util.List+ * This is the vector data included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of values.
+ */
+ public int getValuesCount() {
+ return values_.size();
+ }
+ /**
+ * + * This is the vector data included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 METADATA_FIELD_NUMBER = 3;
+ private com.google.protobuf.Struct metadata_;
+ /**
+ * + * This is the metadata included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the metadata field is set.
+ */
+ @java.lang.Override
+ public boolean hasMetadata() {
+ return metadata_ != null;
+ }
+ /**
+ * + * This is the metadata included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
+ return getMetadata();
+ }
+
+ 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 (!getIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
+ }
+ if (getValuesList().size() > 0) {
+ output.writeUInt32NoTag(18);
+ output.writeUInt32NoTag(valuesMemoizedSerializedSize);
+ }
+ for (int i = 0; i < values_.size(); i++) {
+ output.writeFloatNoTag(values_.getFloat(i));
+ }
+ if (metadata_ != null) {
+ output.writeMessage(3, getMetadata());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
+ }
+ {
+ int dataSize = 0;
+ dataSize = 4 * getValuesList().size();
+ size += dataSize;
+ if (!getValuesList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32SizeNoTag(dataSize);
+ }
+ valuesMemoizedSerializedSize = dataSize;
+ }
+ if (metadata_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getMetadata());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.pinecone.proto.Vector)) {
+ return super.equals(obj);
+ }
+ io.pinecone.proto.Vector other = (io.pinecone.proto.Vector) obj;
+
+ if (!getId()
+ .equals(other.getId())) return false;
+ if (!getValuesList()
+ .equals(other.getValuesList())) return false;
+ if (hasMetadata() != other.hasMetadata()) return false;
+ if (hasMetadata()) {
+ if (!getMetadata()
+ .equals(other.getMetadata())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + ID_FIELD_NUMBER;
+ hash = (53 * hash) + getId().hashCode();
+ if (getValuesCount() > 0) {
+ hash = (37 * hash) + VALUES_FIELD_NUMBER;
+ hash = (53 * hash) + getValuesList().hashCode();
+ }
+ if (hasMetadata()) {
+ hash = (37 * hash) + METADATA_FIELD_NUMBER;
+ hash = (53 * hash) + getMetadata().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.pinecone.proto.Vector parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.Vector 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.Vector parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.Vector 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.Vector parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.pinecone.proto.Vector parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.pinecone.proto.Vector parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.Vector 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.Vector parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.Vector 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.Vector parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.pinecone.proto.Vector 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.Vector 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 Vector}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder+ * This is the vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This is the vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearId() {
+
+ id_ = getDefaultInstance().getId();
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This is the vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.FloatList values_ = emptyFloatList();
+ private void ensureValuesIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ values_ = mutableCopy(values_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+ /**
+ * + * This is the vector data included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the values.
+ */
+ public java.util.List+ * This is the vector data included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of values.
+ */
+ public int getValuesCount() {
+ return values_.size();
+ }
+ /**
+ * + * This is the vector data included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This is the vector data included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param value The values to add.
+ * @return This builder for chaining.
+ */
+ public Builder addValues(float value) {
+ ensureValuesIsMutable();
+ values_.addFloat(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This is the vector data included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param values The values to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllValues(
+ java.lang.Iterable extends java.lang.Float> values) {
+ ensureValuesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, values_);
+ onChanged();
+ return this;
+ }
+ /**
+ * + * This is the vector data included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return This builder for chaining.
+ */
+ public Builder clearValues() {
+ values_ = emptyFloatList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ 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 included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the metadata field is set.
+ */
+ public boolean hasMetadata() {
+ return metadataBuilder_ != null || metadata_ != null;
+ }
+ /**
+ * + * This is the metadata included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @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 included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder setMetadata(com.google.protobuf.Struct value) {
+ if (metadataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ metadata_ = value;
+ onChanged();
+ } else {
+ metadataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * This is the metadata included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder setMetadata(
+ com.google.protobuf.Struct.Builder builderForValue) {
+ if (metadataBuilder_ == null) {
+ metadata_ = builderForValue.build();
+ onChanged();
+ } else {
+ metadataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * + * This is the metadata included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder mergeMetadata(com.google.protobuf.Struct value) {
+ if (metadataBuilder_ == null) {
+ if (metadata_ != null) {
+ metadata_ =
+ com.google.protobuf.Struct.newBuilder(metadata_).mergeFrom(value).buildPartial();
+ } else {
+ metadata_ = value;
+ }
+ onChanged();
+ } else {
+ metadataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * + * This is the metadata included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public Builder clearMetadata() {
+ if (metadataBuilder_ == null) {
+ metadata_ = null;
+ onChanged();
+ } else {
+ metadata_ = null;
+ metadataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * + * This is the metadata included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ public com.google.protobuf.Struct.Builder getMetadataBuilder() {
+
+ onChanged();
+ return getMetadataFieldBuilder().getBuilder();
+ }
+ /**
+ * + * This is the metadata included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ 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 included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ 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:Vector)
+ }
+
+ // @@protoc_insertion_point(class_scope:Vector)
+ private static final io.pinecone.proto.Vector DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.pinecone.proto.Vector();
+ }
+
+ public static io.pinecone.proto.Vector getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * This is the vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The id.
+ */
+ java.lang.String getId();
+ /**
+ * + * This is the vector's unique id. + *+ * + *
string id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The bytes for id.
+ */
+ com.google.protobuf.ByteString
+ getIdBytes();
+
+ /**
+ * + * This is the vector data included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return A list containing the values.
+ */
+ java.util.List+ * This is the vector data included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The count of values.
+ */
+ int getValuesCount();
+ /**
+ * + * This is the vector data included in the request. + *+ * + *
repeated float values = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @param index The index of the element to return.
+ * @return The values at the given index.
+ */
+ float getValues(int index);
+
+ /**
+ * + * This is the metadata included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return Whether the metadata field is set.
+ */
+ boolean hasMetadata();
+ /**
+ * + * This is the metadata included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ * @return The metadata.
+ */
+ com.google.protobuf.Struct getMetadata();
+ /**
+ * + * This is the metadata included in the request. + *+ * + *
.google.protobuf.Struct metadata = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { ... }
+ */
+ com.google.protobuf.StructOrBuilder getMetadataOrBuilder();
+}
diff --git a/src/main/java/io/pinecone/proto/VectorServiceGrpc.java b/src/main/java/io/pinecone/proto/VectorServiceGrpc.java
new file mode 100644
index 00000000..b288ebbc
--- /dev/null
+++ b/src/main/java/io/pinecone/proto/VectorServiceGrpc.java
@@ -0,0 +1,790 @@
+package io.pinecone.proto;
+
+import static io.grpc.MethodDescriptor.generateFullMethodName;
+
+/**
+ * + * The `VectorService` interface is exposed by Pinecone's vector index services. + * This service could also be called a `gRPC` service or a `REST`-like api. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.47.0)", + comments = "Source: vector_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class VectorServiceGrpc { + + private VectorServiceGrpc() {} + + public static final String SERVICE_NAME = "VectorService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor
+ * The `VectorService` interface is exposed by Pinecone's vector index services. + * This service could also be called a `gRPC` service or a `REST`-like api. + *+ */ + public static abstract class VectorServiceImplBase implements io.grpc.BindableService { + + /** + *
+ * Upsert + * The `Upsert` operation writes vectors into a namespace. + * If a new value is upserted for an existing vector id, it will overwrite the previous value. + *+ */ + public void upsert(io.pinecone.proto.UpsertRequest request, + io.grpc.stub.StreamObserver
+ * Delete + * The `Delete` operation deletes vectors, by id, from a single namespace. + * You can delete items by their id, from a single namespace. + *+ */ + public void delete(io.pinecone.proto.DeleteRequest request, + io.grpc.stub.StreamObserver
+ * Fetch + * The `Fetch` operation looks up and returns vectors, by id, from a single namespace. + * The returned vectors include the vector data and/or metadata. + *+ */ + public void fetch(io.pinecone.proto.FetchRequest request, + io.grpc.stub.StreamObserver
+ * Query + * The `Query` operation searches a namespace, using a query vector. + * It retrieves the ids of the most similar items in a namespace, along with their similarity scores. + *+ */ + public void query(io.pinecone.proto.QueryRequest request, + io.grpc.stub.StreamObserver
+ * Update + * The `Update` operation updates vector in a namespace. + * If a value is included, it will overwrite the previous value. + * If a set_metadata is included, the values of the fields specified in it will be added or overwrite the previous value. + *+ */ + public void update(io.pinecone.proto.UpdateRequest request, + io.grpc.stub.StreamObserver
+ * DescribeIndexStats + * The `DescribeIndexStats` operation returns statistics about the index's contents. + * For example: The vector count per namespace and the number of dimensions. + *+ */ + public void describeIndexStats(io.pinecone.proto.DescribeIndexStatsRequest request, + io.grpc.stub.StreamObserver
+ * The `VectorService` interface is exposed by Pinecone's vector index services. + * This service could also be called a `gRPC` service or a `REST`-like api. + *+ */ + public static final class VectorServiceStub extends io.grpc.stub.AbstractAsyncStub
+ * Upsert + * The `Upsert` operation writes vectors into a namespace. + * If a new value is upserted for an existing vector id, it will overwrite the previous value. + *+ */ + public void upsert(io.pinecone.proto.UpsertRequest request, + io.grpc.stub.StreamObserver
+ * Delete + * The `Delete` operation deletes vectors, by id, from a single namespace. + * You can delete items by their id, from a single namespace. + *+ */ + public void delete(io.pinecone.proto.DeleteRequest request, + io.grpc.stub.StreamObserver
+ * Fetch + * The `Fetch` operation looks up and returns vectors, by id, from a single namespace. + * The returned vectors include the vector data and/or metadata. + *+ */ + public void fetch(io.pinecone.proto.FetchRequest request, + io.grpc.stub.StreamObserver
+ * Query + * The `Query` operation searches a namespace, using a query vector. + * It retrieves the ids of the most similar items in a namespace, along with their similarity scores. + *+ */ + public void query(io.pinecone.proto.QueryRequest request, + io.grpc.stub.StreamObserver
+ * Update + * The `Update` operation updates vector in a namespace. + * If a value is included, it will overwrite the previous value. + * If a set_metadata is included, the values of the fields specified in it will be added or overwrite the previous value. + *+ */ + public void update(io.pinecone.proto.UpdateRequest request, + io.grpc.stub.StreamObserver
+ * DescribeIndexStats + * The `DescribeIndexStats` operation returns statistics about the index's contents. + * For example: The vector count per namespace and the number of dimensions. + *+ */ + public void describeIndexStats(io.pinecone.proto.DescribeIndexStatsRequest request, + io.grpc.stub.StreamObserver
+ * The `VectorService` interface is exposed by Pinecone's vector index services. + * This service could also be called a `gRPC` service or a `REST`-like api. + *+ */ + public static final class VectorServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub
+ * Upsert + * The `Upsert` operation writes vectors into a namespace. + * If a new value is upserted for an existing vector id, it will overwrite the previous value. + *+ */ + public io.pinecone.proto.UpsertResponse upsert(io.pinecone.proto.UpsertRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpsertMethod(), getCallOptions(), request); + } + + /** + *
+ * Delete + * The `Delete` operation deletes vectors, by id, from a single namespace. + * You can delete items by their id, from a single namespace. + *+ */ + public io.pinecone.proto.DeleteResponse delete(io.pinecone.proto.DeleteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteMethod(), getCallOptions(), request); + } + + /** + *
+ * Fetch + * The `Fetch` operation looks up and returns vectors, by id, from a single namespace. + * The returned vectors include the vector data and/or metadata. + *+ */ + public io.pinecone.proto.FetchResponse fetch(io.pinecone.proto.FetchRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchMethod(), getCallOptions(), request); + } + + /** + *
+ * Query + * The `Query` operation searches a namespace, using a query vector. + * It retrieves the ids of the most similar items in a namespace, along with their similarity scores. + *+ */ + public io.pinecone.proto.QueryResponse query(io.pinecone.proto.QueryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getQueryMethod(), getCallOptions(), request); + } + + /** + *
+ * Update + * The `Update` operation updates vector in a namespace. + * If a value is included, it will overwrite the previous value. + * If a set_metadata is included, the values of the fields specified in it will be added or overwrite the previous value. + *+ */ + public io.pinecone.proto.UpdateResponse update(io.pinecone.proto.UpdateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateMethod(), getCallOptions(), request); + } + + /** + *
+ * DescribeIndexStats + * The `DescribeIndexStats` operation returns statistics about the index's contents. + * For example: The vector count per namespace and the number of dimensions. + *+ */ + public io.pinecone.proto.DescribeIndexStatsResponse describeIndexStats(io.pinecone.proto.DescribeIndexStatsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDescribeIndexStatsMethod(), getCallOptions(), request); + } + } + + /** + *
+ * The `VectorService` interface is exposed by Pinecone's vector index services. + * This service could also be called a `gRPC` service or a `REST`-like api. + *+ */ + public static final class VectorServiceFutureStub extends io.grpc.stub.AbstractFutureStub
+ * Upsert + * The `Upsert` operation writes vectors into a namespace. + * If a new value is upserted for an existing vector id, it will overwrite the previous value. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Delete + * The `Delete` operation deletes vectors, by id, from a single namespace. + * You can delete items by their id, from a single namespace. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Fetch + * The `Fetch` operation looks up and returns vectors, by id, from a single namespace. + * The returned vectors include the vector data and/or metadata. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Query + * The `Query` operation searches a namespace, using a query vector. + * It retrieves the ids of the most similar items in a namespace, along with their similarity scores. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Update + * The `Update` operation updates vector in a namespace. + * If a value is included, it will overwrite the previous value. + * If a set_metadata is included, the values of the fields specified in it will be added or overwrite the previous value. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * DescribeIndexStats + * The `DescribeIndexStats` operation returns statistics about the index's contents. + * For example: The vector count per namespace and the number of dimensions. + *+ */ + public com.google.common.util.concurrent.ListenableFuture