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

com.scalar.db.rpc.TableMetadata 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

package com.scalar.db.rpc;

/**
 * Protobuf type {@code rpc.TableMetadata}
 */
public final class TableMetadata extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:rpc.TableMetadata)
    TableMetadataOrBuilder {
private static final long serialVersionUID = 0L;
  // Use TableMetadata.newBuilder() to construct.
  private TableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private TableMetadata() {
    partitionKeyNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    clusteringKeyNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    secondaryIndexNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
  }

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

  @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_TableMetadata_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 1:
        return internalGetColumns();
      case 4:
        return internalGetClusteringOrders();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_TableMetadata_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.scalar.db.rpc.TableMetadata.class, com.scalar.db.rpc.TableMetadata.Builder.class);
  }

  public static final int COLUMNS_FIELD_NUMBER = 1;
  private static final class ColumnsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        java.lang.String, java.lang.Integer> defaultEntry =
            com.google.protobuf.MapEntry
            .newDefaultInstance(
                com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_TableMetadata_ColumnsEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.ENUM,
                com.scalar.db.rpc.DataType.DATA_TYPE_BOOLEAN.getNumber());
  }
  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<
      java.lang.String, java.lang.Integer> columns_;
  private com.google.protobuf.MapField
  internalGetColumns() {
    if (columns_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          ColumnsDefaultEntryHolder.defaultEntry);
    }
    return columns_;
  }
  private static final
  com.google.protobuf.Internal.MapAdapter.Converter<
      java.lang.Integer, com.scalar.db.rpc.DataType> columnsValueConverter =
          com.google.protobuf.Internal.MapAdapter.newEnumConverter(
              com.scalar.db.rpc.DataType.internalGetValueMap(),
              com.scalar.db.rpc.DataType.UNRECOGNIZED);
  private static final java.util.Map
  internalGetAdaptedColumnsMap(
      java.util.Map map) {
    return new com.google.protobuf.Internal.MapAdapter<
        java.lang.String, com.scalar.db.rpc.DataType, java.lang.Integer>(
            map, columnsValueConverter);
  }
  public int getColumnsCount() {
    return internalGetColumns().getMap().size();
  }
  /**
   * map<string, .rpc.DataType> columns = 1;
   */
  @java.lang.Override
  public boolean containsColumns(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    return internalGetColumns().getMap().containsKey(key);
  }
  /**
   * Use {@link #getColumnsMap()} instead.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map
  getColumns() {
    return getColumnsMap();
  }
  /**
   * map<string, .rpc.DataType> columns = 1;
   */
  @java.lang.Override
  public java.util.Map
  getColumnsMap() {
    return internalGetAdaptedColumnsMap(
        internalGetColumns().getMap());}
  /**
   * map<string, .rpc.DataType> columns = 1;
   */
  @java.lang.Override
  public /* nullable */
com.scalar.db.rpc.DataType getColumnsOrDefault(
      java.lang.String key,
      /* nullable */
com.scalar.db.rpc.DataType defaultValue) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetColumns().getMap();
    return map.containsKey(key)
           ? columnsValueConverter.doForward(map.get(key))
           : defaultValue;
  }
  /**
   * map<string, .rpc.DataType> columns = 1;
   */
  @java.lang.Override
  public com.scalar.db.rpc.DataType getColumnsOrThrow(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetColumns().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return columnsValueConverter.doForward(map.get(key));
  }
  /**
   * Use {@link #getColumnsValueMap()} instead.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map
  getColumnsValue() {
    return getColumnsValueMap();
  }
  /**
   * map<string, .rpc.DataType> columns = 1;
   */
  @java.lang.Override
  public java.util.Map
  getColumnsValueMap() {
    return internalGetColumns().getMap();
  }
  /**
   * map<string, .rpc.DataType> columns = 1;
   */
  @java.lang.Override
  public int getColumnsValueOrDefault(
      java.lang.String key,
      int defaultValue) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetColumns().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * map<string, .rpc.DataType> columns = 1;
   */
  @java.lang.Override
  public int getColumnsValueOrThrow(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetColumns().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int PARTITION_KEY_NAMES_FIELD_NUMBER = 2;
  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList partitionKeyNames_;
  /**
   * repeated string partition_key_names = 2;
   * @return A list containing the partitionKeyNames.
   */
  public com.google.protobuf.ProtocolStringList
      getPartitionKeyNamesList() {
    return partitionKeyNames_;
  }
  /**
   * repeated string partition_key_names = 2;
   * @return The count of partitionKeyNames.
   */
  public int getPartitionKeyNamesCount() {
    return partitionKeyNames_.size();
  }
  /**
   * repeated string partition_key_names = 2;
   * @param index The index of the element to return.
   * @return The partitionKeyNames at the given index.
   */
  public java.lang.String getPartitionKeyNames(int index) {
    return partitionKeyNames_.get(index);
  }
  /**
   * repeated string partition_key_names = 2;
   * @param index The index of the value to return.
   * @return The bytes of the partitionKeyNames at the given index.
   */
  public com.google.protobuf.ByteString
      getPartitionKeyNamesBytes(int index) {
    return partitionKeyNames_.getByteString(index);
  }

  public static final int CLUSTERING_KEY_NAMES_FIELD_NUMBER = 3;
  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList clusteringKeyNames_;
  /**
   * repeated string clustering_key_names = 3;
   * @return A list containing the clusteringKeyNames.
   */
  public com.google.protobuf.ProtocolStringList
      getClusteringKeyNamesList() {
    return clusteringKeyNames_;
  }
  /**
   * repeated string clustering_key_names = 3;
   * @return The count of clusteringKeyNames.
   */
  public int getClusteringKeyNamesCount() {
    return clusteringKeyNames_.size();
  }
  /**
   * repeated string clustering_key_names = 3;
   * @param index The index of the element to return.
   * @return The clusteringKeyNames at the given index.
   */
  public java.lang.String getClusteringKeyNames(int index) {
    return clusteringKeyNames_.get(index);
  }
  /**
   * repeated string clustering_key_names = 3;
   * @param index The index of the value to return.
   * @return The bytes of the clusteringKeyNames at the given index.
   */
  public com.google.protobuf.ByteString
      getClusteringKeyNamesBytes(int index) {
    return clusteringKeyNames_.getByteString(index);
  }

  public static final int CLUSTERING_ORDERS_FIELD_NUMBER = 4;
  private static final class ClusteringOrdersDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        java.lang.String, java.lang.Integer> defaultEntry =
            com.google.protobuf.MapEntry
            .newDefaultInstance(
                com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_TableMetadata_ClusteringOrdersEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.ENUM,
                com.scalar.db.rpc.Order.ORDER_ASC.getNumber());
  }
  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<
      java.lang.String, java.lang.Integer> clusteringOrders_;
  private com.google.protobuf.MapField
  internalGetClusteringOrders() {
    if (clusteringOrders_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          ClusteringOrdersDefaultEntryHolder.defaultEntry);
    }
    return clusteringOrders_;
  }
  private static final
  com.google.protobuf.Internal.MapAdapter.Converter<
      java.lang.Integer, com.scalar.db.rpc.Order> clusteringOrdersValueConverter =
          com.google.protobuf.Internal.MapAdapter.newEnumConverter(
              com.scalar.db.rpc.Order.internalGetValueMap(),
              com.scalar.db.rpc.Order.UNRECOGNIZED);
  private static final java.util.Map
  internalGetAdaptedClusteringOrdersMap(
      java.util.Map map) {
    return new com.google.protobuf.Internal.MapAdapter<
        java.lang.String, com.scalar.db.rpc.Order, java.lang.Integer>(
            map, clusteringOrdersValueConverter);
  }
  public int getClusteringOrdersCount() {
    return internalGetClusteringOrders().getMap().size();
  }
  /**
   * map<string, .rpc.Order> clustering_orders = 4;
   */
  @java.lang.Override
  public boolean containsClusteringOrders(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    return internalGetClusteringOrders().getMap().containsKey(key);
  }
  /**
   * Use {@link #getClusteringOrdersMap()} instead.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map
  getClusteringOrders() {
    return getClusteringOrdersMap();
  }
  /**
   * map<string, .rpc.Order> clustering_orders = 4;
   */
  @java.lang.Override
  public java.util.Map
  getClusteringOrdersMap() {
    return internalGetAdaptedClusteringOrdersMap(
        internalGetClusteringOrders().getMap());}
  /**
   * map<string, .rpc.Order> clustering_orders = 4;
   */
  @java.lang.Override
  public /* nullable */
com.scalar.db.rpc.Order getClusteringOrdersOrDefault(
      java.lang.String key,
      /* nullable */
com.scalar.db.rpc.Order defaultValue) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetClusteringOrders().getMap();
    return map.containsKey(key)
           ? clusteringOrdersValueConverter.doForward(map.get(key))
           : defaultValue;
  }
  /**
   * map<string, .rpc.Order> clustering_orders = 4;
   */
  @java.lang.Override
  public com.scalar.db.rpc.Order getClusteringOrdersOrThrow(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetClusteringOrders().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return clusteringOrdersValueConverter.doForward(map.get(key));
  }
  /**
   * Use {@link #getClusteringOrdersValueMap()} instead.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map
  getClusteringOrdersValue() {
    return getClusteringOrdersValueMap();
  }
  /**
   * map<string, .rpc.Order> clustering_orders = 4;
   */
  @java.lang.Override
  public java.util.Map
  getClusteringOrdersValueMap() {
    return internalGetClusteringOrders().getMap();
  }
  /**
   * map<string, .rpc.Order> clustering_orders = 4;
   */
  @java.lang.Override
  public int getClusteringOrdersValueOrDefault(
      java.lang.String key,
      int defaultValue) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetClusteringOrders().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * map<string, .rpc.Order> clustering_orders = 4;
   */
  @java.lang.Override
  public int getClusteringOrdersValueOrThrow(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetClusteringOrders().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int SECONDARY_INDEX_NAMES_FIELD_NUMBER = 5;
  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList secondaryIndexNames_;
  /**
   * repeated string secondary_index_names = 5;
   * @return A list containing the secondaryIndexNames.
   */
  public com.google.protobuf.ProtocolStringList
      getSecondaryIndexNamesList() {
    return secondaryIndexNames_;
  }
  /**
   * repeated string secondary_index_names = 5;
   * @return The count of secondaryIndexNames.
   */
  public int getSecondaryIndexNamesCount() {
    return secondaryIndexNames_.size();
  }
  /**
   * repeated string secondary_index_names = 5;
   * @param index The index of the element to return.
   * @return The secondaryIndexNames at the given index.
   */
  public java.lang.String getSecondaryIndexNames(int index) {
    return secondaryIndexNames_.get(index);
  }
  /**
   * repeated string secondary_index_names = 5;
   * @param index The index of the value to return.
   * @return The bytes of the secondaryIndexNames at the given index.
   */
  public com.google.protobuf.ByteString
      getSecondaryIndexNamesBytes(int index) {
    return secondaryIndexNames_.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 {
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetColumns(),
        ColumnsDefaultEntryHolder.defaultEntry,
        1);
    for (int i = 0; i < partitionKeyNames_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, partitionKeyNames_.getRaw(i));
    }
    for (int i = 0; i < clusteringKeyNames_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clusteringKeyNames_.getRaw(i));
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetClusteringOrders(),
        ClusteringOrdersDefaultEntryHolder.defaultEntry,
        4);
    for (int i = 0; i < secondaryIndexNames_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, secondaryIndexNames_.getRaw(i));
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    for (java.util.Map.Entry entry
         : internalGetColumns().getMap().entrySet()) {
      com.google.protobuf.MapEntry
      columns__ = ColumnsDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, columns__);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < partitionKeyNames_.size(); i++) {
        dataSize += computeStringSizeNoTag(partitionKeyNames_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getPartitionKeyNamesList().size();
    }
    {
      int dataSize = 0;
      for (int i = 0; i < clusteringKeyNames_.size(); i++) {
        dataSize += computeStringSizeNoTag(clusteringKeyNames_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getClusteringKeyNamesList().size();
    }
    for (java.util.Map.Entry entry
         : internalGetClusteringOrders().getMap().entrySet()) {
      com.google.protobuf.MapEntry
      clusteringOrders__ = ClusteringOrdersDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, clusteringOrders__);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < secondaryIndexNames_.size(); i++) {
        dataSize += computeStringSizeNoTag(secondaryIndexNames_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getSecondaryIndexNamesList().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.TableMetadata)) {
      return super.equals(obj);
    }
    com.scalar.db.rpc.TableMetadata other = (com.scalar.db.rpc.TableMetadata) obj;

    if (!internalGetColumns().equals(
        other.internalGetColumns())) return false;
    if (!getPartitionKeyNamesList()
        .equals(other.getPartitionKeyNamesList())) return false;
    if (!getClusteringKeyNamesList()
        .equals(other.getClusteringKeyNamesList())) return false;
    if (!internalGetClusteringOrders().equals(
        other.internalGetClusteringOrders())) return false;
    if (!getSecondaryIndexNamesList()
        .equals(other.getSecondaryIndexNamesList())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (!internalGetColumns().getMap().isEmpty()) {
      hash = (37 * hash) + COLUMNS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetColumns().hashCode();
    }
    if (getPartitionKeyNamesCount() > 0) {
      hash = (37 * hash) + PARTITION_KEY_NAMES_FIELD_NUMBER;
      hash = (53 * hash) + getPartitionKeyNamesList().hashCode();
    }
    if (getClusteringKeyNamesCount() > 0) {
      hash = (37 * hash) + CLUSTERING_KEY_NAMES_FIELD_NUMBER;
      hash = (53 * hash) + getClusteringKeyNamesList().hashCode();
    }
    if (!internalGetClusteringOrders().getMap().isEmpty()) {
      hash = (37 * hash) + CLUSTERING_ORDERS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetClusteringOrders().hashCode();
    }
    if (getSecondaryIndexNamesCount() > 0) {
      hash = (37 * hash) + SECONDARY_INDEX_NAMES_FIELD_NUMBER;
      hash = (53 * hash) + getSecondaryIndexNamesList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.scalar.db.rpc.TableMetadata parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.scalar.db.rpc.TableMetadata 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.TableMetadata parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.scalar.db.rpc.TableMetadata 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.TableMetadata parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.scalar.db.rpc.TableMetadata parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.scalar.db.rpc.TableMetadata parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.scalar.db.rpc.TableMetadata 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.TableMetadata parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.scalar.db.rpc.TableMetadata 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.TableMetadata parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.scalar.db.rpc.TableMetadata 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.TableMetadata 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.TableMetadata}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:rpc.TableMetadata)
      com.scalar.db.rpc.TableMetadataOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_TableMetadata_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 1:
          return internalGetColumns();
        case 4:
          return internalGetClusteringOrders();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(
        int number) {
      switch (number) {
        case 1:
          return internalGetMutableColumns();
        case 4:
          return internalGetMutableClusteringOrders();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.scalar.db.rpc.ScalarDbProto.internal_static_rpc_TableMetadata_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.scalar.db.rpc.TableMetadata.class, com.scalar.db.rpc.TableMetadata.Builder.class);
    }

    // Construct using com.scalar.db.rpc.TableMetadata.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      internalGetMutableColumns().clear();
      partitionKeyNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      clusteringKeyNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000004);
      internalGetMutableClusteringOrders().clear();
      secondaryIndexNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000010);
      return this;
    }

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

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

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

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

    private void buildPartialRepeatedFields(com.scalar.db.rpc.TableMetadata result) {
      if (((bitField0_ & 0x00000002) != 0)) {
        partitionKeyNames_ = partitionKeyNames_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.partitionKeyNames_ = partitionKeyNames_;
      if (((bitField0_ & 0x00000004) != 0)) {
        clusteringKeyNames_ = clusteringKeyNames_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000004);
      }
      result.clusteringKeyNames_ = clusteringKeyNames_;
      if (((bitField0_ & 0x00000010) != 0)) {
        secondaryIndexNames_ = secondaryIndexNames_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000010);
      }
      result.secondaryIndexNames_ = secondaryIndexNames_;
    }

    private void buildPartial0(com.scalar.db.rpc.TableMetadata result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.columns_ = internalGetColumns();
        result.columns_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.clusteringOrders_ = internalGetClusteringOrders();
        result.clusteringOrders_.makeImmutable();
      }
    }

    @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.TableMetadata) {
        return mergeFrom((com.scalar.db.rpc.TableMetadata)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.scalar.db.rpc.TableMetadata other) {
      if (other == com.scalar.db.rpc.TableMetadata.getDefaultInstance()) return this;
      internalGetMutableColumns().mergeFrom(
          other.internalGetColumns());
      bitField0_ |= 0x00000001;
      if (!other.partitionKeyNames_.isEmpty()) {
        if (partitionKeyNames_.isEmpty()) {
          partitionKeyNames_ = other.partitionKeyNames_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensurePartitionKeyNamesIsMutable();
          partitionKeyNames_.addAll(other.partitionKeyNames_);
        }
        onChanged();
      }
      if (!other.clusteringKeyNames_.isEmpty()) {
        if (clusteringKeyNames_.isEmpty()) {
          clusteringKeyNames_ = other.clusteringKeyNames_;
          bitField0_ = (bitField0_ & ~0x00000004);
        } else {
          ensureClusteringKeyNamesIsMutable();
          clusteringKeyNames_.addAll(other.clusteringKeyNames_);
        }
        onChanged();
      }
      internalGetMutableClusteringOrders().mergeFrom(
          other.internalGetClusteringOrders());
      bitField0_ |= 0x00000008;
      if (!other.secondaryIndexNames_.isEmpty()) {
        if (secondaryIndexNames_.isEmpty()) {
          secondaryIndexNames_ = other.secondaryIndexNames_;
          bitField0_ = (bitField0_ & ~0x00000010);
        } else {
          ensureSecondaryIndexNamesIsMutable();
          secondaryIndexNames_.addAll(other.secondaryIndexNames_);
        }
        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: {
              com.google.protobuf.MapEntry
              columns__ = input.readMessage(
                  ColumnsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              internalGetMutableColumns().getMutableMap().put(
                  columns__.getKey(), columns__.getValue());
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 18: {
              java.lang.String s = input.readStringRequireUtf8();
              ensurePartitionKeyNamesIsMutable();
              partitionKeyNames_.add(s);
              break;
            } // case 18
            case 26: {
              java.lang.String s = input.readStringRequireUtf8();
              ensureClusteringKeyNamesIsMutable();
              clusteringKeyNames_.add(s);
              break;
            } // case 26
            case 34: {
              com.google.protobuf.MapEntry
              clusteringOrders__ = input.readMessage(
                  ClusteringOrdersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              internalGetMutableClusteringOrders().getMutableMap().put(
                  clusteringOrders__.getKey(), clusteringOrders__.getValue());
              bitField0_ |= 0x00000008;
              break;
            } // case 34
            case 42: {
              java.lang.String s = input.readStringRequireUtf8();
              ensureSecondaryIndexNamesIsMutable();
              secondaryIndexNames_.add(s);
              break;
            } // case 42
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private com.google.protobuf.MapField<
        java.lang.String, java.lang.Integer> columns_;
    private com.google.protobuf.MapField
        internalGetColumns() {
      if (columns_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            ColumnsDefaultEntryHolder.defaultEntry);
      }
      return columns_;
    }
    private com.google.protobuf.MapField
        internalGetMutableColumns() {
      if (columns_ == null) {
        columns_ = com.google.protobuf.MapField.newMapField(
            ColumnsDefaultEntryHolder.defaultEntry);
      }
      if (!columns_.isMutable()) {
        columns_ = columns_.copy();
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return columns_;
    }
    public int getColumnsCount() {
      return internalGetColumns().getMap().size();
    }
    /**
     * map<string, .rpc.DataType> columns = 1;
     */
    @java.lang.Override
    public boolean containsColumns(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetColumns().getMap().containsKey(key);
    }
    /**
     * Use {@link #getColumnsMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map
    getColumns() {
      return getColumnsMap();
    }
    /**
     * map<string, .rpc.DataType> columns = 1;
     */
    @java.lang.Override
    public java.util.Map
    getColumnsMap() {
      return internalGetAdaptedColumnsMap(
          internalGetColumns().getMap());}
    /**
     * map<string, .rpc.DataType> columns = 1;
     */
    @java.lang.Override
    public /* nullable */
com.scalar.db.rpc.DataType getColumnsOrDefault(
        java.lang.String key,
        /* nullable */
com.scalar.db.rpc.DataType defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetColumns().getMap();
      return map.containsKey(key)
             ? columnsValueConverter.doForward(map.get(key))
             : defaultValue;
    }
    /**
     * map<string, .rpc.DataType> columns = 1;
     */
    @java.lang.Override
    public com.scalar.db.rpc.DataType getColumnsOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetColumns().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return columnsValueConverter.doForward(map.get(key));
    }
    /**
     * Use {@link #getColumnsValueMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map
    getColumnsValue() {
      return getColumnsValueMap();
    }
    /**
     * map<string, .rpc.DataType> columns = 1;
     */
    @java.lang.Override
    public java.util.Map
    getColumnsValueMap() {
      return internalGetColumns().getMap();
    }
    /**
     * map<string, .rpc.DataType> columns = 1;
     */
    @java.lang.Override
    public int getColumnsValueOrDefault(
        java.lang.String key,
        int defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetColumns().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * map<string, .rpc.DataType> columns = 1;
     */
    @java.lang.Override
    public int getColumnsValueOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetColumns().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }
    public Builder clearColumns() {
      bitField0_ = (bitField0_ & ~0x00000001);
      internalGetMutableColumns().getMutableMap()
          .clear();
      return this;
    }
    /**
     * map<string, .rpc.DataType> columns = 1;
     */
    public Builder removeColumns(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      internalGetMutableColumns().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map
        getMutableColumns() {
      bitField0_ |= 0x00000001;
      return internalGetAdaptedColumnsMap(
           internalGetMutableColumns().getMutableMap());
    }
    /**
     * map<string, .rpc.DataType> columns = 1;
     */
    public Builder putColumns(
        java.lang.String key,
        com.scalar.db.rpc.DataType value) {
      if (key == null) { throw new NullPointerException("map key"); }
      
      internalGetMutableColumns().getMutableMap()
          .put(key, columnsValueConverter.doBackward(value));
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * map<string, .rpc.DataType> columns = 1;
     */
    public Builder putAllColumns(
        java.util.Map values) {
      internalGetAdaptedColumnsMap(
          internalGetMutableColumns().getMutableMap())
              .putAll(values);
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map
    getMutableColumnsValue() {
      bitField0_ |= 0x00000001;
      return internalGetMutableColumns().getMutableMap();
    }
    /**
     * map<string, .rpc.DataType> columns = 1;
     */
    public Builder putColumnsValue(
        java.lang.String key,
        int value) {
      if (key == null) { throw new NullPointerException("map key"); }
      
      internalGetMutableColumns().getMutableMap()
          .put(key, value);
      bitField0_ |= 0x00000001;
      return this;
    }
    /**
     * map<string, .rpc.DataType> columns = 1;
     */
    public Builder putAllColumnsValue(
        java.util.Map values) {
      internalGetMutableColumns().getMutableMap()
          .putAll(values);
      bitField0_ |= 0x00000001;
      return this;
    }

    private com.google.protobuf.LazyStringList partitionKeyNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensurePartitionKeyNamesIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        partitionKeyNames_ = new com.google.protobuf.LazyStringArrayList(partitionKeyNames_);
        bitField0_ |= 0x00000002;
       }
    }
    /**
     * repeated string partition_key_names = 2;
     * @return A list containing the partitionKeyNames.
     */
    public com.google.protobuf.ProtocolStringList
        getPartitionKeyNamesList() {
      return partitionKeyNames_.getUnmodifiableView();
    }
    /**
     * repeated string partition_key_names = 2;
     * @return The count of partitionKeyNames.
     */
    public int getPartitionKeyNamesCount() {
      return partitionKeyNames_.size();
    }
    /**
     * repeated string partition_key_names = 2;
     * @param index The index of the element to return.
     * @return The partitionKeyNames at the given index.
     */
    public java.lang.String getPartitionKeyNames(int index) {
      return partitionKeyNames_.get(index);
    }
    /**
     * repeated string partition_key_names = 2;
     * @param index The index of the value to return.
     * @return The bytes of the partitionKeyNames at the given index.
     */
    public com.google.protobuf.ByteString
        getPartitionKeyNamesBytes(int index) {
      return partitionKeyNames_.getByteString(index);
    }
    /**
     * repeated string partition_key_names = 2;
     * @param index The index to set the value at.
     * @param value The partitionKeyNames to set.
     * @return This builder for chaining.
     */
    public Builder setPartitionKeyNames(
        int index, java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      ensurePartitionKeyNamesIsMutable();
      partitionKeyNames_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * repeated string partition_key_names = 2;
     * @param value The partitionKeyNames to add.
     * @return This builder for chaining.
     */
    public Builder addPartitionKeyNames(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      ensurePartitionKeyNamesIsMutable();
      partitionKeyNames_.add(value);
      onChanged();
      return this;
    }
    /**
     * repeated string partition_key_names = 2;
     * @param values The partitionKeyNames to add.
     * @return This builder for chaining.
     */
    public Builder addAllPartitionKeyNames(
        java.lang.Iterable values) {
      ensurePartitionKeyNamesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, partitionKeyNames_);
      onChanged();
      return this;
    }
    /**
     * repeated string partition_key_names = 2;
     * @return This builder for chaining.
     */
    public Builder clearPartitionKeyNames() {
      partitionKeyNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     * repeated string partition_key_names = 2;
     * @param value The bytes of the partitionKeyNames to add.
     * @return This builder for chaining.
     */
    public Builder addPartitionKeyNamesBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      ensurePartitionKeyNamesIsMutable();
      partitionKeyNames_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList clusteringKeyNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureClusteringKeyNamesIsMutable() {
      if (!((bitField0_ & 0x00000004) != 0)) {
        clusteringKeyNames_ = new com.google.protobuf.LazyStringArrayList(clusteringKeyNames_);
        bitField0_ |= 0x00000004;
       }
    }
    /**
     * repeated string clustering_key_names = 3;
     * @return A list containing the clusteringKeyNames.
     */
    public com.google.protobuf.ProtocolStringList
        getClusteringKeyNamesList() {
      return clusteringKeyNames_.getUnmodifiableView();
    }
    /**
     * repeated string clustering_key_names = 3;
     * @return The count of clusteringKeyNames.
     */
    public int getClusteringKeyNamesCount() {
      return clusteringKeyNames_.size();
    }
    /**
     * repeated string clustering_key_names = 3;
     * @param index The index of the element to return.
     * @return The clusteringKeyNames at the given index.
     */
    public java.lang.String getClusteringKeyNames(int index) {
      return clusteringKeyNames_.get(index);
    }
    /**
     * repeated string clustering_key_names = 3;
     * @param index The index of the value to return.
     * @return The bytes of the clusteringKeyNames at the given index.
     */
    public com.google.protobuf.ByteString
        getClusteringKeyNamesBytes(int index) {
      return clusteringKeyNames_.getByteString(index);
    }
    /**
     * repeated string clustering_key_names = 3;
     * @param index The index to set the value at.
     * @param value The clusteringKeyNames to set.
     * @return This builder for chaining.
     */
    public Builder setClusteringKeyNames(
        int index, java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      ensureClusteringKeyNamesIsMutable();
      clusteringKeyNames_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * repeated string clustering_key_names = 3;
     * @param value The clusteringKeyNames to add.
     * @return This builder for chaining.
     */
    public Builder addClusteringKeyNames(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      ensureClusteringKeyNamesIsMutable();
      clusteringKeyNames_.add(value);
      onChanged();
      return this;
    }
    /**
     * repeated string clustering_key_names = 3;
     * @param values The clusteringKeyNames to add.
     * @return This builder for chaining.
     */
    public Builder addAllClusteringKeyNames(
        java.lang.Iterable values) {
      ensureClusteringKeyNamesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, clusteringKeyNames_);
      onChanged();
      return this;
    }
    /**
     * repeated string clustering_key_names = 3;
     * @return This builder for chaining.
     */
    public Builder clearClusteringKeyNames() {
      clusteringKeyNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     * repeated string clustering_key_names = 3;
     * @param value The bytes of the clusteringKeyNames to add.
     * @return This builder for chaining.
     */
    public Builder addClusteringKeyNamesBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      ensureClusteringKeyNamesIsMutable();
      clusteringKeyNames_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<
        java.lang.String, java.lang.Integer> clusteringOrders_;
    private com.google.protobuf.MapField
        internalGetClusteringOrders() {
      if (clusteringOrders_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            ClusteringOrdersDefaultEntryHolder.defaultEntry);
      }
      return clusteringOrders_;
    }
    private com.google.protobuf.MapField
        internalGetMutableClusteringOrders() {
      if (clusteringOrders_ == null) {
        clusteringOrders_ = com.google.protobuf.MapField.newMapField(
            ClusteringOrdersDefaultEntryHolder.defaultEntry);
      }
      if (!clusteringOrders_.isMutable()) {
        clusteringOrders_ = clusteringOrders_.copy();
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return clusteringOrders_;
    }
    public int getClusteringOrdersCount() {
      return internalGetClusteringOrders().getMap().size();
    }
    /**
     * map<string, .rpc.Order> clustering_orders = 4;
     */
    @java.lang.Override
    public boolean containsClusteringOrders(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetClusteringOrders().getMap().containsKey(key);
    }
    /**
     * Use {@link #getClusteringOrdersMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map
    getClusteringOrders() {
      return getClusteringOrdersMap();
    }
    /**
     * map<string, .rpc.Order> clustering_orders = 4;
     */
    @java.lang.Override
    public java.util.Map
    getClusteringOrdersMap() {
      return internalGetAdaptedClusteringOrdersMap(
          internalGetClusteringOrders().getMap());}
    /**
     * map<string, .rpc.Order> clustering_orders = 4;
     */
    @java.lang.Override
    public /* nullable */
com.scalar.db.rpc.Order getClusteringOrdersOrDefault(
        java.lang.String key,
        /* nullable */
com.scalar.db.rpc.Order defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetClusteringOrders().getMap();
      return map.containsKey(key)
             ? clusteringOrdersValueConverter.doForward(map.get(key))
             : defaultValue;
    }
    /**
     * map<string, .rpc.Order> clustering_orders = 4;
     */
    @java.lang.Override
    public com.scalar.db.rpc.Order getClusteringOrdersOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetClusteringOrders().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return clusteringOrdersValueConverter.doForward(map.get(key));
    }
    /**
     * Use {@link #getClusteringOrdersValueMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map
    getClusteringOrdersValue() {
      return getClusteringOrdersValueMap();
    }
    /**
     * map<string, .rpc.Order> clustering_orders = 4;
     */
    @java.lang.Override
    public java.util.Map
    getClusteringOrdersValueMap() {
      return internalGetClusteringOrders().getMap();
    }
    /**
     * map<string, .rpc.Order> clustering_orders = 4;
     */
    @java.lang.Override
    public int getClusteringOrdersValueOrDefault(
        java.lang.String key,
        int defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetClusteringOrders().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * map<string, .rpc.Order> clustering_orders = 4;
     */
    @java.lang.Override
    public int getClusteringOrdersValueOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetClusteringOrders().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }
    public Builder clearClusteringOrders() {
      bitField0_ = (bitField0_ & ~0x00000008);
      internalGetMutableClusteringOrders().getMutableMap()
          .clear();
      return this;
    }
    /**
     * map<string, .rpc.Order> clustering_orders = 4;
     */
    public Builder removeClusteringOrders(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      internalGetMutableClusteringOrders().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map
        getMutableClusteringOrders() {
      bitField0_ |= 0x00000008;
      return internalGetAdaptedClusteringOrdersMap(
           internalGetMutableClusteringOrders().getMutableMap());
    }
    /**
     * map<string, .rpc.Order> clustering_orders = 4;
     */
    public Builder putClusteringOrders(
        java.lang.String key,
        com.scalar.db.rpc.Order value) {
      if (key == null) { throw new NullPointerException("map key"); }
      
      internalGetMutableClusteringOrders().getMutableMap()
          .put(key, clusteringOrdersValueConverter.doBackward(value));
      bitField0_ |= 0x00000008;
      return this;
    }
    /**
     * map<string, .rpc.Order> clustering_orders = 4;
     */
    public Builder putAllClusteringOrders(
        java.util.Map values) {
      internalGetAdaptedClusteringOrdersMap(
          internalGetMutableClusteringOrders().getMutableMap())
              .putAll(values);
      bitField0_ |= 0x00000008;
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map
    getMutableClusteringOrdersValue() {
      bitField0_ |= 0x00000008;
      return internalGetMutableClusteringOrders().getMutableMap();
    }
    /**
     * map<string, .rpc.Order> clustering_orders = 4;
     */
    public Builder putClusteringOrdersValue(
        java.lang.String key,
        int value) {
      if (key == null) { throw new NullPointerException("map key"); }
      
      internalGetMutableClusteringOrders().getMutableMap()
          .put(key, value);
      bitField0_ |= 0x00000008;
      return this;
    }
    /**
     * map<string, .rpc.Order> clustering_orders = 4;
     */
    public Builder putAllClusteringOrdersValue(
        java.util.Map values) {
      internalGetMutableClusteringOrders().getMutableMap()
          .putAll(values);
      bitField0_ |= 0x00000008;
      return this;
    }

    private com.google.protobuf.LazyStringList secondaryIndexNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureSecondaryIndexNamesIsMutable() {
      if (!((bitField0_ & 0x00000010) != 0)) {
        secondaryIndexNames_ = new com.google.protobuf.LazyStringArrayList(secondaryIndexNames_);
        bitField0_ |= 0x00000010;
       }
    }
    /**
     * repeated string secondary_index_names = 5;
     * @return A list containing the secondaryIndexNames.
     */
    public com.google.protobuf.ProtocolStringList
        getSecondaryIndexNamesList() {
      return secondaryIndexNames_.getUnmodifiableView();
    }
    /**
     * repeated string secondary_index_names = 5;
     * @return The count of secondaryIndexNames.
     */
    public int getSecondaryIndexNamesCount() {
      return secondaryIndexNames_.size();
    }
    /**
     * repeated string secondary_index_names = 5;
     * @param index The index of the element to return.
     * @return The secondaryIndexNames at the given index.
     */
    public java.lang.String getSecondaryIndexNames(int index) {
      return secondaryIndexNames_.get(index);
    }
    /**
     * repeated string secondary_index_names = 5;
     * @param index The index of the value to return.
     * @return The bytes of the secondaryIndexNames at the given index.
     */
    public com.google.protobuf.ByteString
        getSecondaryIndexNamesBytes(int index) {
      return secondaryIndexNames_.getByteString(index);
    }
    /**
     * repeated string secondary_index_names = 5;
     * @param index The index to set the value at.
     * @param value The secondaryIndexNames to set.
     * @return This builder for chaining.
     */
    public Builder setSecondaryIndexNames(
        int index, java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      ensureSecondaryIndexNamesIsMutable();
      secondaryIndexNames_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * repeated string secondary_index_names = 5;
     * @param value The secondaryIndexNames to add.
     * @return This builder for chaining.
     */
    public Builder addSecondaryIndexNames(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      ensureSecondaryIndexNamesIsMutable();
      secondaryIndexNames_.add(value);
      onChanged();
      return this;
    }
    /**
     * repeated string secondary_index_names = 5;
     * @param values The secondaryIndexNames to add.
     * @return This builder for chaining.
     */
    public Builder addAllSecondaryIndexNames(
        java.lang.Iterable values) {
      ensureSecondaryIndexNamesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, secondaryIndexNames_);
      onChanged();
      return this;
    }
    /**
     * repeated string secondary_index_names = 5;
     * @return This builder for chaining.
     */
    public Builder clearSecondaryIndexNames() {
      secondaryIndexNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     * repeated string secondary_index_names = 5;
     * @param value The bytes of the secondaryIndexNames to add.
     * @return This builder for chaining.
     */
    public Builder addSecondaryIndexNamesBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      ensureSecondaryIndexNamesIsMutable();
      secondaryIndexNames_.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.TableMetadata)
  }

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

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

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

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy