com.aerospike.vector.client.proto.PutRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of avs-client-java Show documentation
Show all versions of avs-client-java Show documentation
This project includes the Java client for Aerospike Vector Search for high-performance data interactions.
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: transact.proto
// Protobuf Java Version: 3.25.5
package com.aerospike.vector.client.proto;
/**
*
* Put request to insert/update a record.
*
*
* Protobuf type {@code aerospike.vector.PutRequest}
*/
public final class PutRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:aerospike.vector.PutRequest)
PutRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use PutRequest.newBuilder() to construct.
private PutRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PutRequest() {
writeType_ = 0;
fields_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PutRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.aerospike.vector.client.proto.Transact.internal_static_aerospike_vector_PutRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.aerospike.vector.client.proto.Transact.internal_static_aerospike_vector_PutRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.aerospike.vector.client.proto.PutRequest.class, com.aerospike.vector.client.proto.PutRequest.Builder.class);
}
private int bitField0_;
public static final int KEY_FIELD_NUMBER = 1;
private com.aerospike.vector.client.proto.Key key_;
/**
*
* The key for the record to insert/update
*
*
* .aerospike.vector.Key key = 1;
* @return Whether the key field is set.
*/
@java.lang.Override
public boolean hasKey() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The key for the record to insert/update
*
*
* .aerospike.vector.Key key = 1;
* @return The key.
*/
@java.lang.Override
public com.aerospike.vector.client.proto.Key getKey() {
return key_ == null ? com.aerospike.vector.client.proto.Key.getDefaultInstance() : key_;
}
/**
*
* The key for the record to insert/update
*
*
* .aerospike.vector.Key key = 1;
*/
@java.lang.Override
public com.aerospike.vector.client.proto.KeyOrBuilder getKeyOrBuilder() {
return key_ == null ? com.aerospike.vector.client.proto.Key.getDefaultInstance() : key_;
}
public static final int WRITETYPE_FIELD_NUMBER = 2;
private int writeType_ = 0;
/**
*
* The type of the put/write request. Defaults to UPSERT.
*
*
* optional .aerospike.vector.WriteType writeType = 2;
* @return Whether the writeType field is set.
*/
@java.lang.Override public boolean hasWriteType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The type of the put/write request. Defaults to UPSERT.
*
*
* optional .aerospike.vector.WriteType writeType = 2;
* @return The enum numeric value on the wire for writeType.
*/
@java.lang.Override public int getWriteTypeValue() {
return writeType_;
}
/**
*
* The type of the put/write request. Defaults to UPSERT.
*
*
* optional .aerospike.vector.WriteType writeType = 2;
* @return The writeType.
*/
@java.lang.Override public com.aerospike.vector.client.proto.WriteType getWriteType() {
com.aerospike.vector.client.proto.WriteType result = com.aerospike.vector.client.proto.WriteType.forNumber(writeType_);
return result == null ? com.aerospike.vector.client.proto.WriteType.UNRECOGNIZED : result;
}
public static final int FIELDS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List fields_;
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
@java.lang.Override
public java.util.List getFieldsList() {
return fields_;
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
@java.lang.Override
public java.util.List extends com.aerospike.vector.client.proto.FieldOrBuilder>
getFieldsOrBuilderList() {
return fields_;
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
@java.lang.Override
public int getFieldsCount() {
return fields_.size();
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
@java.lang.Override
public com.aerospike.vector.client.proto.Field getFields(int index) {
return fields_.get(index);
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
@java.lang.Override
public com.aerospike.vector.client.proto.FieldOrBuilder getFieldsOrBuilder(
int index) {
return fields_.get(index);
}
public static final int IGNOREMEMQUEUEFULL_FIELD_NUMBER = 4;
private boolean ignoreMemQueueFull_ = false;
/**
*
* Ignore the in-memory queue full error. These records would be written to
* storage and later, the index healer would pick for indexing.
*
*
* bool ignoreMemQueueFull = 4;
* @return The ignoreMemQueueFull.
*/
@java.lang.Override
public boolean getIgnoreMemQueueFull() {
return ignoreMemQueueFull_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getKey());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeEnum(2, writeType_);
}
for (int i = 0; i < fields_.size(); i++) {
output.writeMessage(3, fields_.get(i));
}
if (ignoreMemQueueFull_ != false) {
output.writeBool(4, ignoreMemQueueFull_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getKey());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, writeType_);
}
for (int i = 0; i < fields_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, fields_.get(i));
}
if (ignoreMemQueueFull_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, ignoreMemQueueFull_);
}
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 com.aerospike.vector.client.proto.PutRequest)) {
return super.equals(obj);
}
com.aerospike.vector.client.proto.PutRequest other = (com.aerospike.vector.client.proto.PutRequest) obj;
if (hasKey() != other.hasKey()) return false;
if (hasKey()) {
if (!getKey()
.equals(other.getKey())) return false;
}
if (hasWriteType() != other.hasWriteType()) return false;
if (hasWriteType()) {
if (writeType_ != other.writeType_) return false;
}
if (!getFieldsList()
.equals(other.getFieldsList())) return false;
if (getIgnoreMemQueueFull()
!= other.getIgnoreMemQueueFull()) 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();
if (hasKey()) {
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
}
if (hasWriteType()) {
hash = (37 * hash) + WRITETYPE_FIELD_NUMBER;
hash = (53 * hash) + writeType_;
}
if (getFieldsCount() > 0) {
hash = (37 * hash) + FIELDS_FIELD_NUMBER;
hash = (53 * hash) + getFieldsList().hashCode();
}
hash = (37 * hash) + IGNOREMEMQUEUEFULL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIgnoreMemQueueFull());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.aerospike.vector.client.proto.PutRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.aerospike.vector.client.proto.PutRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.aerospike.vector.client.proto.PutRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.aerospike.vector.client.proto.PutRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.aerospike.vector.client.proto.PutRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.aerospike.vector.client.proto.PutRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.aerospike.vector.client.proto.PutRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.aerospike.vector.client.proto.PutRequest 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 com.aerospike.vector.client.proto.PutRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.aerospike.vector.client.proto.PutRequest 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 com.aerospike.vector.client.proto.PutRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.aerospike.vector.client.proto.PutRequest 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(com.aerospike.vector.client.proto.PutRequest 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;
}
/**
*
* Put request to insert/update a record.
*
*
* Protobuf type {@code aerospike.vector.PutRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:aerospike.vector.PutRequest)
com.aerospike.vector.client.proto.PutRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.aerospike.vector.client.proto.Transact.internal_static_aerospike_vector_PutRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.aerospike.vector.client.proto.Transact.internal_static_aerospike_vector_PutRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.aerospike.vector.client.proto.PutRequest.class, com.aerospike.vector.client.proto.PutRequest.Builder.class);
}
// Construct using com.aerospike.vector.client.proto.PutRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getKeyFieldBuilder();
getFieldsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
key_ = null;
if (keyBuilder_ != null) {
keyBuilder_.dispose();
keyBuilder_ = null;
}
writeType_ = 0;
if (fieldsBuilder_ == null) {
fields_ = java.util.Collections.emptyList();
} else {
fields_ = null;
fieldsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
ignoreMemQueueFull_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.aerospike.vector.client.proto.Transact.internal_static_aerospike_vector_PutRequest_descriptor;
}
@java.lang.Override
public com.aerospike.vector.client.proto.PutRequest getDefaultInstanceForType() {
return com.aerospike.vector.client.proto.PutRequest.getDefaultInstance();
}
@java.lang.Override
public com.aerospike.vector.client.proto.PutRequest build() {
com.aerospike.vector.client.proto.PutRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.aerospike.vector.client.proto.PutRequest buildPartial() {
com.aerospike.vector.client.proto.PutRequest result = new com.aerospike.vector.client.proto.PutRequest(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.aerospike.vector.client.proto.PutRequest result) {
if (fieldsBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
fields_ = java.util.Collections.unmodifiableList(fields_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.fields_ = fields_;
} else {
result.fields_ = fieldsBuilder_.build();
}
}
private void buildPartial0(com.aerospike.vector.client.proto.PutRequest result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.key_ = keyBuilder_ == null
? key_
: keyBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.writeType_ = writeType_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.ignoreMemQueueFull_ = ignoreMemQueueFull_;
}
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 com.aerospike.vector.client.proto.PutRequest) {
return mergeFrom((com.aerospike.vector.client.proto.PutRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.aerospike.vector.client.proto.PutRequest other) {
if (other == com.aerospike.vector.client.proto.PutRequest.getDefaultInstance()) return this;
if (other.hasKey()) {
mergeKey(other.getKey());
}
if (other.hasWriteType()) {
setWriteType(other.getWriteType());
}
if (fieldsBuilder_ == null) {
if (!other.fields_.isEmpty()) {
if (fields_.isEmpty()) {
fields_ = other.fields_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureFieldsIsMutable();
fields_.addAll(other.fields_);
}
onChanged();
}
} else {
if (!other.fields_.isEmpty()) {
if (fieldsBuilder_.isEmpty()) {
fieldsBuilder_.dispose();
fieldsBuilder_ = null;
fields_ = other.fields_;
bitField0_ = (bitField0_ & ~0x00000004);
fieldsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFieldsFieldBuilder() : null;
} else {
fieldsBuilder_.addAllMessages(other.fields_);
}
}
}
if (other.getIgnoreMemQueueFull() != false) {
setIgnoreMemQueueFull(other.getIgnoreMemQueueFull());
}
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: {
input.readMessage(
getKeyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
writeType_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
com.aerospike.vector.client.proto.Field m =
input.readMessage(
com.aerospike.vector.client.proto.Field.parser(),
extensionRegistry);
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(m);
} else {
fieldsBuilder_.addMessage(m);
}
break;
} // case 26
case 32: {
ignoreMemQueueFull_ = input.readBool();
bitField0_ |= 0x00000008;
break;
} // case 32
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 com.aerospike.vector.client.proto.Key key_;
private com.google.protobuf.SingleFieldBuilderV3<
com.aerospike.vector.client.proto.Key, com.aerospike.vector.client.proto.Key.Builder, com.aerospike.vector.client.proto.KeyOrBuilder> keyBuilder_;
/**
*
* The key for the record to insert/update
*
*
* .aerospike.vector.Key key = 1;
* @return Whether the key field is set.
*/
public boolean hasKey() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The key for the record to insert/update
*
*
* .aerospike.vector.Key key = 1;
* @return The key.
*/
public com.aerospike.vector.client.proto.Key getKey() {
if (keyBuilder_ == null) {
return key_ == null ? com.aerospike.vector.client.proto.Key.getDefaultInstance() : key_;
} else {
return keyBuilder_.getMessage();
}
}
/**
*
* The key for the record to insert/update
*
*
* .aerospike.vector.Key key = 1;
*/
public Builder setKey(com.aerospike.vector.client.proto.Key value) {
if (keyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
} else {
keyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The key for the record to insert/update
*
*
* .aerospike.vector.Key key = 1;
*/
public Builder setKey(
com.aerospike.vector.client.proto.Key.Builder builderForValue) {
if (keyBuilder_ == null) {
key_ = builderForValue.build();
} else {
keyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The key for the record to insert/update
*
*
* .aerospike.vector.Key key = 1;
*/
public Builder mergeKey(com.aerospike.vector.client.proto.Key value) {
if (keyBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
key_ != null &&
key_ != com.aerospike.vector.client.proto.Key.getDefaultInstance()) {
getKeyBuilder().mergeFrom(value);
} else {
key_ = value;
}
} else {
keyBuilder_.mergeFrom(value);
}
if (key_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* The key for the record to insert/update
*
*
* .aerospike.vector.Key key = 1;
*/
public Builder clearKey() {
bitField0_ = (bitField0_ & ~0x00000001);
key_ = null;
if (keyBuilder_ != null) {
keyBuilder_.dispose();
keyBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The key for the record to insert/update
*
*
* .aerospike.vector.Key key = 1;
*/
public com.aerospike.vector.client.proto.Key.Builder getKeyBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getKeyFieldBuilder().getBuilder();
}
/**
*
* The key for the record to insert/update
*
*
* .aerospike.vector.Key key = 1;
*/
public com.aerospike.vector.client.proto.KeyOrBuilder getKeyOrBuilder() {
if (keyBuilder_ != null) {
return keyBuilder_.getMessageOrBuilder();
} else {
return key_ == null ?
com.aerospike.vector.client.proto.Key.getDefaultInstance() : key_;
}
}
/**
*
* The key for the record to insert/update
*
*
* .aerospike.vector.Key key = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.aerospike.vector.client.proto.Key, com.aerospike.vector.client.proto.Key.Builder, com.aerospike.vector.client.proto.KeyOrBuilder>
getKeyFieldBuilder() {
if (keyBuilder_ == null) {
keyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.aerospike.vector.client.proto.Key, com.aerospike.vector.client.proto.Key.Builder, com.aerospike.vector.client.proto.KeyOrBuilder>(
getKey(),
getParentForChildren(),
isClean());
key_ = null;
}
return keyBuilder_;
}
private int writeType_ = 0;
/**
*
* The type of the put/write request. Defaults to UPSERT.
*
*
* optional .aerospike.vector.WriteType writeType = 2;
* @return Whether the writeType field is set.
*/
@java.lang.Override public boolean hasWriteType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The type of the put/write request. Defaults to UPSERT.
*
*
* optional .aerospike.vector.WriteType writeType = 2;
* @return The enum numeric value on the wire for writeType.
*/
@java.lang.Override public int getWriteTypeValue() {
return writeType_;
}
/**
*
* The type of the put/write request. Defaults to UPSERT.
*
*
* optional .aerospike.vector.WriteType writeType = 2;
* @param value The enum numeric value on the wire for writeType to set.
* @return This builder for chaining.
*/
public Builder setWriteTypeValue(int value) {
writeType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The type of the put/write request. Defaults to UPSERT.
*
*
* optional .aerospike.vector.WriteType writeType = 2;
* @return The writeType.
*/
@java.lang.Override
public com.aerospike.vector.client.proto.WriteType getWriteType() {
com.aerospike.vector.client.proto.WriteType result = com.aerospike.vector.client.proto.WriteType.forNumber(writeType_);
return result == null ? com.aerospike.vector.client.proto.WriteType.UNRECOGNIZED : result;
}
/**
*
* The type of the put/write request. Defaults to UPSERT.
*
*
* optional .aerospike.vector.WriteType writeType = 2;
* @param value The writeType to set.
* @return This builder for chaining.
*/
public Builder setWriteType(com.aerospike.vector.client.proto.WriteType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
writeType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The type of the put/write request. Defaults to UPSERT.
*
*
* optional .aerospike.vector.WriteType writeType = 2;
* @return This builder for chaining.
*/
public Builder clearWriteType() {
bitField0_ = (bitField0_ & ~0x00000002);
writeType_ = 0;
onChanged();
return this;
}
private java.util.List fields_ =
java.util.Collections.emptyList();
private void ensureFieldsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
fields_ = new java.util.ArrayList(fields_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.aerospike.vector.client.proto.Field, com.aerospike.vector.client.proto.Field.Builder, com.aerospike.vector.client.proto.FieldOrBuilder> fieldsBuilder_;
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public java.util.List getFieldsList() {
if (fieldsBuilder_ == null) {
return java.util.Collections.unmodifiableList(fields_);
} else {
return fieldsBuilder_.getMessageList();
}
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public int getFieldsCount() {
if (fieldsBuilder_ == null) {
return fields_.size();
} else {
return fieldsBuilder_.getCount();
}
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public com.aerospike.vector.client.proto.Field getFields(int index) {
if (fieldsBuilder_ == null) {
return fields_.get(index);
} else {
return fieldsBuilder_.getMessage(index);
}
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public Builder setFields(
int index, com.aerospike.vector.client.proto.Field value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.set(index, value);
onChanged();
} else {
fieldsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public Builder setFields(
int index, com.aerospike.vector.client.proto.Field.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.set(index, builderForValue.build());
onChanged();
} else {
fieldsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public Builder addFields(com.aerospike.vector.client.proto.Field value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.add(value);
onChanged();
} else {
fieldsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public Builder addFields(
int index, com.aerospike.vector.client.proto.Field value) {
if (fieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFieldsIsMutable();
fields_.add(index, value);
onChanged();
} else {
fieldsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public Builder addFields(
com.aerospike.vector.client.proto.Field.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(builderForValue.build());
onChanged();
} else {
fieldsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public Builder addFields(
int index, com.aerospike.vector.client.proto.Field.Builder builderForValue) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.add(index, builderForValue.build());
onChanged();
} else {
fieldsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public Builder addAllFields(
java.lang.Iterable extends com.aerospike.vector.client.proto.Field> values) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, fields_);
onChanged();
} else {
fieldsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public Builder clearFields() {
if (fieldsBuilder_ == null) {
fields_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
fieldsBuilder_.clear();
}
return this;
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public Builder removeFields(int index) {
if (fieldsBuilder_ == null) {
ensureFieldsIsMutable();
fields_.remove(index);
onChanged();
} else {
fieldsBuilder_.remove(index);
}
return this;
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public com.aerospike.vector.client.proto.Field.Builder getFieldsBuilder(
int index) {
return getFieldsFieldBuilder().getBuilder(index);
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public com.aerospike.vector.client.proto.FieldOrBuilder getFieldsOrBuilder(
int index) {
if (fieldsBuilder_ == null) {
return fields_.get(index); } else {
return fieldsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public java.util.List extends com.aerospike.vector.client.proto.FieldOrBuilder>
getFieldsOrBuilderList() {
if (fieldsBuilder_ != null) {
return fieldsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(fields_);
}
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public com.aerospike.vector.client.proto.Field.Builder addFieldsBuilder() {
return getFieldsFieldBuilder().addBuilder(
com.aerospike.vector.client.proto.Field.getDefaultInstance());
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public com.aerospike.vector.client.proto.Field.Builder addFieldsBuilder(
int index) {
return getFieldsFieldBuilder().addBuilder(
index, com.aerospike.vector.client.proto.Field.getDefaultInstance());
}
/**
*
* The record fields.
*
*
* repeated .aerospike.vector.Field fields = 3;
*/
public java.util.List
getFieldsBuilderList() {
return getFieldsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.aerospike.vector.client.proto.Field, com.aerospike.vector.client.proto.Field.Builder, com.aerospike.vector.client.proto.FieldOrBuilder>
getFieldsFieldBuilder() {
if (fieldsBuilder_ == null) {
fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.aerospike.vector.client.proto.Field, com.aerospike.vector.client.proto.Field.Builder, com.aerospike.vector.client.proto.FieldOrBuilder>(
fields_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
fields_ = null;
}
return fieldsBuilder_;
}
private boolean ignoreMemQueueFull_ ;
/**
*
* Ignore the in-memory queue full error. These records would be written to
* storage and later, the index healer would pick for indexing.
*
*
* bool ignoreMemQueueFull = 4;
* @return The ignoreMemQueueFull.
*/
@java.lang.Override
public boolean getIgnoreMemQueueFull() {
return ignoreMemQueueFull_;
}
/**
*
* Ignore the in-memory queue full error. These records would be written to
* storage and later, the index healer would pick for indexing.
*
*
* bool ignoreMemQueueFull = 4;
* @param value The ignoreMemQueueFull to set.
* @return This builder for chaining.
*/
public Builder setIgnoreMemQueueFull(boolean value) {
ignoreMemQueueFull_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Ignore the in-memory queue full error. These records would be written to
* storage and later, the index healer would pick for indexing.
*
*
* bool ignoreMemQueueFull = 4;
* @return This builder for chaining.
*/
public Builder clearIgnoreMemQueueFull() {
bitField0_ = (bitField0_ & ~0x00000008);
ignoreMemQueueFull_ = false;
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:aerospike.vector.PutRequest)
}
// @@protoc_insertion_point(class_scope:aerospike.vector.PutRequest)
private static final com.aerospike.vector.client.proto.PutRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.aerospike.vector.client.proto.PutRequest();
}
public static com.aerospike.vector.client.proto.PutRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PutRequest 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 com.aerospike.vector.client.proto.PutRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy