io.pinecone.proto.Vector Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: vector_service.proto
// Protobuf Java Version: 3.25.3
package io.pinecone.proto;
/**
* Protobuf type {@code 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();
}
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);
}
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
* This is the vector's unique id.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* This is the vector's unique id.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUES_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.Internal.FloatList values_ =
emptyFloatList();
/**
*
* This is the vector data included in the request.
*
*
* repeated float values = 2 [(.google.api.field_behavior) = REQUIRED];
* @return A list containing the values.
*/
@java.lang.Override
public java.util.List
getValuesList() {
return values_;
}
/**
*
* This is the vector data included in the request.
*
*
* repeated float values = 2 [(.google.api.field_behavior) = REQUIRED];
* @return The count of values.
*/
public int getValuesCount() {
return values_.size();
}
/**
*
* This is the vector data included in the request.
*
*
* repeated float values = 2 [(.google.api.field_behavior) = REQUIRED];
* @param index The index of the element to return.
* @return The values at the given index.
*/
public float getValues(int index) {
return values_.getFloat(index);
}
private int valuesMemoizedSerializedSize = -1;
public static final int SPARSE_VALUES_FIELD_NUMBER = 4;
private io.pinecone.proto.SparseValues sparseValues_;
/**
* .SparseValues sparse_values = 4;
* @return Whether the sparseValues field is set.
*/
@java.lang.Override
public boolean hasSparseValues() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .SparseValues sparse_values = 4;
* @return The sparseValues.
*/
@java.lang.Override
public io.pinecone.proto.SparseValues getSparseValues() {
return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_;
}
/**
* .SparseValues sparse_values = 4;
*/
@java.lang.Override
public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() {
return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_;
}
public static final int METADATA_FIELD_NUMBER = 3;
private com.google.protobuf.Struct metadata_;
/**
*
* This is the metadata included in the request.
*
*
* .google.protobuf.Struct metadata = 3;
* @return Whether the metadata field is set.
*/
@java.lang.Override
public boolean hasMetadata() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* This is the metadata included in the request.
*
*
* .google.protobuf.Struct metadata = 3;
* @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;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (getValuesList().size() > 0) {
output.writeUInt32NoTag(18);
output.writeUInt32NoTag(valuesMemoizedSerializedSize);
}
for (int i = 0; i < values_.size(); i++) {
output.writeFloatNoTag(values_.getFloat(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getMetadata());
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getSparseValues());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
{
int dataSize = 0;
dataSize = 4 * getValuesList().size();
size += dataSize;
if (!getValuesList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
valuesMemoizedSerializedSize = dataSize;
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getMetadata());
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getSparseValues());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.pinecone.proto.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 (hasSparseValues() != other.hasSparseValues()) return false;
if (hasSparseValues()) {
if (!getSparseValues()
.equals(other.getSparseValues())) return false;
}
if (hasMetadata() != other.hasMetadata()) return false;
if (hasMetadata()) {
if (!getMetadata()
.equals(other.getMetadata())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
if (getValuesCount() > 0) {
hash = (37 * hash) + VALUES_FIELD_NUMBER;
hash = (53 * hash) + getValuesList().hashCode();
}
if (hasSparseValues()) {
hash = (37 * hash) + SPARSE_VALUES_FIELD_NUMBER;
hash = (53 * hash) + getSparseValues().hashCode();
}
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.pinecone.proto.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 implements
// @@protoc_insertion_point(builder_implements:Vector)
io.pinecone.proto.VectorOrBuilder {
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);
}
// Construct using io.pinecone.proto.Vector.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSparseValuesFieldBuilder();
getMetadataFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
values_ = emptyFloatList();
sparseValues_ = null;
if (sparseValuesBuilder_ != null) {
sparseValuesBuilder_.dispose();
sparseValuesBuilder_ = null;
}
metadata_ = null;
if (metadataBuilder_ != null) {
metadataBuilder_.dispose();
metadataBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.pinecone.proto.VectorServiceOuterClass.internal_static_Vector_descriptor;
}
@java.lang.Override
public io.pinecone.proto.Vector getDefaultInstanceForType() {
return io.pinecone.proto.Vector.getDefaultInstance();
}
@java.lang.Override
public io.pinecone.proto.Vector build() {
io.pinecone.proto.Vector result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.pinecone.proto.Vector buildPartial() {
io.pinecone.proto.Vector result = new io.pinecone.proto.Vector(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.pinecone.proto.Vector result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
values_.makeImmutable();
result.values_ = values_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.sparseValues_ = sparseValuesBuilder_ == null
? sparseValues_
: sparseValuesBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.metadata_ = metadataBuilder_ == null
? metadata_
: metadataBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.pinecone.proto.Vector) {
return mergeFrom((io.pinecone.proto.Vector)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.pinecone.proto.Vector other) {
if (other == io.pinecone.proto.Vector.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.values_.isEmpty()) {
if (values_.isEmpty()) {
values_ = other.values_;
values_.makeImmutable();
bitField0_ |= 0x00000002;
} else {
ensureValuesIsMutable();
values_.addAll(other.values_);
}
onChanged();
}
if (other.hasSparseValues()) {
mergeSparseValues(other.getSparseValues());
}
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 21: {
float v = input.readFloat();
ensureValuesIsMutable();
values_.addFloat(v);
break;
} // case 21
case 18: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
int alloc = length > 4096 ? 4096 : length;
ensureValuesIsMutable(alloc / 4);
while (input.getBytesUntilLimit() > 0) {
values_.addFloat(input.readFloat());
}
input.popLimit(limit);
break;
} // case 18
case 26: {
input.readMessage(
getMetadataFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 26
case 34: {
input.readMessage(
getSparseValuesFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 34
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* This is the vector's unique id.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* This is the vector's unique id.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* This is the vector's unique id.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* This is the vector's unique id.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* This is the vector's unique id.
*
*
* string id = 1 [(.google.api.field_behavior) = REQUIRED];
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.Internal.FloatList values_ = emptyFloatList();
private void ensureValuesIsMutable() {
if (!values_.isModifiable()) {
values_ = makeMutableCopy(values_);
}
bitField0_ |= 0x00000002;
}
private void ensureValuesIsMutable(int capacity) {
if (!values_.isModifiable()) {
values_ = makeMutableCopy(values_, capacity);
}
bitField0_ |= 0x00000002;
}
/**
*
* This is the vector data included in the request.
*
*
* repeated float values = 2 [(.google.api.field_behavior) = REQUIRED];
* @return A list containing the values.
*/
public java.util.List
getValuesList() {
values_.makeImmutable();
return values_;
}
/**
*
* This is the vector data included in the request.
*
*
* repeated float values = 2 [(.google.api.field_behavior) = REQUIRED];
* @return The count of values.
*/
public int getValuesCount() {
return values_.size();
}
/**
*
* This is the vector data included in the request.
*
*
* repeated float values = 2 [(.google.api.field_behavior) = REQUIRED];
* @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 [(.google.api.field_behavior) = REQUIRED];
* @param index The index to set the value at.
* @param value The values to set.
* @return This builder for chaining.
*/
public Builder setValues(
int index, float value) {
ensureValuesIsMutable();
values_.setFloat(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* This is the vector data included in the request.
*
*
* repeated float values = 2 [(.google.api.field_behavior) = REQUIRED];
* @param value The values to add.
* @return This builder for chaining.
*/
public Builder addValues(float value) {
ensureValuesIsMutable();
values_.addFloat(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* This is the vector data included in the request.
*
*
* repeated float values = 2 [(.google.api.field_behavior) = REQUIRED];
* @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_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* This is the vector data included in the request.
*
*
* repeated float values = 2 [(.google.api.field_behavior) = REQUIRED];
* @return This builder for chaining.
*/
public Builder clearValues() {
values_ = emptyFloatList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
private io.pinecone.proto.SparseValues sparseValues_;
private com.google.protobuf.SingleFieldBuilderV3<
io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> sparseValuesBuilder_;
/**
* .SparseValues sparse_values = 4;
* @return Whether the sparseValues field is set.
*/
public boolean hasSparseValues() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* .SparseValues sparse_values = 4;
* @return The sparseValues.
*/
public io.pinecone.proto.SparseValues getSparseValues() {
if (sparseValuesBuilder_ == null) {
return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_;
} else {
return sparseValuesBuilder_.getMessage();
}
}
/**
* .SparseValues sparse_values = 4;
*/
public Builder setSparseValues(io.pinecone.proto.SparseValues value) {
if (sparseValuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sparseValues_ = value;
} else {
sparseValuesBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* .SparseValues sparse_values = 4;
*/
public Builder setSparseValues(
io.pinecone.proto.SparseValues.Builder builderForValue) {
if (sparseValuesBuilder_ == null) {
sparseValues_ = builderForValue.build();
} else {
sparseValuesBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* .SparseValues sparse_values = 4;
*/
public Builder mergeSparseValues(io.pinecone.proto.SparseValues value) {
if (sparseValuesBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
sparseValues_ != null &&
sparseValues_ != io.pinecone.proto.SparseValues.getDefaultInstance()) {
getSparseValuesBuilder().mergeFrom(value);
} else {
sparseValues_ = value;
}
} else {
sparseValuesBuilder_.mergeFrom(value);
}
if (sparseValues_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
* .SparseValues sparse_values = 4;
*/
public Builder clearSparseValues() {
bitField0_ = (bitField0_ & ~0x00000004);
sparseValues_ = null;
if (sparseValuesBuilder_ != null) {
sparseValuesBuilder_.dispose();
sparseValuesBuilder_ = null;
}
onChanged();
return this;
}
/**
* .SparseValues sparse_values = 4;
*/
public io.pinecone.proto.SparseValues.Builder getSparseValuesBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getSparseValuesFieldBuilder().getBuilder();
}
/**
* .SparseValues sparse_values = 4;
*/
public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() {
if (sparseValuesBuilder_ != null) {
return sparseValuesBuilder_.getMessageOrBuilder();
} else {
return sparseValues_ == null ?
io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_;
}
}
/**
* .SparseValues sparse_values = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder>
getSparseValuesFieldBuilder() {
if (sparseValuesBuilder_ == null) {
sparseValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder>(
getSparseValues(),
getParentForChildren(),
isClean());
sparseValues_ = null;
}
return sparseValuesBuilder_;
}
private com.google.protobuf.Struct metadata_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> metadataBuilder_;
/**
*
* This is the metadata included in the request.
*
*
* .google.protobuf.Struct metadata = 3;
* @return Whether the metadata field is set.
*/
public boolean hasMetadata() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* This is the metadata included in the request.
*
*
* .google.protobuf.Struct metadata = 3;
* @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;
*/
public Builder setMetadata(com.google.protobuf.Struct value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
} else {
metadataBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* This is the metadata included in the request.
*
*
* .google.protobuf.Struct metadata = 3;
*/
public Builder setMetadata(
com.google.protobuf.Struct.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* This is the metadata included in the request.
*
*
* .google.protobuf.Struct metadata = 3;
*/
public Builder mergeMetadata(com.google.protobuf.Struct value) {
if (metadataBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
metadata_ != null &&
metadata_ != com.google.protobuf.Struct.getDefaultInstance()) {
getMetadataBuilder().mergeFrom(value);
} else {
metadata_ = value;
}
} else {
metadataBuilder_.mergeFrom(value);
}
if (metadata_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
* This is the metadata included in the request.
*
*
* .google.protobuf.Struct metadata = 3;
*/
public Builder clearMetadata() {
bitField0_ = (bitField0_ & ~0x00000008);
metadata_ = null;
if (metadataBuilder_ != null) {
metadataBuilder_.dispose();
metadataBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* This is the metadata included in the request.
*
*
* .google.protobuf.Struct metadata = 3;
*/
public com.google.protobuf.Struct.Builder getMetadataBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
*
* This is the metadata included in the request.
*
*
* .google.protobuf.Struct metadata = 3;
*/
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;
*/
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
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Vector parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.pinecone.proto.Vector getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy