com.scalar.db.rpc.Mutation Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: scalardb.proto
package com.scalar.db.rpc;
/**
* Protobuf type {@code rpc.Mutation}
*/
public final class Mutation extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:rpc.Mutation)
MutationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Mutation.newBuilder() to construct.
private Mutation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Mutation() {
namespace_ = "";
table_ = "";
consistency_ = 0;
type_ = 0;
value_ = java.util.Collections.emptyList();
column_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Mutation();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Mutation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Mutation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.scalar.db.rpc.Mutation.class, com.scalar.db.rpc.Mutation.Builder.class);
}
/**
* Protobuf enum {@code rpc.Mutation.Type}
*/
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
/**
* PUT = 0;
*/
PUT(0),
/**
* DELETE = 1;
*/
DELETE(1),
UNRECOGNIZED(-1),
;
/**
* PUT = 0;
*/
public static final int PUT_VALUE = 0;
/**
* DELETE = 1;
*/
public static final int DELETE_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Type valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Type forNumber(int value) {
switch (value) {
case 0: return PUT;
case 1: return DELETE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Type> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Type findValueByNumber(int number) {
return Type.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.scalar.db.rpc.Mutation.getDescriptor().getEnumTypes().get(0);
}
private static final Type[] VALUES = values();
public static Type valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Type(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:rpc.Mutation.Type)
}
public static final int NAMESPACE_FIELD_NUMBER = 1;
private volatile java.lang.Object namespace_;
/**
* string namespace = 1;
* @return The namespace.
*/
@java.lang.Override
public java.lang.String getNamespace() {
java.lang.Object ref = namespace_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
namespace_ = s;
return s;
}
}
/**
* string namespace = 1;
* @return The bytes for namespace.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNamespaceBytes() {
java.lang.Object ref = namespace_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
namespace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TABLE_FIELD_NUMBER = 2;
private volatile java.lang.Object table_;
/**
* string table = 2;
* @return The table.
*/
@java.lang.Override
public java.lang.String getTable() {
java.lang.Object ref = table_;
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();
table_ = s;
return s;
}
}
/**
* string table = 2;
* @return The bytes for table.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTableBytes() {
java.lang.Object ref = table_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
table_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PARTITION_KEY_FIELD_NUMBER = 3;
private com.scalar.db.rpc.Key partitionKey_;
/**
* .rpc.Key partition_key = 3;
* @return Whether the partitionKey field is set.
*/
@java.lang.Override
public boolean hasPartitionKey() {
return partitionKey_ != null;
}
/**
* .rpc.Key partition_key = 3;
* @return The partitionKey.
*/
@java.lang.Override
public com.scalar.db.rpc.Key getPartitionKey() {
return partitionKey_ == null ? com.scalar.db.rpc.Key.getDefaultInstance() : partitionKey_;
}
/**
* .rpc.Key partition_key = 3;
*/
@java.lang.Override
public com.scalar.db.rpc.KeyOrBuilder getPartitionKeyOrBuilder() {
return getPartitionKey();
}
public static final int CLUSTERING_KEY_FIELD_NUMBER = 4;
private com.scalar.db.rpc.Key clusteringKey_;
/**
* .rpc.Key clustering_key = 4;
* @return Whether the clusteringKey field is set.
*/
@java.lang.Override
public boolean hasClusteringKey() {
return clusteringKey_ != null;
}
/**
* .rpc.Key clustering_key = 4;
* @return The clusteringKey.
*/
@java.lang.Override
public com.scalar.db.rpc.Key getClusteringKey() {
return clusteringKey_ == null ? com.scalar.db.rpc.Key.getDefaultInstance() : clusteringKey_;
}
/**
* .rpc.Key clustering_key = 4;
*/
@java.lang.Override
public com.scalar.db.rpc.KeyOrBuilder getClusteringKeyOrBuilder() {
return getClusteringKey();
}
public static final int CONSISTENCY_FIELD_NUMBER = 5;
private int consistency_;
/**
* .rpc.Consistency consistency = 5;
* @return The enum numeric value on the wire for consistency.
*/
@java.lang.Override public int getConsistencyValue() {
return consistency_;
}
/**
* .rpc.Consistency consistency = 5;
* @return The consistency.
*/
@java.lang.Override public com.scalar.db.rpc.Consistency getConsistency() {
@SuppressWarnings("deprecation")
com.scalar.db.rpc.Consistency result = com.scalar.db.rpc.Consistency.valueOf(consistency_);
return result == null ? com.scalar.db.rpc.Consistency.UNRECOGNIZED : result;
}
public static final int CONDITION_FIELD_NUMBER = 6;
private com.scalar.db.rpc.MutateCondition condition_;
/**
* .rpc.MutateCondition condition = 6;
* @return Whether the condition field is set.
*/
@java.lang.Override
public boolean hasCondition() {
return condition_ != null;
}
/**
* .rpc.MutateCondition condition = 6;
* @return The condition.
*/
@java.lang.Override
public com.scalar.db.rpc.MutateCondition getCondition() {
return condition_ == null ? com.scalar.db.rpc.MutateCondition.getDefaultInstance() : condition_;
}
/**
* .rpc.MutateCondition condition = 6;
*/
@java.lang.Override
public com.scalar.db.rpc.MutateConditionOrBuilder getConditionOrBuilder() {
return getCondition();
}
public static final int TYPE_FIELD_NUMBER = 7;
private int type_;
/**
* .rpc.Mutation.Type type = 7;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .rpc.Mutation.Type type = 7;
* @return The type.
*/
@java.lang.Override public com.scalar.db.rpc.Mutation.Type getType() {
@SuppressWarnings("deprecation")
com.scalar.db.rpc.Mutation.Type result = com.scalar.db.rpc.Mutation.Type.valueOf(type_);
return result == null ? com.scalar.db.rpc.Mutation.Type.UNRECOGNIZED : result;
}
public static final int VALUE_FIELD_NUMBER = 8;
private java.util.List value_;
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated public java.util.List getValueList() {
return value_;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated public java.util.List extends com.scalar.db.rpc.ValueOrBuilder>
getValueOrBuilderList() {
return value_;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated public int getValueCount() {
return value_.size();
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated public com.scalar.db.rpc.Value getValue(int index) {
return value_.get(index);
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated public com.scalar.db.rpc.ValueOrBuilder getValueOrBuilder(
int index) {
return value_.get(index);
}
public static final int COLUMN_FIELD_NUMBER = 9;
private java.util.List column_;
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
@java.lang.Override
public java.util.List getColumnList() {
return column_;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
@java.lang.Override
public java.util.List extends com.scalar.db.rpc.ColumnOrBuilder>
getColumnOrBuilderList() {
return column_;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
@java.lang.Override
public int getColumnCount() {
return column_.size();
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
@java.lang.Override
public com.scalar.db.rpc.Column getColumn(int index) {
return column_.get(index);
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
@java.lang.Override
public com.scalar.db.rpc.ColumnOrBuilder getColumnOrBuilder(
int index) {
return column_.get(index);
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namespace_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, table_);
}
if (partitionKey_ != null) {
output.writeMessage(3, getPartitionKey());
}
if (clusteringKey_ != null) {
output.writeMessage(4, getClusteringKey());
}
if (consistency_ != com.scalar.db.rpc.Consistency.CONSISTENCY_SEQUENTIAL.getNumber()) {
output.writeEnum(5, consistency_);
}
if (condition_ != null) {
output.writeMessage(6, getCondition());
}
if (type_ != com.scalar.db.rpc.Mutation.Type.PUT.getNumber()) {
output.writeEnum(7, type_);
}
for (int i = 0; i < value_.size(); i++) {
output.writeMessage(8, value_.get(i));
}
for (int i = 0; i < column_.size(); i++) {
output.writeMessage(9, column_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namespace_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namespace_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, table_);
}
if (partitionKey_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getPartitionKey());
}
if (clusteringKey_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getClusteringKey());
}
if (consistency_ != com.scalar.db.rpc.Consistency.CONSISTENCY_SEQUENTIAL.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, consistency_);
}
if (condition_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getCondition());
}
if (type_ != com.scalar.db.rpc.Mutation.Type.PUT.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(7, type_);
}
for (int i = 0; i < value_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, value_.get(i));
}
for (int i = 0; i < column_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, column_.get(i));
}
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.scalar.db.rpc.Mutation)) {
return super.equals(obj);
}
com.scalar.db.rpc.Mutation other = (com.scalar.db.rpc.Mutation) obj;
if (!getNamespace()
.equals(other.getNamespace())) return false;
if (!getTable()
.equals(other.getTable())) return false;
if (hasPartitionKey() != other.hasPartitionKey()) return false;
if (hasPartitionKey()) {
if (!getPartitionKey()
.equals(other.getPartitionKey())) return false;
}
if (hasClusteringKey() != other.hasClusteringKey()) return false;
if (hasClusteringKey()) {
if (!getClusteringKey()
.equals(other.getClusteringKey())) return false;
}
if (consistency_ != other.consistency_) return false;
if (hasCondition() != other.hasCondition()) return false;
if (hasCondition()) {
if (!getCondition()
.equals(other.getCondition())) return false;
}
if (type_ != other.type_) return false;
if (!getValueList()
.equals(other.getValueList())) return false;
if (!getColumnList()
.equals(other.getColumnList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAMESPACE_FIELD_NUMBER;
hash = (53 * hash) + getNamespace().hashCode();
hash = (37 * hash) + TABLE_FIELD_NUMBER;
hash = (53 * hash) + getTable().hashCode();
if (hasPartitionKey()) {
hash = (37 * hash) + PARTITION_KEY_FIELD_NUMBER;
hash = (53 * hash) + getPartitionKey().hashCode();
}
if (hasClusteringKey()) {
hash = (37 * hash) + CLUSTERING_KEY_FIELD_NUMBER;
hash = (53 * hash) + getClusteringKey().hashCode();
}
hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER;
hash = (53 * hash) + consistency_;
if (hasCondition()) {
hash = (37 * hash) + CONDITION_FIELD_NUMBER;
hash = (53 * hash) + getCondition().hashCode();
}
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
if (getValueCount() > 0) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValueList().hashCode();
}
if (getColumnCount() > 0) {
hash = (37 * hash) + COLUMN_FIELD_NUMBER;
hash = (53 * hash) + getColumnList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.scalar.db.rpc.Mutation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.scalar.db.rpc.Mutation parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.scalar.db.rpc.Mutation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.scalar.db.rpc.Mutation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.scalar.db.rpc.Mutation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.scalar.db.rpc.Mutation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.scalar.db.rpc.Mutation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.scalar.db.rpc.Mutation 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.scalar.db.rpc.Mutation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.scalar.db.rpc.Mutation 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.scalar.db.rpc.Mutation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.scalar.db.rpc.Mutation 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.scalar.db.rpc.Mutation 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 rpc.Mutation}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:rpc.Mutation)
com.scalar.db.rpc.MutationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Mutation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Mutation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.scalar.db.rpc.Mutation.class, com.scalar.db.rpc.Mutation.Builder.class);
}
// Construct using com.scalar.db.rpc.Mutation.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
namespace_ = "";
table_ = "";
if (partitionKeyBuilder_ == null) {
partitionKey_ = null;
} else {
partitionKey_ = null;
partitionKeyBuilder_ = null;
}
if (clusteringKeyBuilder_ == null) {
clusteringKey_ = null;
} else {
clusteringKey_ = null;
clusteringKeyBuilder_ = null;
}
consistency_ = 0;
if (conditionBuilder_ == null) {
condition_ = null;
} else {
condition_ = null;
conditionBuilder_ = null;
}
type_ = 0;
if (valueBuilder_ == null) {
value_ = java.util.Collections.emptyList();
} else {
value_ = null;
valueBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (columnBuilder_ == null) {
column_ = java.util.Collections.emptyList();
} else {
column_ = null;
columnBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Mutation_descriptor;
}
@java.lang.Override
public com.scalar.db.rpc.Mutation getDefaultInstanceForType() {
return com.scalar.db.rpc.Mutation.getDefaultInstance();
}
@java.lang.Override
public com.scalar.db.rpc.Mutation build() {
com.scalar.db.rpc.Mutation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.scalar.db.rpc.Mutation buildPartial() {
com.scalar.db.rpc.Mutation result = new com.scalar.db.rpc.Mutation(this);
int from_bitField0_ = bitField0_;
result.namespace_ = namespace_;
result.table_ = table_;
if (partitionKeyBuilder_ == null) {
result.partitionKey_ = partitionKey_;
} else {
result.partitionKey_ = partitionKeyBuilder_.build();
}
if (clusteringKeyBuilder_ == null) {
result.clusteringKey_ = clusteringKey_;
} else {
result.clusteringKey_ = clusteringKeyBuilder_.build();
}
result.consistency_ = consistency_;
if (conditionBuilder_ == null) {
result.condition_ = condition_;
} else {
result.condition_ = conditionBuilder_.build();
}
result.type_ = type_;
if (valueBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
value_ = java.util.Collections.unmodifiableList(value_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.value_ = value_;
} else {
result.value_ = valueBuilder_.build();
}
if (columnBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
column_ = java.util.Collections.unmodifiableList(column_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.column_ = column_;
} else {
result.column_ = columnBuilder_.build();
}
onBuilt();
return result;
}
@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.scalar.db.rpc.Mutation) {
return mergeFrom((com.scalar.db.rpc.Mutation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.scalar.db.rpc.Mutation other) {
if (other == com.scalar.db.rpc.Mutation.getDefaultInstance()) return this;
if (!other.getNamespace().isEmpty()) {
namespace_ = other.namespace_;
onChanged();
}
if (!other.getTable().isEmpty()) {
table_ = other.table_;
onChanged();
}
if (other.hasPartitionKey()) {
mergePartitionKey(other.getPartitionKey());
}
if (other.hasClusteringKey()) {
mergeClusteringKey(other.getClusteringKey());
}
if (other.consistency_ != 0) {
setConsistencyValue(other.getConsistencyValue());
}
if (other.hasCondition()) {
mergeCondition(other.getCondition());
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (valueBuilder_ == null) {
if (!other.value_.isEmpty()) {
if (value_.isEmpty()) {
value_ = other.value_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureValueIsMutable();
value_.addAll(other.value_);
}
onChanged();
}
} else {
if (!other.value_.isEmpty()) {
if (valueBuilder_.isEmpty()) {
valueBuilder_.dispose();
valueBuilder_ = null;
value_ = other.value_;
bitField0_ = (bitField0_ & ~0x00000001);
valueBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getValueFieldBuilder() : null;
} else {
valueBuilder_.addAllMessages(other.value_);
}
}
}
if (columnBuilder_ == null) {
if (!other.column_.isEmpty()) {
if (column_.isEmpty()) {
column_ = other.column_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureColumnIsMutable();
column_.addAll(other.column_);
}
onChanged();
}
} else {
if (!other.column_.isEmpty()) {
if (columnBuilder_.isEmpty()) {
columnBuilder_.dispose();
columnBuilder_ = null;
column_ = other.column_;
bitField0_ = (bitField0_ & ~0x00000002);
columnBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getColumnFieldBuilder() : null;
} else {
columnBuilder_.addAllMessages(other.column_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
namespace_ = input.readStringRequireUtf8();
break;
} // case 10
case 18: {
table_ = input.readStringRequireUtf8();
break;
} // case 18
case 26: {
input.readMessage(
getPartitionKeyFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 26
case 34: {
input.readMessage(
getClusteringKeyFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 34
case 40: {
consistency_ = input.readEnum();
break;
} // case 40
case 50: {
input.readMessage(
getConditionFieldBuilder().getBuilder(),
extensionRegistry);
break;
} // case 50
case 56: {
type_ = input.readEnum();
break;
} // case 56
case 66: {
com.scalar.db.rpc.Value m =
input.readMessage(
com.scalar.db.rpc.Value.parser(),
extensionRegistry);
if (valueBuilder_ == null) {
ensureValueIsMutable();
value_.add(m);
} else {
valueBuilder_.addMessage(m);
}
break;
} // case 66
case 74: {
com.scalar.db.rpc.Column m =
input.readMessage(
com.scalar.db.rpc.Column.parser(),
extensionRegistry);
if (columnBuilder_ == null) {
ensureColumnIsMutable();
column_.add(m);
} else {
columnBuilder_.addMessage(m);
}
break;
} // case 74
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object namespace_ = "";
/**
* string namespace = 1;
* @return The namespace.
*/
public java.lang.String getNamespace() {
java.lang.Object ref = namespace_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
namespace_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string namespace = 1;
* @return The bytes for namespace.
*/
public com.google.protobuf.ByteString
getNamespaceBytes() {
java.lang.Object ref = namespace_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
namespace_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string namespace = 1;
* @param value The namespace to set.
* @return This builder for chaining.
*/
public Builder setNamespace(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
namespace_ = value;
onChanged();
return this;
}
/**
* string namespace = 1;
* @return This builder for chaining.
*/
public Builder clearNamespace() {
namespace_ = getDefaultInstance().getNamespace();
onChanged();
return this;
}
/**
* string namespace = 1;
* @param value The bytes for namespace to set.
* @return This builder for chaining.
*/
public Builder setNamespaceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
namespace_ = value;
onChanged();
return this;
}
private java.lang.Object table_ = "";
/**
* string table = 2;
* @return The table.
*/
public java.lang.String getTable() {
java.lang.Object ref = table_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
table_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string table = 2;
* @return The bytes for table.
*/
public com.google.protobuf.ByteString
getTableBytes() {
java.lang.Object ref = table_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
table_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string table = 2;
* @param value The table to set.
* @return This builder for chaining.
*/
public Builder setTable(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
table_ = value;
onChanged();
return this;
}
/**
* string table = 2;
* @return This builder for chaining.
*/
public Builder clearTable() {
table_ = getDefaultInstance().getTable();
onChanged();
return this;
}
/**
* string table = 2;
* @param value The bytes for table to set.
* @return This builder for chaining.
*/
public Builder setTableBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
table_ = value;
onChanged();
return this;
}
private com.scalar.db.rpc.Key partitionKey_;
private com.google.protobuf.SingleFieldBuilderV3<
com.scalar.db.rpc.Key, com.scalar.db.rpc.Key.Builder, com.scalar.db.rpc.KeyOrBuilder> partitionKeyBuilder_;
/**
* .rpc.Key partition_key = 3;
* @return Whether the partitionKey field is set.
*/
public boolean hasPartitionKey() {
return partitionKeyBuilder_ != null || partitionKey_ != null;
}
/**
* .rpc.Key partition_key = 3;
* @return The partitionKey.
*/
public com.scalar.db.rpc.Key getPartitionKey() {
if (partitionKeyBuilder_ == null) {
return partitionKey_ == null ? com.scalar.db.rpc.Key.getDefaultInstance() : partitionKey_;
} else {
return partitionKeyBuilder_.getMessage();
}
}
/**
* .rpc.Key partition_key = 3;
*/
public Builder setPartitionKey(com.scalar.db.rpc.Key value) {
if (partitionKeyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
partitionKey_ = value;
onChanged();
} else {
partitionKeyBuilder_.setMessage(value);
}
return this;
}
/**
* .rpc.Key partition_key = 3;
*/
public Builder setPartitionKey(
com.scalar.db.rpc.Key.Builder builderForValue) {
if (partitionKeyBuilder_ == null) {
partitionKey_ = builderForValue.build();
onChanged();
} else {
partitionKeyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .rpc.Key partition_key = 3;
*/
public Builder mergePartitionKey(com.scalar.db.rpc.Key value) {
if (partitionKeyBuilder_ == null) {
if (partitionKey_ != null) {
partitionKey_ =
com.scalar.db.rpc.Key.newBuilder(partitionKey_).mergeFrom(value).buildPartial();
} else {
partitionKey_ = value;
}
onChanged();
} else {
partitionKeyBuilder_.mergeFrom(value);
}
return this;
}
/**
* .rpc.Key partition_key = 3;
*/
public Builder clearPartitionKey() {
if (partitionKeyBuilder_ == null) {
partitionKey_ = null;
onChanged();
} else {
partitionKey_ = null;
partitionKeyBuilder_ = null;
}
return this;
}
/**
* .rpc.Key partition_key = 3;
*/
public com.scalar.db.rpc.Key.Builder getPartitionKeyBuilder() {
onChanged();
return getPartitionKeyFieldBuilder().getBuilder();
}
/**
* .rpc.Key partition_key = 3;
*/
public com.scalar.db.rpc.KeyOrBuilder getPartitionKeyOrBuilder() {
if (partitionKeyBuilder_ != null) {
return partitionKeyBuilder_.getMessageOrBuilder();
} else {
return partitionKey_ == null ?
com.scalar.db.rpc.Key.getDefaultInstance() : partitionKey_;
}
}
/**
* .rpc.Key partition_key = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.scalar.db.rpc.Key, com.scalar.db.rpc.Key.Builder, com.scalar.db.rpc.KeyOrBuilder>
getPartitionKeyFieldBuilder() {
if (partitionKeyBuilder_ == null) {
partitionKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.scalar.db.rpc.Key, com.scalar.db.rpc.Key.Builder, com.scalar.db.rpc.KeyOrBuilder>(
getPartitionKey(),
getParentForChildren(),
isClean());
partitionKey_ = null;
}
return partitionKeyBuilder_;
}
private com.scalar.db.rpc.Key clusteringKey_;
private com.google.protobuf.SingleFieldBuilderV3<
com.scalar.db.rpc.Key, com.scalar.db.rpc.Key.Builder, com.scalar.db.rpc.KeyOrBuilder> clusteringKeyBuilder_;
/**
* .rpc.Key clustering_key = 4;
* @return Whether the clusteringKey field is set.
*/
public boolean hasClusteringKey() {
return clusteringKeyBuilder_ != null || clusteringKey_ != null;
}
/**
* .rpc.Key clustering_key = 4;
* @return The clusteringKey.
*/
public com.scalar.db.rpc.Key getClusteringKey() {
if (clusteringKeyBuilder_ == null) {
return clusteringKey_ == null ? com.scalar.db.rpc.Key.getDefaultInstance() : clusteringKey_;
} else {
return clusteringKeyBuilder_.getMessage();
}
}
/**
* .rpc.Key clustering_key = 4;
*/
public Builder setClusteringKey(com.scalar.db.rpc.Key value) {
if (clusteringKeyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
clusteringKey_ = value;
onChanged();
} else {
clusteringKeyBuilder_.setMessage(value);
}
return this;
}
/**
* .rpc.Key clustering_key = 4;
*/
public Builder setClusteringKey(
com.scalar.db.rpc.Key.Builder builderForValue) {
if (clusteringKeyBuilder_ == null) {
clusteringKey_ = builderForValue.build();
onChanged();
} else {
clusteringKeyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .rpc.Key clustering_key = 4;
*/
public Builder mergeClusteringKey(com.scalar.db.rpc.Key value) {
if (clusteringKeyBuilder_ == null) {
if (clusteringKey_ != null) {
clusteringKey_ =
com.scalar.db.rpc.Key.newBuilder(clusteringKey_).mergeFrom(value).buildPartial();
} else {
clusteringKey_ = value;
}
onChanged();
} else {
clusteringKeyBuilder_.mergeFrom(value);
}
return this;
}
/**
* .rpc.Key clustering_key = 4;
*/
public Builder clearClusteringKey() {
if (clusteringKeyBuilder_ == null) {
clusteringKey_ = null;
onChanged();
} else {
clusteringKey_ = null;
clusteringKeyBuilder_ = null;
}
return this;
}
/**
* .rpc.Key clustering_key = 4;
*/
public com.scalar.db.rpc.Key.Builder getClusteringKeyBuilder() {
onChanged();
return getClusteringKeyFieldBuilder().getBuilder();
}
/**
* .rpc.Key clustering_key = 4;
*/
public com.scalar.db.rpc.KeyOrBuilder getClusteringKeyOrBuilder() {
if (clusteringKeyBuilder_ != null) {
return clusteringKeyBuilder_.getMessageOrBuilder();
} else {
return clusteringKey_ == null ?
com.scalar.db.rpc.Key.getDefaultInstance() : clusteringKey_;
}
}
/**
* .rpc.Key clustering_key = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.scalar.db.rpc.Key, com.scalar.db.rpc.Key.Builder, com.scalar.db.rpc.KeyOrBuilder>
getClusteringKeyFieldBuilder() {
if (clusteringKeyBuilder_ == null) {
clusteringKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.scalar.db.rpc.Key, com.scalar.db.rpc.Key.Builder, com.scalar.db.rpc.KeyOrBuilder>(
getClusteringKey(),
getParentForChildren(),
isClean());
clusteringKey_ = null;
}
return clusteringKeyBuilder_;
}
private int consistency_ = 0;
/**
* .rpc.Consistency consistency = 5;
* @return The enum numeric value on the wire for consistency.
*/
@java.lang.Override public int getConsistencyValue() {
return consistency_;
}
/**
* .rpc.Consistency consistency = 5;
* @param value The enum numeric value on the wire for consistency to set.
* @return This builder for chaining.
*/
public Builder setConsistencyValue(int value) {
consistency_ = value;
onChanged();
return this;
}
/**
* .rpc.Consistency consistency = 5;
* @return The consistency.
*/
@java.lang.Override
public com.scalar.db.rpc.Consistency getConsistency() {
@SuppressWarnings("deprecation")
com.scalar.db.rpc.Consistency result = com.scalar.db.rpc.Consistency.valueOf(consistency_);
return result == null ? com.scalar.db.rpc.Consistency.UNRECOGNIZED : result;
}
/**
* .rpc.Consistency consistency = 5;
* @param value The consistency to set.
* @return This builder for chaining.
*/
public Builder setConsistency(com.scalar.db.rpc.Consistency value) {
if (value == null) {
throw new NullPointerException();
}
consistency_ = value.getNumber();
onChanged();
return this;
}
/**
* .rpc.Consistency consistency = 5;
* @return This builder for chaining.
*/
public Builder clearConsistency() {
consistency_ = 0;
onChanged();
return this;
}
private com.scalar.db.rpc.MutateCondition condition_;
private com.google.protobuf.SingleFieldBuilderV3<
com.scalar.db.rpc.MutateCondition, com.scalar.db.rpc.MutateCondition.Builder, com.scalar.db.rpc.MutateConditionOrBuilder> conditionBuilder_;
/**
* .rpc.MutateCondition condition = 6;
* @return Whether the condition field is set.
*/
public boolean hasCondition() {
return conditionBuilder_ != null || condition_ != null;
}
/**
* .rpc.MutateCondition condition = 6;
* @return The condition.
*/
public com.scalar.db.rpc.MutateCondition getCondition() {
if (conditionBuilder_ == null) {
return condition_ == null ? com.scalar.db.rpc.MutateCondition.getDefaultInstance() : condition_;
} else {
return conditionBuilder_.getMessage();
}
}
/**
* .rpc.MutateCondition condition = 6;
*/
public Builder setCondition(com.scalar.db.rpc.MutateCondition value) {
if (conditionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
condition_ = value;
onChanged();
} else {
conditionBuilder_.setMessage(value);
}
return this;
}
/**
* .rpc.MutateCondition condition = 6;
*/
public Builder setCondition(
com.scalar.db.rpc.MutateCondition.Builder builderForValue) {
if (conditionBuilder_ == null) {
condition_ = builderForValue.build();
onChanged();
} else {
conditionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .rpc.MutateCondition condition = 6;
*/
public Builder mergeCondition(com.scalar.db.rpc.MutateCondition value) {
if (conditionBuilder_ == null) {
if (condition_ != null) {
condition_ =
com.scalar.db.rpc.MutateCondition.newBuilder(condition_).mergeFrom(value).buildPartial();
} else {
condition_ = value;
}
onChanged();
} else {
conditionBuilder_.mergeFrom(value);
}
return this;
}
/**
* .rpc.MutateCondition condition = 6;
*/
public Builder clearCondition() {
if (conditionBuilder_ == null) {
condition_ = null;
onChanged();
} else {
condition_ = null;
conditionBuilder_ = null;
}
return this;
}
/**
* .rpc.MutateCondition condition = 6;
*/
public com.scalar.db.rpc.MutateCondition.Builder getConditionBuilder() {
onChanged();
return getConditionFieldBuilder().getBuilder();
}
/**
* .rpc.MutateCondition condition = 6;
*/
public com.scalar.db.rpc.MutateConditionOrBuilder getConditionOrBuilder() {
if (conditionBuilder_ != null) {
return conditionBuilder_.getMessageOrBuilder();
} else {
return condition_ == null ?
com.scalar.db.rpc.MutateCondition.getDefaultInstance() : condition_;
}
}
/**
* .rpc.MutateCondition condition = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.scalar.db.rpc.MutateCondition, com.scalar.db.rpc.MutateCondition.Builder, com.scalar.db.rpc.MutateConditionOrBuilder>
getConditionFieldBuilder() {
if (conditionBuilder_ == null) {
conditionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.scalar.db.rpc.MutateCondition, com.scalar.db.rpc.MutateCondition.Builder, com.scalar.db.rpc.MutateConditionOrBuilder>(
getCondition(),
getParentForChildren(),
isClean());
condition_ = null;
}
return conditionBuilder_;
}
private int type_ = 0;
/**
* .rpc.Mutation.Type type = 7;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
* .rpc.Mutation.Type type = 7;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
* .rpc.Mutation.Type type = 7;
* @return The type.
*/
@java.lang.Override
public com.scalar.db.rpc.Mutation.Type getType() {
@SuppressWarnings("deprecation")
com.scalar.db.rpc.Mutation.Type result = com.scalar.db.rpc.Mutation.Type.valueOf(type_);
return result == null ? com.scalar.db.rpc.Mutation.Type.UNRECOGNIZED : result;
}
/**
* .rpc.Mutation.Type type = 7;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(com.scalar.db.rpc.Mutation.Type value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
* .rpc.Mutation.Type type = 7;
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private java.util.List value_ =
java.util.Collections.emptyList();
private void ensureValueIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
value_ = new java.util.ArrayList(value_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.scalar.db.rpc.Value, com.scalar.db.rpc.Value.Builder, com.scalar.db.rpc.ValueOrBuilder> valueBuilder_;
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public java.util.List getValueList() {
if (valueBuilder_ == null) {
return java.util.Collections.unmodifiableList(value_);
} else {
return valueBuilder_.getMessageList();
}
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public int getValueCount() {
if (valueBuilder_ == null) {
return value_.size();
} else {
return valueBuilder_.getCount();
}
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public com.scalar.db.rpc.Value getValue(int index) {
if (valueBuilder_ == null) {
return value_.get(index);
} else {
return valueBuilder_.getMessage(index);
}
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public Builder setValue(
int index, com.scalar.db.rpc.Value value) {
if (valueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValueIsMutable();
value_.set(index, value);
onChanged();
} else {
valueBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public Builder setValue(
int index, com.scalar.db.rpc.Value.Builder builderForValue) {
if (valueBuilder_ == null) {
ensureValueIsMutable();
value_.set(index, builderForValue.build());
onChanged();
} else {
valueBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public Builder addValue(com.scalar.db.rpc.Value value) {
if (valueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValueIsMutable();
value_.add(value);
onChanged();
} else {
valueBuilder_.addMessage(value);
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public Builder addValue(
int index, com.scalar.db.rpc.Value value) {
if (valueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValueIsMutable();
value_.add(index, value);
onChanged();
} else {
valueBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public Builder addValue(
com.scalar.db.rpc.Value.Builder builderForValue) {
if (valueBuilder_ == null) {
ensureValueIsMutable();
value_.add(builderForValue.build());
onChanged();
} else {
valueBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public Builder addValue(
int index, com.scalar.db.rpc.Value.Builder builderForValue) {
if (valueBuilder_ == null) {
ensureValueIsMutable();
value_.add(index, builderForValue.build());
onChanged();
} else {
valueBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public Builder addAllValue(
java.lang.Iterable extends com.scalar.db.rpc.Value> values) {
if (valueBuilder_ == null) {
ensureValueIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, value_);
onChanged();
} else {
valueBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public Builder clearValue() {
if (valueBuilder_ == null) {
value_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
valueBuilder_.clear();
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public Builder removeValue(int index) {
if (valueBuilder_ == null) {
ensureValueIsMutable();
value_.remove(index);
onChanged();
} else {
valueBuilder_.remove(index);
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public com.scalar.db.rpc.Value.Builder getValueBuilder(
int index) {
return getValueFieldBuilder().getBuilder(index);
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public com.scalar.db.rpc.ValueOrBuilder getValueOrBuilder(
int index) {
if (valueBuilder_ == null) {
return value_.get(index); } else {
return valueBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public java.util.List extends com.scalar.db.rpc.ValueOrBuilder>
getValueOrBuilderList() {
if (valueBuilder_ != null) {
return valueBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(value_);
}
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public com.scalar.db.rpc.Value.Builder addValueBuilder() {
return getValueFieldBuilder().addBuilder(
com.scalar.db.rpc.Value.getDefaultInstance());
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public com.scalar.db.rpc.Value.Builder addValueBuilder(
int index) {
return getValueFieldBuilder().addBuilder(
index, com.scalar.db.rpc.Value.getDefaultInstance());
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Value value = 8 [deprecated = true];
*/
@java.lang.Deprecated public java.util.List
getValueBuilderList() {
return getValueFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.scalar.db.rpc.Value, com.scalar.db.rpc.Value.Builder, com.scalar.db.rpc.ValueOrBuilder>
getValueFieldBuilder() {
if (valueBuilder_ == null) {
valueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.scalar.db.rpc.Value, com.scalar.db.rpc.Value.Builder, com.scalar.db.rpc.ValueOrBuilder>(
value_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
value_ = null;
}
return valueBuilder_;
}
private java.util.List column_ =
java.util.Collections.emptyList();
private void ensureColumnIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
column_ = new java.util.ArrayList(column_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.scalar.db.rpc.Column, com.scalar.db.rpc.Column.Builder, com.scalar.db.rpc.ColumnOrBuilder> columnBuilder_;
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public java.util.List getColumnList() {
if (columnBuilder_ == null) {
return java.util.Collections.unmodifiableList(column_);
} else {
return columnBuilder_.getMessageList();
}
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public int getColumnCount() {
if (columnBuilder_ == null) {
return column_.size();
} else {
return columnBuilder_.getCount();
}
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public com.scalar.db.rpc.Column getColumn(int index) {
if (columnBuilder_ == null) {
return column_.get(index);
} else {
return columnBuilder_.getMessage(index);
}
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public Builder setColumn(
int index, com.scalar.db.rpc.Column value) {
if (columnBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureColumnIsMutable();
column_.set(index, value);
onChanged();
} else {
columnBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public Builder setColumn(
int index, com.scalar.db.rpc.Column.Builder builderForValue) {
if (columnBuilder_ == null) {
ensureColumnIsMutable();
column_.set(index, builderForValue.build());
onChanged();
} else {
columnBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public Builder addColumn(com.scalar.db.rpc.Column value) {
if (columnBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureColumnIsMutable();
column_.add(value);
onChanged();
} else {
columnBuilder_.addMessage(value);
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public Builder addColumn(
int index, com.scalar.db.rpc.Column value) {
if (columnBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureColumnIsMutable();
column_.add(index, value);
onChanged();
} else {
columnBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public Builder addColumn(
com.scalar.db.rpc.Column.Builder builderForValue) {
if (columnBuilder_ == null) {
ensureColumnIsMutable();
column_.add(builderForValue.build());
onChanged();
} else {
columnBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public Builder addColumn(
int index, com.scalar.db.rpc.Column.Builder builderForValue) {
if (columnBuilder_ == null) {
ensureColumnIsMutable();
column_.add(index, builderForValue.build());
onChanged();
} else {
columnBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public Builder addAllColumn(
java.lang.Iterable extends com.scalar.db.rpc.Column> values) {
if (columnBuilder_ == null) {
ensureColumnIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, column_);
onChanged();
} else {
columnBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public Builder clearColumn() {
if (columnBuilder_ == null) {
column_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
columnBuilder_.clear();
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public Builder removeColumn(int index) {
if (columnBuilder_ == null) {
ensureColumnIsMutable();
column_.remove(index);
onChanged();
} else {
columnBuilder_.remove(index);
}
return this;
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public com.scalar.db.rpc.Column.Builder getColumnBuilder(
int index) {
return getColumnFieldBuilder().getBuilder(index);
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public com.scalar.db.rpc.ColumnOrBuilder getColumnOrBuilder(
int index) {
if (columnBuilder_ == null) {
return column_.get(index); } else {
return columnBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public java.util.List extends com.scalar.db.rpc.ColumnOrBuilder>
getColumnOrBuilderList() {
if (columnBuilder_ != null) {
return columnBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(column_);
}
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public com.scalar.db.rpc.Column.Builder addColumnBuilder() {
return getColumnFieldBuilder().addBuilder(
com.scalar.db.rpc.Column.getDefaultInstance());
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public com.scalar.db.rpc.Column.Builder addColumnBuilder(
int index) {
return getColumnFieldBuilder().addBuilder(
index, com.scalar.db.rpc.Column.getDefaultInstance());
}
/**
*
* only for Put operations
*
*
* repeated .rpc.Column column = 9;
*/
public java.util.List
getColumnBuilderList() {
return getColumnFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.scalar.db.rpc.Column, com.scalar.db.rpc.Column.Builder, com.scalar.db.rpc.ColumnOrBuilder>
getColumnFieldBuilder() {
if (columnBuilder_ == null) {
columnBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.scalar.db.rpc.Column, com.scalar.db.rpc.Column.Builder, com.scalar.db.rpc.ColumnOrBuilder>(
column_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
column_ = null;
}
return columnBuilder_;
}
@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:rpc.Mutation)
}
// @@protoc_insertion_point(class_scope:rpc.Mutation)
private static final com.scalar.db.rpc.Mutation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.scalar.db.rpc.Mutation();
}
public static com.scalar.db.rpc.Mutation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Mutation 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.scalar.db.rpc.Mutation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy