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

com.scalar.db.rpc.Scan Maven / Gradle / Ivy

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

// Protobuf Java Version: 3.25.5
package com.scalar.db.rpc;

/**
 * Protobuf type {@code rpc.Scan}
 */
public final class Scan extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:rpc.Scan)
    ScanOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Scan.newBuilder() to construct.
  private Scan(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private Scan() {
    namespace_ = "";
    table_ = "";
    consistency_ = 0;
    projections_ =
        com.google.protobuf.LazyStringArrayList.emptyList();
    orderings_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new Scan();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Scan_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Scan_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.scalar.db.rpc.Scan.class, com.scalar.db.rpc.Scan.Builder.class);
  }

  private int bitField0_;
  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 ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * .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 CONSISTENCY_FIELD_NUMBER = 4;
  private int consistency_ = 0;
  /**
   * .rpc.Consistency consistency = 4;
   * @return The enum numeric value on the wire for consistency.
   */
  @java.lang.Override public int getConsistencyValue() {
    return consistency_;
  }
  /**
   * .rpc.Consistency consistency = 4;
   * @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 = 5;
  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringArrayList projections_ =
      com.google.protobuf.LazyStringArrayList.emptyList();
  /**
   * repeated string projections = 5;
   * @return A list containing the projections.
   */
  public com.google.protobuf.ProtocolStringList
      getProjectionsList() {
    return projections_;
  }
  /**
   * repeated string projections = 5;
   * @return The count of projections.
   */
  public int getProjectionsCount() {
    return projections_.size();
  }
  /**
   * repeated string projections = 5;
   * @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 = 5;
   * @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);
  }

  public static final int START_CLUSTERING_KEY_FIELD_NUMBER = 6;
  private com.scalar.db.rpc.Key startClusteringKey_;
  /**
   * .rpc.Key start_clustering_key = 6;
   * @return Whether the startClusteringKey field is set.
   */
  @java.lang.Override
  public boolean hasStartClusteringKey() {
    return ((bitField0_ & 0x00000002) != 0);
  }
  /**
   * .rpc.Key start_clustering_key = 6;
   * @return The startClusteringKey.
   */
  @java.lang.Override
  public com.scalar.db.rpc.Key getStartClusteringKey() {
    return startClusteringKey_ == null ? com.scalar.db.rpc.Key.getDefaultInstance() : startClusteringKey_;
  }
  /**
   * .rpc.Key start_clustering_key = 6;
   */
  @java.lang.Override
  public com.scalar.db.rpc.KeyOrBuilder getStartClusteringKeyOrBuilder() {
    return startClusteringKey_ == null ? com.scalar.db.rpc.Key.getDefaultInstance() : startClusteringKey_;
  }

  public static final int START_INCLUSIVE_FIELD_NUMBER = 7;
  private boolean startInclusive_ = false;
  /**
   * bool start_inclusive = 7;
   * @return The startInclusive.
   */
  @java.lang.Override
  public boolean getStartInclusive() {
    return startInclusive_;
  }

  public static final int END_CLUSTERING_KEY_FIELD_NUMBER = 8;
  private com.scalar.db.rpc.Key endClusteringKey_;
  /**
   * .rpc.Key end_clustering_key = 8;
   * @return Whether the endClusteringKey field is set.
   */
  @java.lang.Override
  public boolean hasEndClusteringKey() {
    return ((bitField0_ & 0x00000004) != 0);
  }
  /**
   * .rpc.Key end_clustering_key = 8;
   * @return The endClusteringKey.
   */
  @java.lang.Override
  public com.scalar.db.rpc.Key getEndClusteringKey() {
    return endClusteringKey_ == null ? com.scalar.db.rpc.Key.getDefaultInstance() : endClusteringKey_;
  }
  /**
   * .rpc.Key end_clustering_key = 8;
   */
  @java.lang.Override
  public com.scalar.db.rpc.KeyOrBuilder getEndClusteringKeyOrBuilder() {
    return endClusteringKey_ == null ? com.scalar.db.rpc.Key.getDefaultInstance() : endClusteringKey_;
  }

  public static final int END_INCLUSIVE_FIELD_NUMBER = 9;
  private boolean endInclusive_ = false;
  /**
   * bool end_inclusive = 9;
   * @return The endInclusive.
   */
  @java.lang.Override
  public boolean getEndInclusive() {
    return endInclusive_;
  }

  public static final int ORDERINGS_FIELD_NUMBER = 10;
  @SuppressWarnings("serial")
  private java.util.List orderings_;
  /**
   * repeated .rpc.Ordering orderings = 10;
   */
  @java.lang.Override
  public java.util.List getOrderingsList() {
    return orderings_;
  }
  /**
   * repeated .rpc.Ordering orderings = 10;
   */
  @java.lang.Override
  public java.util.List 
      getOrderingsOrBuilderList() {
    return orderings_;
  }
  /**
   * repeated .rpc.Ordering orderings = 10;
   */
  @java.lang.Override
  public int getOrderingsCount() {
    return orderings_.size();
  }
  /**
   * repeated .rpc.Ordering orderings = 10;
   */
  @java.lang.Override
  public com.scalar.db.rpc.Ordering getOrderings(int index) {
    return orderings_.get(index);
  }
  /**
   * repeated .rpc.Ordering orderings = 10;
   */
  @java.lang.Override
  public com.scalar.db.rpc.OrderingOrBuilder getOrderingsOrBuilder(
      int index) {
    return orderings_.get(index);
  }

  public static final int LIMIT_FIELD_NUMBER = 11;
  private int limit_ = 0;
  /**
   * int32 limit = 11;
   * @return The limit.
   */
  @java.lang.Override
  public int getLimit() {
    return limit_;
  }

  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 (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(3, getPartitionKey());
    }
    if (consistency_ != com.scalar.db.rpc.Consistency.CONSISTENCY_SEQUENTIAL.getNumber()) {
      output.writeEnum(4, consistency_);
    }
    for (int i = 0; i < projections_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, projections_.getRaw(i));
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeMessage(6, getStartClusteringKey());
    }
    if (startInclusive_ != false) {
      output.writeBool(7, startInclusive_);
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      output.writeMessage(8, getEndClusteringKey());
    }
    if (endInclusive_ != false) {
      output.writeBool(9, endInclusive_);
    }
    for (int i = 0; i < orderings_.size(); i++) {
      output.writeMessage(10, orderings_.get(i));
    }
    if (limit_ != 0) {
      output.writeInt32(11, limit_);
    }
    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 (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getPartitionKey());
    }
    if (consistency_ != com.scalar.db.rpc.Consistency.CONSISTENCY_SEQUENTIAL.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(4, consistency_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < projections_.size(); i++) {
        dataSize += computeStringSizeNoTag(projections_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getProjectionsList().size();
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, getStartClusteringKey());
    }
    if (startInclusive_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(7, startInclusive_);
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, getEndClusteringKey());
    }
    if (endInclusive_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(9, endInclusive_);
    }
    for (int i = 0; i < orderings_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(10, orderings_.get(i));
    }
    if (limit_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(11, limit_);
    }
    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.Scan)) {
      return super.equals(obj);
    }
    com.scalar.db.rpc.Scan other = (com.scalar.db.rpc.Scan) 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 (consistency_ != other.consistency_) return false;
    if (!getProjectionsList()
        .equals(other.getProjectionsList())) return false;
    if (hasStartClusteringKey() != other.hasStartClusteringKey()) return false;
    if (hasStartClusteringKey()) {
      if (!getStartClusteringKey()
          .equals(other.getStartClusteringKey())) return false;
    }
    if (getStartInclusive()
        != other.getStartInclusive()) return false;
    if (hasEndClusteringKey() != other.hasEndClusteringKey()) return false;
    if (hasEndClusteringKey()) {
      if (!getEndClusteringKey()
          .equals(other.getEndClusteringKey())) return false;
    }
    if (getEndInclusive()
        != other.getEndInclusive()) return false;
    if (!getOrderingsList()
        .equals(other.getOrderingsList())) return false;
    if (getLimit()
        != other.getLimit()) 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();
    }
    hash = (37 * hash) + CONSISTENCY_FIELD_NUMBER;
    hash = (53 * hash) + consistency_;
    if (getProjectionsCount() > 0) {
      hash = (37 * hash) + PROJECTIONS_FIELD_NUMBER;
      hash = (53 * hash) + getProjectionsList().hashCode();
    }
    if (hasStartClusteringKey()) {
      hash = (37 * hash) + START_CLUSTERING_KEY_FIELD_NUMBER;
      hash = (53 * hash) + getStartClusteringKey().hashCode();
    }
    hash = (37 * hash) + START_INCLUSIVE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getStartInclusive());
    if (hasEndClusteringKey()) {
      hash = (37 * hash) + END_CLUSTERING_KEY_FIELD_NUMBER;
      hash = (53 * hash) + getEndClusteringKey().hashCode();
    }
    hash = (37 * hash) + END_INCLUSIVE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getEndInclusive());
    if (getOrderingsCount() > 0) {
      hash = (37 * hash) + ORDERINGS_FIELD_NUMBER;
      hash = (53 * hash) + getOrderingsList().hashCode();
    }
    hash = (37 * hash) + LIMIT_FIELD_NUMBER;
    hash = (53 * hash) + getLimit();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.scalar.db.rpc.Scan parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.scalar.db.rpc.Scan 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.Scan parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.scalar.db.rpc.Scan 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.Scan parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.scalar.db.rpc.Scan parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.scalar.db.rpc.Scan parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.scalar.db.rpc.Scan 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.Scan parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static com.scalar.db.rpc.Scan 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.Scan parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.scalar.db.rpc.Scan 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.Scan 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.Scan}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:rpc.Scan)
      com.scalar.db.rpc.ScanOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Scan_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Scan_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.scalar.db.rpc.Scan.class, com.scalar.db.rpc.Scan.Builder.class);
    }

    // Construct using com.scalar.db.rpc.Scan.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getPartitionKeyFieldBuilder();
        getStartClusteringKeyFieldBuilder();
        getEndClusteringKeyFieldBuilder();
        getOrderingsFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      namespace_ = "";
      table_ = "";
      partitionKey_ = null;
      if (partitionKeyBuilder_ != null) {
        partitionKeyBuilder_.dispose();
        partitionKeyBuilder_ = null;
      }
      consistency_ = 0;
      projections_ =
          com.google.protobuf.LazyStringArrayList.emptyList();
      startClusteringKey_ = null;
      if (startClusteringKeyBuilder_ != null) {
        startClusteringKeyBuilder_.dispose();
        startClusteringKeyBuilder_ = null;
      }
      startInclusive_ = false;
      endClusteringKey_ = null;
      if (endClusteringKeyBuilder_ != null) {
        endClusteringKeyBuilder_.dispose();
        endClusteringKeyBuilder_ = null;
      }
      endInclusive_ = false;
      if (orderingsBuilder_ == null) {
        orderings_ = java.util.Collections.emptyList();
      } else {
        orderings_ = null;
        orderingsBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000200);
      limit_ = 0;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_Scan_descriptor;
    }

    @java.lang.Override
    public com.scalar.db.rpc.Scan getDefaultInstanceForType() {
      return com.scalar.db.rpc.Scan.getDefaultInstance();
    }

    @java.lang.Override
    public com.scalar.db.rpc.Scan build() {
      com.scalar.db.rpc.Scan result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.scalar.db.rpc.Scan buildPartial() {
      com.scalar.db.rpc.Scan result = new com.scalar.db.rpc.Scan(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(com.scalar.db.rpc.Scan result) {
      if (orderingsBuilder_ == null) {
        if (((bitField0_ & 0x00000200) != 0)) {
          orderings_ = java.util.Collections.unmodifiableList(orderings_);
          bitField0_ = (bitField0_ & ~0x00000200);
        }
        result.orderings_ = orderings_;
      } else {
        result.orderings_ = orderingsBuilder_.build();
      }
    }

    private void buildPartial0(com.scalar.db.rpc.Scan result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.namespace_ = namespace_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.table_ = table_;
      }
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.partitionKey_ = partitionKeyBuilder_ == null
            ? partitionKey_
            : partitionKeyBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.consistency_ = consistency_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        projections_.makeImmutable();
        result.projections_ = projections_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.startClusteringKey_ = startClusteringKeyBuilder_ == null
            ? startClusteringKey_
            : startClusteringKeyBuilder_.build();
        to_bitField0_ |= 0x00000002;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.startInclusive_ = startInclusive_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.endClusteringKey_ = endClusteringKeyBuilder_ == null
            ? endClusteringKey_
            : endClusteringKeyBuilder_.build();
        to_bitField0_ |= 0x00000004;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.endInclusive_ = endInclusive_;
      }
      if (((from_bitField0_ & 0x00000400) != 0)) {
        result.limit_ = limit_;
      }
      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.scalar.db.rpc.Scan) {
        return mergeFrom((com.scalar.db.rpc.Scan)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.scalar.db.rpc.Scan other) {
      if (other == com.scalar.db.rpc.Scan.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.consistency_ != 0) {
        setConsistencyValue(other.getConsistencyValue());
      }
      if (!other.projections_.isEmpty()) {
        if (projections_.isEmpty()) {
          projections_ = other.projections_;
          bitField0_ |= 0x00000010;
        } else {
          ensureProjectionsIsMutable();
          projections_.addAll(other.projections_);
        }
        onChanged();
      }
      if (other.hasStartClusteringKey()) {
        mergeStartClusteringKey(other.getStartClusteringKey());
      }
      if (other.getStartInclusive() != false) {
        setStartInclusive(other.getStartInclusive());
      }
      if (other.hasEndClusteringKey()) {
        mergeEndClusteringKey(other.getEndClusteringKey());
      }
      if (other.getEndInclusive() != false) {
        setEndInclusive(other.getEndInclusive());
      }
      if (orderingsBuilder_ == null) {
        if (!other.orderings_.isEmpty()) {
          if (orderings_.isEmpty()) {
            orderings_ = other.orderings_;
            bitField0_ = (bitField0_ & ~0x00000200);
          } else {
            ensureOrderingsIsMutable();
            orderings_.addAll(other.orderings_);
          }
          onChanged();
        }
      } else {
        if (!other.orderings_.isEmpty()) {
          if (orderingsBuilder_.isEmpty()) {
            orderingsBuilder_.dispose();
            orderingsBuilder_ = null;
            orderings_ = other.orderings_;
            bitField0_ = (bitField0_ & ~0x00000200);
            orderingsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getOrderingsFieldBuilder() : null;
          } else {
            orderingsBuilder_.addAllMessages(other.orderings_);
          }
        }
      }
      if (other.getLimit() != 0) {
        setLimit(other.getLimit());
      }
      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 32: {
              consistency_ = input.readEnum();
              bitField0_ |= 0x00000008;
              break;
            } // case 32
            case 42: {
              java.lang.String s = input.readStringRequireUtf8();
              ensureProjectionsIsMutable();
              projections_.add(s);
              break;
            } // case 42
            case 50: {
              input.readMessage(
                  getStartClusteringKeyFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000020;
              break;
            } // case 50
            case 56: {
              startInclusive_ = input.readBool();
              bitField0_ |= 0x00000040;
              break;
            } // case 56
            case 66: {
              input.readMessage(
                  getEndClusteringKeyFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000080;
              break;
            } // case 66
            case 72: {
              endInclusive_ = input.readBool();
              bitField0_ |= 0x00000100;
              break;
            } // case 72
            case 82: {
              com.scalar.db.rpc.Ordering m =
                  input.readMessage(
                      com.scalar.db.rpc.Ordering.parser(),
                      extensionRegistry);
              if (orderingsBuilder_ == null) {
                ensureOrderingsIsMutable();
                orderings_.add(m);
              } else {
                orderingsBuilder_.addMessage(m);
              }
              break;
            } // case 82
            case 88: {
              limit_ = input.readInt32();
              bitField0_ |= 0x00000400;
              break;
            } // case 88
            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);
      }
      if (partitionKey_ != null) {
        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 int consistency_ = 0;
    /**
     * .rpc.Consistency consistency = 4;
     * @return The enum numeric value on the wire for consistency.
     */
    @java.lang.Override public int getConsistencyValue() {
      return consistency_;
    }
    /**
     * .rpc.Consistency consistency = 4;
     * @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_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * .rpc.Consistency consistency = 4;
     * @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 = 4;
     * @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_ |= 0x00000008;
      consistency_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * .rpc.Consistency consistency = 4;
     * @return This builder for chaining.
     */
    public Builder clearConsistency() {
      bitField0_ = (bitField0_ & ~0x00000008);
      consistency_ = 0;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringArrayList projections_ =
        com.google.protobuf.LazyStringArrayList.emptyList();
    private void ensureProjectionsIsMutable() {
      if (!projections_.isModifiable()) {
        projections_ = new com.google.protobuf.LazyStringArrayList(projections_);
      }
      bitField0_ |= 0x00000010;
    }
    /**
     * repeated string projections = 5;
     * @return A list containing the projections.
     */
    public com.google.protobuf.ProtocolStringList
        getProjectionsList() {
      projections_.makeImmutable();
      return projections_;
    }
    /**
     * repeated string projections = 5;
     * @return The count of projections.
     */
    public int getProjectionsCount() {
      return projections_.size();
    }
    /**
     * repeated string projections = 5;
     * @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 = 5;
     * @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 = 5;
     * @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);
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * repeated string projections = 5;
     * @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);
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * repeated string projections = 5;
     * @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_);
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * repeated string projections = 5;
     * @return This builder for chaining.
     */
    public Builder clearProjections() {
      projections_ =
        com.google.protobuf.LazyStringArrayList.emptyList();
      bitField0_ = (bitField0_ & ~0x00000010);;
      onChanged();
      return this;
    }
    /**
     * repeated string projections = 5;
     * @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);
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }

    private com.scalar.db.rpc.Key startClusteringKey_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.scalar.db.rpc.Key, com.scalar.db.rpc.Key.Builder, com.scalar.db.rpc.KeyOrBuilder> startClusteringKeyBuilder_;
    /**
     * .rpc.Key start_clustering_key = 6;
     * @return Whether the startClusteringKey field is set.
     */
    public boolean hasStartClusteringKey() {
      return ((bitField0_ & 0x00000020) != 0);
    }
    /**
     * .rpc.Key start_clustering_key = 6;
     * @return The startClusteringKey.
     */
    public com.scalar.db.rpc.Key getStartClusteringKey() {
      if (startClusteringKeyBuilder_ == null) {
        return startClusteringKey_ == null ? com.scalar.db.rpc.Key.getDefaultInstance() : startClusteringKey_;
      } else {
        return startClusteringKeyBuilder_.getMessage();
      }
    }
    /**
     * .rpc.Key start_clustering_key = 6;
     */
    public Builder setStartClusteringKey(com.scalar.db.rpc.Key value) {
      if (startClusteringKeyBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        startClusteringKey_ = value;
      } else {
        startClusteringKeyBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * .rpc.Key start_clustering_key = 6;
     */
    public Builder setStartClusteringKey(
        com.scalar.db.rpc.Key.Builder builderForValue) {
      if (startClusteringKeyBuilder_ == null) {
        startClusteringKey_ = builderForValue.build();
      } else {
        startClusteringKeyBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * .rpc.Key start_clustering_key = 6;
     */
    public Builder mergeStartClusteringKey(com.scalar.db.rpc.Key value) {
      if (startClusteringKeyBuilder_ == null) {
        if (((bitField0_ & 0x00000020) != 0) &&
          startClusteringKey_ != null &&
          startClusteringKey_ != com.scalar.db.rpc.Key.getDefaultInstance()) {
          getStartClusteringKeyBuilder().mergeFrom(value);
        } else {
          startClusteringKey_ = value;
        }
      } else {
        startClusteringKeyBuilder_.mergeFrom(value);
      }
      if (startClusteringKey_ != null) {
        bitField0_ |= 0x00000020;
        onChanged();
      }
      return this;
    }
    /**
     * .rpc.Key start_clustering_key = 6;
     */
    public Builder clearStartClusteringKey() {
      bitField0_ = (bitField0_ & ~0x00000020);
      startClusteringKey_ = null;
      if (startClusteringKeyBuilder_ != null) {
        startClusteringKeyBuilder_.dispose();
        startClusteringKeyBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * .rpc.Key start_clustering_key = 6;
     */
    public com.scalar.db.rpc.Key.Builder getStartClusteringKeyBuilder() {
      bitField0_ |= 0x00000020;
      onChanged();
      return getStartClusteringKeyFieldBuilder().getBuilder();
    }
    /**
     * .rpc.Key start_clustering_key = 6;
     */
    public com.scalar.db.rpc.KeyOrBuilder getStartClusteringKeyOrBuilder() {
      if (startClusteringKeyBuilder_ != null) {
        return startClusteringKeyBuilder_.getMessageOrBuilder();
      } else {
        return startClusteringKey_ == null ?
            com.scalar.db.rpc.Key.getDefaultInstance() : startClusteringKey_;
      }
    }
    /**
     * .rpc.Key start_clustering_key = 6;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.scalar.db.rpc.Key, com.scalar.db.rpc.Key.Builder, com.scalar.db.rpc.KeyOrBuilder> 
        getStartClusteringKeyFieldBuilder() {
      if (startClusteringKeyBuilder_ == null) {
        startClusteringKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.scalar.db.rpc.Key, com.scalar.db.rpc.Key.Builder, com.scalar.db.rpc.KeyOrBuilder>(
                getStartClusteringKey(),
                getParentForChildren(),
                isClean());
        startClusteringKey_ = null;
      }
      return startClusteringKeyBuilder_;
    }

    private boolean startInclusive_ ;
    /**
     * bool start_inclusive = 7;
     * @return The startInclusive.
     */
    @java.lang.Override
    public boolean getStartInclusive() {
      return startInclusive_;
    }
    /**
     * bool start_inclusive = 7;
     * @param value The startInclusive to set.
     * @return This builder for chaining.
     */
    public Builder setStartInclusive(boolean value) {

      startInclusive_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     * bool start_inclusive = 7;
     * @return This builder for chaining.
     */
    public Builder clearStartInclusive() {
      bitField0_ = (bitField0_ & ~0x00000040);
      startInclusive_ = false;
      onChanged();
      return this;
    }

    private com.scalar.db.rpc.Key endClusteringKey_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.scalar.db.rpc.Key, com.scalar.db.rpc.Key.Builder, com.scalar.db.rpc.KeyOrBuilder> endClusteringKeyBuilder_;
    /**
     * .rpc.Key end_clustering_key = 8;
     * @return Whether the endClusteringKey field is set.
     */
    public boolean hasEndClusteringKey() {
      return ((bitField0_ & 0x00000080) != 0);
    }
    /**
     * .rpc.Key end_clustering_key = 8;
     * @return The endClusteringKey.
     */
    public com.scalar.db.rpc.Key getEndClusteringKey() {
      if (endClusteringKeyBuilder_ == null) {
        return endClusteringKey_ == null ? com.scalar.db.rpc.Key.getDefaultInstance() : endClusteringKey_;
      } else {
        return endClusteringKeyBuilder_.getMessage();
      }
    }
    /**
     * .rpc.Key end_clustering_key = 8;
     */
    public Builder setEndClusteringKey(com.scalar.db.rpc.Key value) {
      if (endClusteringKeyBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        endClusteringKey_ = value;
      } else {
        endClusteringKeyBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     * .rpc.Key end_clustering_key = 8;
     */
    public Builder setEndClusteringKey(
        com.scalar.db.rpc.Key.Builder builderForValue) {
      if (endClusteringKeyBuilder_ == null) {
        endClusteringKey_ = builderForValue.build();
      } else {
        endClusteringKeyBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     * .rpc.Key end_clustering_key = 8;
     */
    public Builder mergeEndClusteringKey(com.scalar.db.rpc.Key value) {
      if (endClusteringKeyBuilder_ == null) {
        if (((bitField0_ & 0x00000080) != 0) &&
          endClusteringKey_ != null &&
          endClusteringKey_ != com.scalar.db.rpc.Key.getDefaultInstance()) {
          getEndClusteringKeyBuilder().mergeFrom(value);
        } else {
          endClusteringKey_ = value;
        }
      } else {
        endClusteringKeyBuilder_.mergeFrom(value);
      }
      if (endClusteringKey_ != null) {
        bitField0_ |= 0x00000080;
        onChanged();
      }
      return this;
    }
    /**
     * .rpc.Key end_clustering_key = 8;
     */
    public Builder clearEndClusteringKey() {
      bitField0_ = (bitField0_ & ~0x00000080);
      endClusteringKey_ = null;
      if (endClusteringKeyBuilder_ != null) {
        endClusteringKeyBuilder_.dispose();
        endClusteringKeyBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * .rpc.Key end_clustering_key = 8;
     */
    public com.scalar.db.rpc.Key.Builder getEndClusteringKeyBuilder() {
      bitField0_ |= 0x00000080;
      onChanged();
      return getEndClusteringKeyFieldBuilder().getBuilder();
    }
    /**
     * .rpc.Key end_clustering_key = 8;
     */
    public com.scalar.db.rpc.KeyOrBuilder getEndClusteringKeyOrBuilder() {
      if (endClusteringKeyBuilder_ != null) {
        return endClusteringKeyBuilder_.getMessageOrBuilder();
      } else {
        return endClusteringKey_ == null ?
            com.scalar.db.rpc.Key.getDefaultInstance() : endClusteringKey_;
      }
    }
    /**
     * .rpc.Key end_clustering_key = 8;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.scalar.db.rpc.Key, com.scalar.db.rpc.Key.Builder, com.scalar.db.rpc.KeyOrBuilder> 
        getEndClusteringKeyFieldBuilder() {
      if (endClusteringKeyBuilder_ == null) {
        endClusteringKeyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.scalar.db.rpc.Key, com.scalar.db.rpc.Key.Builder, com.scalar.db.rpc.KeyOrBuilder>(
                getEndClusteringKey(),
                getParentForChildren(),
                isClean());
        endClusteringKey_ = null;
      }
      return endClusteringKeyBuilder_;
    }

    private boolean endInclusive_ ;
    /**
     * bool end_inclusive = 9;
     * @return The endInclusive.
     */
    @java.lang.Override
    public boolean getEndInclusive() {
      return endInclusive_;
    }
    /**
     * bool end_inclusive = 9;
     * @param value The endInclusive to set.
     * @return This builder for chaining.
     */
    public Builder setEndInclusive(boolean value) {

      endInclusive_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     * bool end_inclusive = 9;
     * @return This builder for chaining.
     */
    public Builder clearEndInclusive() {
      bitField0_ = (bitField0_ & ~0x00000100);
      endInclusive_ = false;
      onChanged();
      return this;
    }

    private java.util.List orderings_ =
      java.util.Collections.emptyList();
    private void ensureOrderingsIsMutable() {
      if (!((bitField0_ & 0x00000200) != 0)) {
        orderings_ = new java.util.ArrayList(orderings_);
        bitField0_ |= 0x00000200;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.scalar.db.rpc.Ordering, com.scalar.db.rpc.Ordering.Builder, com.scalar.db.rpc.OrderingOrBuilder> orderingsBuilder_;

    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public java.util.List getOrderingsList() {
      if (orderingsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(orderings_);
      } else {
        return orderingsBuilder_.getMessageList();
      }
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public int getOrderingsCount() {
      if (orderingsBuilder_ == null) {
        return orderings_.size();
      } else {
        return orderingsBuilder_.getCount();
      }
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public com.scalar.db.rpc.Ordering getOrderings(int index) {
      if (orderingsBuilder_ == null) {
        return orderings_.get(index);
      } else {
        return orderingsBuilder_.getMessage(index);
      }
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public Builder setOrderings(
        int index, com.scalar.db.rpc.Ordering value) {
      if (orderingsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureOrderingsIsMutable();
        orderings_.set(index, value);
        onChanged();
      } else {
        orderingsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public Builder setOrderings(
        int index, com.scalar.db.rpc.Ordering.Builder builderForValue) {
      if (orderingsBuilder_ == null) {
        ensureOrderingsIsMutable();
        orderings_.set(index, builderForValue.build());
        onChanged();
      } else {
        orderingsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public Builder addOrderings(com.scalar.db.rpc.Ordering value) {
      if (orderingsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureOrderingsIsMutable();
        orderings_.add(value);
        onChanged();
      } else {
        orderingsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public Builder addOrderings(
        int index, com.scalar.db.rpc.Ordering value) {
      if (orderingsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureOrderingsIsMutable();
        orderings_.add(index, value);
        onChanged();
      } else {
        orderingsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public Builder addOrderings(
        com.scalar.db.rpc.Ordering.Builder builderForValue) {
      if (orderingsBuilder_ == null) {
        ensureOrderingsIsMutable();
        orderings_.add(builderForValue.build());
        onChanged();
      } else {
        orderingsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public Builder addOrderings(
        int index, com.scalar.db.rpc.Ordering.Builder builderForValue) {
      if (orderingsBuilder_ == null) {
        ensureOrderingsIsMutable();
        orderings_.add(index, builderForValue.build());
        onChanged();
      } else {
        orderingsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public Builder addAllOrderings(
        java.lang.Iterable values) {
      if (orderingsBuilder_ == null) {
        ensureOrderingsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, orderings_);
        onChanged();
      } else {
        orderingsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public Builder clearOrderings() {
      if (orderingsBuilder_ == null) {
        orderings_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000200);
        onChanged();
      } else {
        orderingsBuilder_.clear();
      }
      return this;
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public Builder removeOrderings(int index) {
      if (orderingsBuilder_ == null) {
        ensureOrderingsIsMutable();
        orderings_.remove(index);
        onChanged();
      } else {
        orderingsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public com.scalar.db.rpc.Ordering.Builder getOrderingsBuilder(
        int index) {
      return getOrderingsFieldBuilder().getBuilder(index);
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public com.scalar.db.rpc.OrderingOrBuilder getOrderingsOrBuilder(
        int index) {
      if (orderingsBuilder_ == null) {
        return orderings_.get(index);  } else {
        return orderingsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public java.util.List 
         getOrderingsOrBuilderList() {
      if (orderingsBuilder_ != null) {
        return orderingsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(orderings_);
      }
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public com.scalar.db.rpc.Ordering.Builder addOrderingsBuilder() {
      return getOrderingsFieldBuilder().addBuilder(
          com.scalar.db.rpc.Ordering.getDefaultInstance());
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public com.scalar.db.rpc.Ordering.Builder addOrderingsBuilder(
        int index) {
      return getOrderingsFieldBuilder().addBuilder(
          index, com.scalar.db.rpc.Ordering.getDefaultInstance());
    }
    /**
     * repeated .rpc.Ordering orderings = 10;
     */
    public java.util.List 
         getOrderingsBuilderList() {
      return getOrderingsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.scalar.db.rpc.Ordering, com.scalar.db.rpc.Ordering.Builder, com.scalar.db.rpc.OrderingOrBuilder> 
        getOrderingsFieldBuilder() {
      if (orderingsBuilder_ == null) {
        orderingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.scalar.db.rpc.Ordering, com.scalar.db.rpc.Ordering.Builder, com.scalar.db.rpc.OrderingOrBuilder>(
                orderings_,
                ((bitField0_ & 0x00000200) != 0),
                getParentForChildren(),
                isClean());
        orderings_ = null;
      }
      return orderingsBuilder_;
    }

    private int limit_ ;
    /**
     * int32 limit = 11;
     * @return The limit.
     */
    @java.lang.Override
    public int getLimit() {
      return limit_;
    }
    /**
     * int32 limit = 11;
     * @param value The limit to set.
     * @return This builder for chaining.
     */
    public Builder setLimit(int value) {

      limit_ = value;
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }
    /**
     * int32 limit = 11;
     * @return This builder for chaining.
     */
    public Builder clearLimit() {
      bitField0_ = (bitField0_ & ~0x00000400);
      limit_ = 0;
      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.Scan)
  }

  // @@protoc_insertion_point(class_scope:rpc.Scan)
  private static final com.scalar.db.rpc.Scan DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.scalar.db.rpc.Scan();
  }

  public static com.scalar.db.rpc.Scan getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public Scan 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.Scan getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy