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

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

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

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

/**
 * 
 * The request for the `update` 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(); } 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); } private int bitField0_; public static final int ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** *
   * 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; } } /** *
   * 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(); /** *
   * Vector data.
   * 
* * repeated float values = 2; * @return A list containing the values. */ @java.lang.Override public java.util.List getValuesList() { return values_; } /** *
   * Vector data.
   * 
* * repeated float values = 2; * @return The count of values. */ public int getValuesCount() { return values_.size(); } /** *
   * Vector data.
   * 
* * repeated float values = 2; * @param index The index of the element to return. * @return The values at the given index. */ public float getValues(int index) { return values_.getFloat(index); } private int valuesMemoizedSerializedSize = -1; public static final int SPARSE_VALUES_FIELD_NUMBER = 5; private io.pinecone.proto.SparseValues sparseValues_; /** * .SparseValues sparse_values = 5; * @return Whether the sparseValues field is set. */ @java.lang.Override public boolean hasSparseValues() { return ((bitField0_ & 0x00000001) != 0); } /** * .SparseValues sparse_values = 5; * @return The sparseValues. */ @java.lang.Override public io.pinecone.proto.SparseValues getSparseValues() { return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_; } /** * .SparseValues sparse_values = 5; */ @java.lang.Override public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_; } public static final int SET_METADATA_FIELD_NUMBER = 3; private com.google.protobuf.Struct setMetadata_; /** *
   * Metadata to *set* for the vector.
   * 
* * .google.protobuf.Struct set_metadata = 3; * @return Whether the setMetadata field is set. */ @java.lang.Override public boolean hasSetMetadata() { return ((bitField0_ & 0x00000002) != 0); } /** *
   * Metadata to *set* for the vector.
   * 
* * .google.protobuf.Struct set_metadata = 3; * @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; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getSetMetadataOrBuilder() { return setMetadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : setMetadata_; } public static final int NAMESPACE_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object namespace_ = ""; /** *
   * Namespace name where to update the vector.
   * 
* * string namespace = 4; * @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; * @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 (!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, getSetMetadata()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, namespace_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getSparseValues()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } { 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, getSetMetadata()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, namespace_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getSparseValues()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.pinecone.proto.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 (hasSparseValues() != other.hasSparseValues()) return false; if (hasSparseValues()) { if (!getSparseValues() .equals(other.getSparseValues())) 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 (!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 (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) + getUnknownFields().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 `update` operation.
   * 
* * Protobuf type {@code UpdateRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:UpdateRequest) io.pinecone.proto.UpdateRequestOrBuilder { 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); } // Construct using io.pinecone.proto.UpdateRequest.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(); getSetMetadataFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; values_ = emptyFloatList(); sparseValues_ = null; if (sparseValuesBuilder_ != null) { sparseValuesBuilder_.dispose(); sparseValuesBuilder_ = null; } setMetadata_ = null; if (setMetadataBuilder_ != null) { setMetadataBuilder_.dispose(); setMetadataBuilder_ = null; } namespace_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.pinecone.proto.VectorServiceOuterClass.internal_static_UpdateRequest_descriptor; } @java.lang.Override public io.pinecone.proto.UpdateRequest getDefaultInstanceForType() { return io.pinecone.proto.UpdateRequest.getDefaultInstance(); } @java.lang.Override public io.pinecone.proto.UpdateRequest build() { io.pinecone.proto.UpdateRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.pinecone.proto.UpdateRequest buildPartial() { io.pinecone.proto.UpdateRequest result = new io.pinecone.proto.UpdateRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(io.pinecone.proto.UpdateRequest 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.setMetadata_ = setMetadataBuilder_ == null ? setMetadata_ : setMetadataBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000010) != 0)) { result.namespace_ = namespace_; } 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.UpdateRequest) { return mergeFrom((io.pinecone.proto.UpdateRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.pinecone.proto.UpdateRequest other) { if (other == io.pinecone.proto.UpdateRequest.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.hasSetMetadata()) { mergeSetMetadata(other.getSetMetadata()); } if (!other.getNamespace().isEmpty()) { namespace_ = other.namespace_; bitField0_ |= 0x00000010; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { 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( getSetMetadataFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 26 case 34: { namespace_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 34 case 42: { input.readMessage( getSparseValuesFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object id_ = ""; /** *
     * 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; } } /** *
     * 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; } } /** *
     * 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; } /** *
     * 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; } /** *
     * 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; } /** *
     * Vector data.
     * 
* * repeated float values = 2; * @return A list containing the values. */ public java.util.List getValuesList() { values_.makeImmutable(); return values_; } /** *
     * Vector data.
     * 
* * repeated float values = 2; * @return The count of values. */ public int getValuesCount() { return values_.size(); } /** *
     * Vector data.
     * 
* * repeated float values = 2; * @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; * @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; } /** *
     * Vector data.
     * 
* * repeated float values = 2; * @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; } /** *
     * Vector data.
     * 
* * repeated float values = 2; * @param values The values to add. * @return This builder for chaining. */ public Builder addAllValues( java.lang.Iterable values) { ensureValuesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, values_); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * Vector data.
     * 
* * repeated float values = 2; * @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 = 5; * @return Whether the sparseValues field is set. */ public boolean hasSparseValues() { return ((bitField0_ & 0x00000004) != 0); } /** * .SparseValues sparse_values = 5; * @return The sparseValues. */ public io.pinecone.proto.SparseValues getSparseValues() { if (sparseValuesBuilder_ == null) { return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_; } else { return sparseValuesBuilder_.getMessage(); } } /** * .SparseValues sparse_values = 5; */ public Builder setSparseValues(io.pinecone.proto.SparseValues value) { if (sparseValuesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sparseValues_ = value; } else { sparseValuesBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * .SparseValues sparse_values = 5; */ public Builder setSparseValues( io.pinecone.proto.SparseValues.Builder builderForValue) { if (sparseValuesBuilder_ == null) { sparseValues_ = builderForValue.build(); } else { sparseValuesBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * .SparseValues sparse_values = 5; */ 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 = 5; */ public Builder clearSparseValues() { bitField0_ = (bitField0_ & ~0x00000004); sparseValues_ = null; if (sparseValuesBuilder_ != null) { sparseValuesBuilder_.dispose(); sparseValuesBuilder_ = null; } onChanged(); return this; } /** * .SparseValues sparse_values = 5; */ public io.pinecone.proto.SparseValues.Builder getSparseValuesBuilder() { bitField0_ |= 0x00000004; onChanged(); return getSparseValuesFieldBuilder().getBuilder(); } /** * .SparseValues sparse_values = 5; */ public io.pinecone.proto.SparseValuesOrBuilder getSparseValuesOrBuilder() { if (sparseValuesBuilder_ != null) { return sparseValuesBuilder_.getMessageOrBuilder(); } else { return sparseValues_ == null ? io.pinecone.proto.SparseValues.getDefaultInstance() : sparseValues_; } } /** * .SparseValues sparse_values = 5; */ private com.google.protobuf.SingleFieldBuilderV3< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder> getSparseValuesFieldBuilder() { if (sparseValuesBuilder_ == null) { sparseValuesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.pinecone.proto.SparseValues, io.pinecone.proto.SparseValues.Builder, io.pinecone.proto.SparseValuesOrBuilder>( getSparseValues(), getParentForChildren(), isClean()); sparseValues_ = null; } return sparseValuesBuilder_; } private com.google.protobuf.Struct 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; * @return Whether the setMetadata field is set. */ public boolean hasSetMetadata() { return ((bitField0_ & 0x00000008) != 0); } /** *
     * Metadata to *set* for the vector.
     * 
* * .google.protobuf.Struct set_metadata = 3; * @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; */ public Builder setSetMetadata(com.google.protobuf.Struct value) { if (setMetadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } setMetadata_ = value; } else { setMetadataBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * Metadata to *set* for the vector.
     * 
* * .google.protobuf.Struct set_metadata = 3; */ public Builder setSetMetadata( com.google.protobuf.Struct.Builder builderForValue) { if (setMetadataBuilder_ == null) { setMetadata_ = builderForValue.build(); } else { setMetadataBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * Metadata to *set* for the vector.
     * 
* * .google.protobuf.Struct set_metadata = 3; */ public Builder mergeSetMetadata(com.google.protobuf.Struct value) { if (setMetadataBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && setMetadata_ != null && setMetadata_ != com.google.protobuf.Struct.getDefaultInstance()) { getSetMetadataBuilder().mergeFrom(value); } else { setMetadata_ = value; } } else { setMetadataBuilder_.mergeFrom(value); } if (setMetadata_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** *
     * Metadata to *set* for the vector.
     * 
* * .google.protobuf.Struct set_metadata = 3; */ public Builder clearSetMetadata() { bitField0_ = (bitField0_ & ~0x00000008); setMetadata_ = null; if (setMetadataBuilder_ != null) { setMetadataBuilder_.dispose(); setMetadataBuilder_ = null; } onChanged(); return this; } /** *
     * Metadata to *set* for the vector.
     * 
* * .google.protobuf.Struct set_metadata = 3; */ public com.google.protobuf.Struct.Builder getSetMetadataBuilder() { bitField0_ |= 0x00000008; onChanged(); return getSetMetadataFieldBuilder().getBuilder(); } /** *
     * Metadata to *set* for the vector.
     * 
* * .google.protobuf.Struct set_metadata = 3; */ 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; */ 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; * @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; * @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; * @param value The namespace to set. * @return This builder for chaining. */ public Builder setNamespace( java.lang.String value) { if (value == null) { throw new NullPointerException(); } namespace_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * Namespace name where to update the vector.
     * 
* * string namespace = 4; * @return This builder for chaining. */ public Builder clearNamespace() { namespace_ = getDefaultInstance().getNamespace(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** *
     * Namespace name where to update the vector.
     * 
* * string namespace = 4; * @param value The bytes for namespace to set. * @return This builder for chaining. */ public Builder setNamespaceBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); namespace_ = value; bitField0_ |= 0x00000010; 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 PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public UpdateRequest 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.UpdateRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy