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

com.pingcap.tidb.tipb.IndexInfo Maven / Gradle / Ivy

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

package com.pingcap.tidb.tipb;

/**
 * Protobuf type {@code tipb.IndexInfo}
 */
public  final class IndexInfo extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tipb.IndexInfo)
    IndexInfoOrBuilder {
private static final long serialVersionUID = 0L;
  // Use IndexInfo.newBuilder() to construct.
  private IndexInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private IndexInfo() {
    tableId_ = 0L;
    indexId_ = 0L;
    columns_ = java.util.Collections.emptyList();
    unique_ = false;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private IndexInfo(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 8: {
            bitField0_ |= 0x00000001;
            tableId_ = input.readInt64();
            break;
          }
          case 16: {
            bitField0_ |= 0x00000002;
            indexId_ = input.readInt64();
            break;
          }
          case 26: {
            if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
              columns_ = new java.util.ArrayList();
              mutable_bitField0_ |= 0x00000004;
            }
            columns_.add(
                input.readMessage(com.pingcap.tidb.tipb.ColumnInfo.PARSER, extensionRegistry));
            break;
          }
          case 32: {
            bitField0_ |= 0x00000004;
            unique_ = input.readBool();
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
        columns_ = java.util.Collections.unmodifiableList(columns_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.pingcap.tidb.tipb.Schema.internal_static_tipb_IndexInfo_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.pingcap.tidb.tipb.Schema.internal_static_tipb_IndexInfo_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.pingcap.tidb.tipb.IndexInfo.class, com.pingcap.tidb.tipb.IndexInfo.Builder.class);
  }

  private int bitField0_;
  public static final int TABLE_ID_FIELD_NUMBER = 1;
  private long tableId_;
  /**
   * optional int64 table_id = 1 [(.gogoproto.nullable) = false];
   */
  public boolean hasTableId() {
    return ((bitField0_ & 0x00000001) == 0x00000001);
  }
  /**
   * optional int64 table_id = 1 [(.gogoproto.nullable) = false];
   */
  public long getTableId() {
    return tableId_;
  }

  public static final int INDEX_ID_FIELD_NUMBER = 2;
  private long indexId_;
  /**
   * optional int64 index_id = 2 [(.gogoproto.nullable) = false];
   */
  public boolean hasIndexId() {
    return ((bitField0_ & 0x00000002) == 0x00000002);
  }
  /**
   * optional int64 index_id = 2 [(.gogoproto.nullable) = false];
   */
  public long getIndexId() {
    return indexId_;
  }

  public static final int COLUMNS_FIELD_NUMBER = 3;
  private java.util.List columns_;
  /**
   * repeated .tipb.ColumnInfo columns = 3;
   */
  public java.util.List getColumnsList() {
    return columns_;
  }
  /**
   * repeated .tipb.ColumnInfo columns = 3;
   */
  public java.util.List 
      getColumnsOrBuilderList() {
    return columns_;
  }
  /**
   * repeated .tipb.ColumnInfo columns = 3;
   */
  public int getColumnsCount() {
    return columns_.size();
  }
  /**
   * repeated .tipb.ColumnInfo columns = 3;
   */
  public com.pingcap.tidb.tipb.ColumnInfo getColumns(int index) {
    return columns_.get(index);
  }
  /**
   * repeated .tipb.ColumnInfo columns = 3;
   */
  public com.pingcap.tidb.tipb.ColumnInfoOrBuilder getColumnsOrBuilder(
      int index) {
    return columns_.get(index);
  }

  public static final int UNIQUE_FIELD_NUMBER = 4;
  private boolean unique_;
  /**
   * optional bool unique = 4 [(.gogoproto.nullable) = false];
   */
  public boolean hasUnique() {
    return ((bitField0_ & 0x00000004) == 0x00000004);
  }
  /**
   * optional bool unique = 4 [(.gogoproto.nullable) = false];
   */
  public boolean getUnique() {
    return unique_;
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (((bitField0_ & 0x00000001) == 0x00000001)) {
      output.writeInt64(1, tableId_);
    }
    if (((bitField0_ & 0x00000002) == 0x00000002)) {
      output.writeInt64(2, indexId_);
    }
    for (int i = 0; i < columns_.size(); i++) {
      output.writeMessage(3, columns_.get(i));
    }
    if (((bitField0_ & 0x00000004) == 0x00000004)) {
      output.writeBool(4, unique_);
    }
    unknownFields.writeTo(output);
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (((bitField0_ & 0x00000001) == 0x00000001)) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(1, tableId_);
    }
    if (((bitField0_ & 0x00000002) == 0x00000002)) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(2, indexId_);
    }
    for (int i = 0; i < columns_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, columns_.get(i));
    }
    if (((bitField0_ & 0x00000004) == 0x00000004)) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(4, unique_);
    }
    size += unknownFields.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.pingcap.tidb.tipb.IndexInfo)) {
      return super.equals(obj);
    }
    com.pingcap.tidb.tipb.IndexInfo other = (com.pingcap.tidb.tipb.IndexInfo) obj;

    boolean result = true;
    result = result && (hasTableId() == other.hasTableId());
    if (hasTableId()) {
      result = result && (getTableId()
          == other.getTableId());
    }
    result = result && (hasIndexId() == other.hasIndexId());
    if (hasIndexId()) {
      result = result && (getIndexId()
          == other.getIndexId());
    }
    result = result && getColumnsList()
        .equals(other.getColumnsList());
    result = result && (hasUnique() == other.hasUnique());
    if (hasUnique()) {
      result = result && (getUnique()
          == other.getUnique());
    }
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasTableId()) {
      hash = (37 * hash) + TABLE_ID_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getTableId());
    }
    if (hasIndexId()) {
      hash = (37 * hash) + INDEX_ID_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getIndexId());
    }
    if (getColumnsCount() > 0) {
      hash = (37 * hash) + COLUMNS_FIELD_NUMBER;
      hash = (53 * hash) + getColumnsList().hashCode();
    }
    if (hasUnique()) {
      hash = (37 * hash) + UNIQUE_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getUnique());
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.pingcap.tidb.tipb.IndexInfo prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  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 tipb.IndexInfo}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:tipb.IndexInfo)
      com.pingcap.tidb.tipb.IndexInfoOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.pingcap.tidb.tipb.Schema.internal_static_tipb_IndexInfo_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.pingcap.tidb.tipb.Schema.internal_static_tipb_IndexInfo_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.pingcap.tidb.tipb.IndexInfo.class, com.pingcap.tidb.tipb.IndexInfo.Builder.class);
    }

    // Construct using com.pingcap.tidb.tipb.IndexInfo.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getColumnsFieldBuilder();
      }
    }
    public Builder clear() {
      super.clear();
      tableId_ = 0L;
      bitField0_ = (bitField0_ & ~0x00000001);
      indexId_ = 0L;
      bitField0_ = (bitField0_ & ~0x00000002);
      if (columnsBuilder_ == null) {
        columns_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
      } else {
        columnsBuilder_.clear();
      }
      unique_ = false;
      bitField0_ = (bitField0_ & ~0x00000008);
      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.pingcap.tidb.tipb.Schema.internal_static_tipb_IndexInfo_descriptor;
    }

    public com.pingcap.tidb.tipb.IndexInfo getDefaultInstanceForType() {
      return com.pingcap.tidb.tipb.IndexInfo.getDefaultInstance();
    }

    public com.pingcap.tidb.tipb.IndexInfo build() {
      com.pingcap.tidb.tipb.IndexInfo result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.pingcap.tidb.tipb.IndexInfo buildPartial() {
      com.pingcap.tidb.tipb.IndexInfo result = new com.pingcap.tidb.tipb.IndexInfo(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
        to_bitField0_ |= 0x00000001;
      }
      result.tableId_ = tableId_;
      if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
        to_bitField0_ |= 0x00000002;
      }
      result.indexId_ = indexId_;
      if (columnsBuilder_ == null) {
        if (((bitField0_ & 0x00000004) == 0x00000004)) {
          columns_ = java.util.Collections.unmodifiableList(columns_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.columns_ = columns_;
      } else {
        result.columns_ = columnsBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
        to_bitField0_ |= 0x00000004;
      }
      result.unique_ = unique_;
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.pingcap.tidb.tipb.IndexInfo) {
        return mergeFrom((com.pingcap.tidb.tipb.IndexInfo)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.pingcap.tidb.tipb.IndexInfo other) {
      if (other == com.pingcap.tidb.tipb.IndexInfo.getDefaultInstance()) return this;
      if (other.hasTableId()) {
        setTableId(other.getTableId());
      }
      if (other.hasIndexId()) {
        setIndexId(other.getIndexId());
      }
      if (columnsBuilder_ == null) {
        if (!other.columns_.isEmpty()) {
          if (columns_.isEmpty()) {
            columns_ = other.columns_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureColumnsIsMutable();
            columns_.addAll(other.columns_);
          }
          onChanged();
        }
      } else {
        if (!other.columns_.isEmpty()) {
          if (columnsBuilder_.isEmpty()) {
            columnsBuilder_.dispose();
            columnsBuilder_ = null;
            columns_ = other.columns_;
            bitField0_ = (bitField0_ & ~0x00000004);
            columnsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getColumnsFieldBuilder() : null;
          } else {
            columnsBuilder_.addAllMessages(other.columns_);
          }
        }
      }
      if (other.hasUnique()) {
        setUnique(other.getUnique());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.pingcap.tidb.tipb.IndexInfo parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.pingcap.tidb.tipb.IndexInfo) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private long tableId_ ;
    /**
     * optional int64 table_id = 1 [(.gogoproto.nullable) = false];
     */
    public boolean hasTableId() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * optional int64 table_id = 1 [(.gogoproto.nullable) = false];
     */
    public long getTableId() {
      return tableId_;
    }
    /**
     * optional int64 table_id = 1 [(.gogoproto.nullable) = false];
     */
    public Builder setTableId(long value) {
      bitField0_ |= 0x00000001;
      tableId_ = value;
      onChanged();
      return this;
    }
    /**
     * optional int64 table_id = 1 [(.gogoproto.nullable) = false];
     */
    public Builder clearTableId() {
      bitField0_ = (bitField0_ & ~0x00000001);
      tableId_ = 0L;
      onChanged();
      return this;
    }

    private long indexId_ ;
    /**
     * optional int64 index_id = 2 [(.gogoproto.nullable) = false];
     */
    public boolean hasIndexId() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * optional int64 index_id = 2 [(.gogoproto.nullable) = false];
     */
    public long getIndexId() {
      return indexId_;
    }
    /**
     * optional int64 index_id = 2 [(.gogoproto.nullable) = false];
     */
    public Builder setIndexId(long value) {
      bitField0_ |= 0x00000002;
      indexId_ = value;
      onChanged();
      return this;
    }
    /**
     * optional int64 index_id = 2 [(.gogoproto.nullable) = false];
     */
    public Builder clearIndexId() {
      bitField0_ = (bitField0_ & ~0x00000002);
      indexId_ = 0L;
      onChanged();
      return this;
    }

    private java.util.List columns_ =
      java.util.Collections.emptyList();
    private void ensureColumnsIsMutable() {
      if (!((bitField0_ & 0x00000004) == 0x00000004)) {
        columns_ = new java.util.ArrayList(columns_);
        bitField0_ |= 0x00000004;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.pingcap.tidb.tipb.ColumnInfo, com.pingcap.tidb.tipb.ColumnInfo.Builder, com.pingcap.tidb.tipb.ColumnInfoOrBuilder> columnsBuilder_;

    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public java.util.List getColumnsList() {
      if (columnsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(columns_);
      } else {
        return columnsBuilder_.getMessageList();
      }
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public int getColumnsCount() {
      if (columnsBuilder_ == null) {
        return columns_.size();
      } else {
        return columnsBuilder_.getCount();
      }
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public com.pingcap.tidb.tipb.ColumnInfo getColumns(int index) {
      if (columnsBuilder_ == null) {
        return columns_.get(index);
      } else {
        return columnsBuilder_.getMessage(index);
      }
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public Builder setColumns(
        int index, com.pingcap.tidb.tipb.ColumnInfo value) {
      if (columnsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureColumnsIsMutable();
        columns_.set(index, value);
        onChanged();
      } else {
        columnsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public Builder setColumns(
        int index, com.pingcap.tidb.tipb.ColumnInfo.Builder builderForValue) {
      if (columnsBuilder_ == null) {
        ensureColumnsIsMutable();
        columns_.set(index, builderForValue.build());
        onChanged();
      } else {
        columnsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public Builder addColumns(com.pingcap.tidb.tipb.ColumnInfo value) {
      if (columnsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureColumnsIsMutable();
        columns_.add(value);
        onChanged();
      } else {
        columnsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public Builder addColumns(
        int index, com.pingcap.tidb.tipb.ColumnInfo value) {
      if (columnsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureColumnsIsMutable();
        columns_.add(index, value);
        onChanged();
      } else {
        columnsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public Builder addColumns(
        com.pingcap.tidb.tipb.ColumnInfo.Builder builderForValue) {
      if (columnsBuilder_ == null) {
        ensureColumnsIsMutable();
        columns_.add(builderForValue.build());
        onChanged();
      } else {
        columnsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public Builder addColumns(
        int index, com.pingcap.tidb.tipb.ColumnInfo.Builder builderForValue) {
      if (columnsBuilder_ == null) {
        ensureColumnsIsMutable();
        columns_.add(index, builderForValue.build());
        onChanged();
      } else {
        columnsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public Builder addAllColumns(
        java.lang.Iterable values) {
      if (columnsBuilder_ == null) {
        ensureColumnsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, columns_);
        onChanged();
      } else {
        columnsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public Builder clearColumns() {
      if (columnsBuilder_ == null) {
        columns_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
      } else {
        columnsBuilder_.clear();
      }
      return this;
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public Builder removeColumns(int index) {
      if (columnsBuilder_ == null) {
        ensureColumnsIsMutable();
        columns_.remove(index);
        onChanged();
      } else {
        columnsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public com.pingcap.tidb.tipb.ColumnInfo.Builder getColumnsBuilder(
        int index) {
      return getColumnsFieldBuilder().getBuilder(index);
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public com.pingcap.tidb.tipb.ColumnInfoOrBuilder getColumnsOrBuilder(
        int index) {
      if (columnsBuilder_ == null) {
        return columns_.get(index);  } else {
        return columnsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public java.util.List 
         getColumnsOrBuilderList() {
      if (columnsBuilder_ != null) {
        return columnsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(columns_);
      }
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public com.pingcap.tidb.tipb.ColumnInfo.Builder addColumnsBuilder() {
      return getColumnsFieldBuilder().addBuilder(
          com.pingcap.tidb.tipb.ColumnInfo.getDefaultInstance());
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public com.pingcap.tidb.tipb.ColumnInfo.Builder addColumnsBuilder(
        int index) {
      return getColumnsFieldBuilder().addBuilder(
          index, com.pingcap.tidb.tipb.ColumnInfo.getDefaultInstance());
    }
    /**
     * repeated .tipb.ColumnInfo columns = 3;
     */
    public java.util.List 
         getColumnsBuilderList() {
      return getColumnsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.pingcap.tidb.tipb.ColumnInfo, com.pingcap.tidb.tipb.ColumnInfo.Builder, com.pingcap.tidb.tipb.ColumnInfoOrBuilder> 
        getColumnsFieldBuilder() {
      if (columnsBuilder_ == null) {
        columnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.pingcap.tidb.tipb.ColumnInfo, com.pingcap.tidb.tipb.ColumnInfo.Builder, com.pingcap.tidb.tipb.ColumnInfoOrBuilder>(
                columns_,
                ((bitField0_ & 0x00000004) == 0x00000004),
                getParentForChildren(),
                isClean());
        columns_ = null;
      }
      return columnsBuilder_;
    }

    private boolean unique_ ;
    /**
     * optional bool unique = 4 [(.gogoproto.nullable) = false];
     */
    public boolean hasUnique() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    /**
     * optional bool unique = 4 [(.gogoproto.nullable) = false];
     */
    public boolean getUnique() {
      return unique_;
    }
    /**
     * optional bool unique = 4 [(.gogoproto.nullable) = false];
     */
    public Builder setUnique(boolean value) {
      bitField0_ |= 0x00000008;
      unique_ = value;
      onChanged();
      return this;
    }
    /**
     * optional bool unique = 4 [(.gogoproto.nullable) = false];
     */
    public Builder clearUnique() {
      bitField0_ = (bitField0_ & ~0x00000008);
      unique_ = false;
      onChanged();
      return this;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:tipb.IndexInfo)
  }

  // @@protoc_insertion_point(class_scope:tipb.IndexInfo)
  private static final com.pingcap.tidb.tipb.IndexInfo DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.pingcap.tidb.tipb.IndexInfo();
  }

  public static com.pingcap.tidb.tipb.IndexInfo getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  @java.lang.Deprecated public static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    public IndexInfo parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new IndexInfo(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser getParserForType() {
    return PARSER;
  }

  public com.pingcap.tidb.tipb.IndexInfo getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy