com.scalar.db.rpc.Get Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: scalardb.proto
package com.scalar.db.rpc;
/**
* Protobuf type {@code rpc.Get}
*/
public final class Get extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:rpc.Get)
GetOrBuilder {
private static final long serialVersionUID = 0L;
// Use Get.newBuilder() to construct.
private Get(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Get() {
namespace_ = "";
table_ = "";
consistency_ = 0;
projections_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Get();
}
@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_Get_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Get_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.scalar.db.rpc.Get.class, com.scalar.db.rpc.Get.Builder.class);
}
public static final int NAMESPACE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
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;
@SuppressWarnings("serial")
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 partitionKey_ == null ? com.scalar.db.rpc.Key.getDefaultInstance() : partitionKey_;
}
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 clusteringKey_ == null ? com.scalar.db.rpc.Key.getDefaultInstance() : clusteringKey_;
}
public static final int CONSISTENCY_FIELD_NUMBER = 5;
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;
* @return The consistency.
*/
@java.lang.Override public com.scalar.db.rpc.Consistency getConsistency() {
com.scalar.db.rpc.Consistency result = com.scalar.db.rpc.Consistency.forNumber(consistency_);
return result == null ? com.scalar.db.rpc.Consistency.UNRECOGNIZED : result;
}
public static final int PROJECTIONS_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringList projections_;
/**
* repeated string projections = 6;
* @return A list containing the projections.
*/
public com.google.protobuf.ProtocolStringList
getProjectionsList() {
return projections_;
}
/**
* repeated string projections = 6;
* @return The count of projections.
*/
public int getProjectionsCount() {
return projections_.size();
}
/**
* repeated string projections = 6;
* @param index The index of the element to return.
* @return The projections at the given index.
*/
public java.lang.String getProjections(int index) {
return projections_.get(index);
}
/**
* repeated string projections = 6;
* @param index The index of the value to return.
* @return The bytes of the projections at the given index.
*/
public com.google.protobuf.ByteString
getProjectionsBytes(int index) {
return projections_.getByteString(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_);
}
for (int i = 0; i < projections_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, projections_.getRaw(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_);
}
{
int dataSize = 0;
for (int i = 0; i < projections_.size(); i++) {
dataSize += computeStringSizeNoTag(projections_.getRaw(i));
}
size += dataSize;
size += 1 * getProjectionsList().size();
}
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.Get)) {
return super.equals(obj);
}
com.scalar.db.rpc.Get other = (com.scalar.db.rpc.Get) 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 (!getProjectionsList()
.equals(other.getProjectionsList())) 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 (getProjectionsCount() > 0) {
hash = (37 * hash) + PROJECTIONS_FIELD_NUMBER;
hash = (53 * hash) + getProjectionsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.scalar.db.rpc.Get parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.scalar.db.rpc.Get 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.Get parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.scalar.db.rpc.Get 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.Get parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.scalar.db.rpc.Get parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.scalar.db.rpc.Get parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.scalar.db.rpc.Get 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.Get parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.scalar.db.rpc.Get 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.Get parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.scalar.db.rpc.Get 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.Get 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.Get}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:rpc.Get)
com.scalar.db.rpc.GetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Get_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Get_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.scalar.db.rpc.Get.class, com.scalar.db.rpc.Get.Builder.class);
}
// Construct using com.scalar.db.rpc.Get.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
namespace_ = "";
table_ = "";
partitionKey_ = null;
if (partitionKeyBuilder_ != null) {
partitionKeyBuilder_.dispose();
partitionKeyBuilder_ = null;
}
clusteringKey_ = null;
if (clusteringKeyBuilder_ != null) {
clusteringKeyBuilder_.dispose();
clusteringKeyBuilder_ = null;
}
consistency_ = 0;
projections_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Get_descriptor;
}
@java.lang.Override
public com.scalar.db.rpc.Get getDefaultInstanceForType() {
return com.scalar.db.rpc.Get.getDefaultInstance();
}
@java.lang.Override
public com.scalar.db.rpc.Get build() {
com.scalar.db.rpc.Get result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.scalar.db.rpc.Get buildPartial() {
com.scalar.db.rpc.Get result = new com.scalar.db.rpc.Get(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.scalar.db.rpc.Get result) {
if (((bitField0_ & 0x00000020) != 0)) {
projections_ = projections_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000020);
}
result.projections_ = projections_;
}
private void buildPartial0(com.scalar.db.rpc.Get result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.namespace_ = namespace_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.table_ = table_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.partitionKey_ = partitionKeyBuilder_ == null
? partitionKey_
: partitionKeyBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.clusteringKey_ = clusteringKeyBuilder_ == null
? clusteringKey_
: clusteringKeyBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.consistency_ = consistency_;
}
}
@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.Get) {
return mergeFrom((com.scalar.db.rpc.Get)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.scalar.db.rpc.Get other) {
if (other == com.scalar.db.rpc.Get.getDefaultInstance()) return this;
if (!other.getNamespace().isEmpty()) {
namespace_ = other.namespace_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getTable().isEmpty()) {
table_ = other.table_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasPartitionKey()) {
mergePartitionKey(other.getPartitionKey());
}
if (other.hasClusteringKey()) {
mergeClusteringKey(other.getClusteringKey());
}
if (other.consistency_ != 0) {
setConsistencyValue(other.getConsistencyValue());
}
if (!other.projections_.isEmpty()) {
if (projections_.isEmpty()) {
projections_ = other.projections_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureProjectionsIsMutable();
projections_.addAll(other.projections_);
}
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: {
namespace_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
table_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
input.readMessage(
getPartitionKeyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
input.readMessage(
getClusteringKeyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 40: {
consistency_ = input.readEnum();
bitField0_ |= 0x00000010;
break;
} // case 40
case 50: {
java.lang.String s = input.readStringRequireUtf8();
ensureProjectionsIsMutable();
projections_.add(s);
break;
} // case 50
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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string namespace = 1;
* @return This builder for chaining.
*/
public Builder clearNamespace() {
namespace_ = getDefaultInstance().getNamespace();
bitField0_ = (bitField0_ & ~0x00000001);
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;
bitField0_ |= 0x00000001;
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;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string table = 2;
* @return This builder for chaining.
*/
public Builder clearTable() {
table_ = getDefaultInstance().getTable();
bitField0_ = (bitField0_ & ~0x00000002);
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;
bitField0_ |= 0x00000002;
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 ((bitField0_ & 0x00000004) != 0);
}
/**
* .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;
} else {
partitionKeyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* .rpc.Key partition_key = 3;
*/
public Builder setPartitionKey(
com.scalar.db.rpc.Key.Builder builderForValue) {
if (partitionKeyBuilder_ == null) {
partitionKey_ = builderForValue.build();
} else {
partitionKeyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* .rpc.Key partition_key = 3;
*/
public Builder mergePartitionKey(com.scalar.db.rpc.Key value) {
if (partitionKeyBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
partitionKey_ != null &&
partitionKey_ != com.scalar.db.rpc.Key.getDefaultInstance()) {
getPartitionKeyBuilder().mergeFrom(value);
} else {
partitionKey_ = value;
}
} else {
partitionKeyBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* .rpc.Key partition_key = 3;
*/
public Builder clearPartitionKey() {
bitField0_ = (bitField0_ & ~0x00000004);
partitionKey_ = null;
if (partitionKeyBuilder_ != null) {
partitionKeyBuilder_.dispose();
partitionKeyBuilder_ = null;
}
onChanged();
return this;
}
/**
* .rpc.Key partition_key = 3;
*/
public com.scalar.db.rpc.Key.Builder getPartitionKeyBuilder() {
bitField0_ |= 0x00000004;
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 ((bitField0_ & 0x00000008) != 0);
}
/**
* .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;
} else {
clusteringKeyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* .rpc.Key clustering_key = 4;
*/
public Builder setClusteringKey(
com.scalar.db.rpc.Key.Builder builderForValue) {
if (clusteringKeyBuilder_ == null) {
clusteringKey_ = builderForValue.build();
} else {
clusteringKeyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* .rpc.Key clustering_key = 4;
*/
public Builder mergeClusteringKey(com.scalar.db.rpc.Key value) {
if (clusteringKeyBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
clusteringKey_ != null &&
clusteringKey_ != com.scalar.db.rpc.Key.getDefaultInstance()) {
getClusteringKeyBuilder().mergeFrom(value);
} else {
clusteringKey_ = value;
}
} else {
clusteringKeyBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* .rpc.Key clustering_key = 4;
*/
public Builder clearClusteringKey() {
bitField0_ = (bitField0_ & ~0x00000008);
clusteringKey_ = null;
if (clusteringKeyBuilder_ != null) {
clusteringKeyBuilder_.dispose();
clusteringKeyBuilder_ = null;
}
onChanged();
return this;
}
/**
* .rpc.Key clustering_key = 4;
*/
public com.scalar.db.rpc.Key.Builder getClusteringKeyBuilder() {
bitField0_ |= 0x00000008;
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;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* .rpc.Consistency consistency = 5;
* @return The consistency.
*/
@java.lang.Override
public com.scalar.db.rpc.Consistency getConsistency() {
com.scalar.db.rpc.Consistency result = com.scalar.db.rpc.Consistency.forNumber(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();
}
bitField0_ |= 0x00000010;
consistency_ = value.getNumber();
onChanged();
return this;
}
/**
* .rpc.Consistency consistency = 5;
* @return This builder for chaining.
*/
public Builder clearConsistency() {
bitField0_ = (bitField0_ & ~0x00000010);
consistency_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList projections_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureProjectionsIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
projections_ = new com.google.protobuf.LazyStringArrayList(projections_);
bitField0_ |= 0x00000020;
}
}
/**
* repeated string projections = 6;
* @return A list containing the projections.
*/
public com.google.protobuf.ProtocolStringList
getProjectionsList() {
return projections_.getUnmodifiableView();
}
/**
* repeated string projections = 6;
* @return The count of projections.
*/
public int getProjectionsCount() {
return projections_.size();
}
/**
* repeated string projections = 6;
* @param index The index of the element to return.
* @return The projections at the given index.
*/
public java.lang.String getProjections(int index) {
return projections_.get(index);
}
/**
* repeated string projections = 6;
* @param index The index of the value to return.
* @return The bytes of the projections at the given index.
*/
public com.google.protobuf.ByteString
getProjectionsBytes(int index) {
return projections_.getByteString(index);
}
/**
* repeated string projections = 6;
* @param index The index to set the value at.
* @param value The projections to set.
* @return This builder for chaining.
*/
public Builder setProjections(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureProjectionsIsMutable();
projections_.set(index, value);
onChanged();
return this;
}
/**
* repeated string projections = 6;
* @param value The projections to add.
* @return This builder for chaining.
*/
public Builder addProjections(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureProjectionsIsMutable();
projections_.add(value);
onChanged();
return this;
}
/**
* repeated string projections = 6;
* @param values The projections to add.
* @return This builder for chaining.
*/
public Builder addAllProjections(
java.lang.Iterable values) {
ensureProjectionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, projections_);
onChanged();
return this;
}
/**
* repeated string projections = 6;
* @return This builder for chaining.
*/
public Builder clearProjections() {
projections_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
* repeated string projections = 6;
* @param value The bytes of the projections to add.
* @return This builder for chaining.
*/
public Builder addProjectionsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureProjectionsIsMutable();
projections_.add(value);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:rpc.Get)
}
// @@protoc_insertion_point(class_scope:rpc.Get)
private static final com.scalar.db.rpc.Get DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.scalar.db.rpc.Get();
}
public static com.scalar.db.rpc.Get getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Get 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.Get getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}