com.pingcap.tidb.tipb.ColumnInfo Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: schema.proto
package com.pingcap.tidb.tipb;
/**
* Protobuf type {@code tipb.ColumnInfo}
*/
public final class ColumnInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tipb.ColumnInfo)
ColumnInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use ColumnInfo.newBuilder() to construct.
private ColumnInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ColumnInfo() {
columnId_ = 0L;
tp_ = 0;
collation_ = 0;
columnLen_ = 0;
decimal_ = 0;
flag_ = 0;
elems_ = com.google.protobuf.LazyStringArrayList.EMPTY;
defaultVal_ = com.google.protobuf.ByteString.EMPTY;
pkHandle_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ColumnInfo(
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;
columnId_ = input.readInt64();
break;
}
case 16: {
bitField0_ |= 0x00000002;
tp_ = input.readInt32();
break;
}
case 24: {
bitField0_ |= 0x00000004;
collation_ = input.readInt32();
break;
}
case 32: {
bitField0_ |= 0x00000008;
columnLen_ = input.readInt32();
break;
}
case 40: {
bitField0_ |= 0x00000010;
decimal_ = input.readInt32();
break;
}
case 48: {
bitField0_ |= 0x00000020;
flag_ = input.readInt32();
break;
}
case 58: {
com.google.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
elems_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000040;
}
elems_.add(bs);
break;
}
case 66: {
bitField0_ |= 0x00000040;
defaultVal_ = input.readBytes();
break;
}
case 168: {
bitField0_ |= 0x00000080;
pkHandle_ = 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_ & 0x00000040) == 0x00000040)) {
elems_ = elems_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.pingcap.tidb.tipb.Schema.internal_static_tipb_ColumnInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.pingcap.tidb.tipb.Schema.internal_static_tipb_ColumnInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.pingcap.tidb.tipb.ColumnInfo.class, com.pingcap.tidb.tipb.ColumnInfo.Builder.class);
}
private int bitField0_;
public static final int COLUMN_ID_FIELD_NUMBER = 1;
private long columnId_;
/**
* optional int64 column_id = 1 [(.gogoproto.nullable) = false];
*/
public boolean hasColumnId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int64 column_id = 1 [(.gogoproto.nullable) = false];
*/
public long getColumnId() {
return columnId_;
}
public static final int TP_FIELD_NUMBER = 2;
private int tp_;
/**
*
* MySQL type.
*
*
* optional int32 tp = 2 [(.gogoproto.nullable) = false];
*/
public boolean hasTp() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* MySQL type.
*
*
* optional int32 tp = 2 [(.gogoproto.nullable) = false];
*/
public int getTp() {
return tp_;
}
public static final int COLLATION_FIELD_NUMBER = 3;
private int collation_;
/**
* optional int32 collation = 3 [(.gogoproto.nullable) = false];
*/
public boolean hasCollation() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int32 collation = 3 [(.gogoproto.nullable) = false];
*/
public int getCollation() {
return collation_;
}
public static final int COLUMNLEN_FIELD_NUMBER = 4;
private int columnLen_;
/**
* optional int32 columnLen = 4 [(.gogoproto.nullable) = false];
*/
public boolean hasColumnLen() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional int32 columnLen = 4 [(.gogoproto.nullable) = false];
*/
public int getColumnLen() {
return columnLen_;
}
public static final int DECIMAL_FIELD_NUMBER = 5;
private int decimal_;
/**
* optional int32 decimal = 5 [(.gogoproto.nullable) = false];
*/
public boolean hasDecimal() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional int32 decimal = 5 [(.gogoproto.nullable) = false];
*/
public int getDecimal() {
return decimal_;
}
public static final int FLAG_FIELD_NUMBER = 6;
private int flag_;
/**
* optional int32 flag = 6 [(.gogoproto.nullable) = false];
*/
public boolean hasFlag() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional int32 flag = 6 [(.gogoproto.nullable) = false];
*/
public int getFlag() {
return flag_;
}
public static final int ELEMS_FIELD_NUMBER = 7;
private com.google.protobuf.LazyStringList elems_;
/**
* repeated string elems = 7;
*/
public com.google.protobuf.ProtocolStringList
getElemsList() {
return elems_;
}
/**
* repeated string elems = 7;
*/
public int getElemsCount() {
return elems_.size();
}
/**
* repeated string elems = 7;
*/
public java.lang.String getElems(int index) {
return elems_.get(index);
}
/**
* repeated string elems = 7;
*/
public com.google.protobuf.ByteString
getElemsBytes(int index) {
return elems_.getByteString(index);
}
public static final int DEFAULT_VAL_FIELD_NUMBER = 8;
private com.google.protobuf.ByteString defaultVal_;
/**
*
* Encoded datum.
*
*
* optional bytes default_val = 8;
*/
public boolean hasDefaultVal() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
*
* Encoded datum.
*
*
* optional bytes default_val = 8;
*/
public com.google.protobuf.ByteString getDefaultVal() {
return defaultVal_;
}
public static final int PK_HANDLE_FIELD_NUMBER = 21;
private boolean pkHandle_;
/**
*
* PK handle column value is row handle.
*
*
* optional bool pk_handle = 21 [(.gogoproto.nullable) = false];
*/
public boolean hasPkHandle() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
*
* PK handle column value is row handle.
*
*
* optional bool pk_handle = 21 [(.gogoproto.nullable) = false];
*/
public boolean getPkHandle() {
return pkHandle_;
}
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, columnId_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, tp_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(3, collation_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeInt32(4, columnLen_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeInt32(5, decimal_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeInt32(6, flag_);
}
for (int i = 0; i < elems_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, elems_.getRaw(i));
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeBytes(8, defaultVal_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
output.writeBool(21, pkHandle_);
}
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, columnId_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, tp_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, collation_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, columnLen_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, decimal_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(6, flag_);
}
{
int dataSize = 0;
for (int i = 0; i < elems_.size(); i++) {
dataSize += computeStringSizeNoTag(elems_.getRaw(i));
}
size += dataSize;
size += 1 * getElemsList().size();
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(8, defaultVal_);
}
if (((bitField0_ & 0x00000080) == 0x00000080)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(21, pkHandle_);
}
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.ColumnInfo)) {
return super.equals(obj);
}
com.pingcap.tidb.tipb.ColumnInfo other = (com.pingcap.tidb.tipb.ColumnInfo) obj;
boolean result = true;
result = result && (hasColumnId() == other.hasColumnId());
if (hasColumnId()) {
result = result && (getColumnId()
== other.getColumnId());
}
result = result && (hasTp() == other.hasTp());
if (hasTp()) {
result = result && (getTp()
== other.getTp());
}
result = result && (hasCollation() == other.hasCollation());
if (hasCollation()) {
result = result && (getCollation()
== other.getCollation());
}
result = result && (hasColumnLen() == other.hasColumnLen());
if (hasColumnLen()) {
result = result && (getColumnLen()
== other.getColumnLen());
}
result = result && (hasDecimal() == other.hasDecimal());
if (hasDecimal()) {
result = result && (getDecimal()
== other.getDecimal());
}
result = result && (hasFlag() == other.hasFlag());
if (hasFlag()) {
result = result && (getFlag()
== other.getFlag());
}
result = result && getElemsList()
.equals(other.getElemsList());
result = result && (hasDefaultVal() == other.hasDefaultVal());
if (hasDefaultVal()) {
result = result && getDefaultVal()
.equals(other.getDefaultVal());
}
result = result && (hasPkHandle() == other.hasPkHandle());
if (hasPkHandle()) {
result = result && (getPkHandle()
== other.getPkHandle());
}
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 (hasColumnId()) {
hash = (37 * hash) + COLUMN_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getColumnId());
}
if (hasTp()) {
hash = (37 * hash) + TP_FIELD_NUMBER;
hash = (53 * hash) + getTp();
}
if (hasCollation()) {
hash = (37 * hash) + COLLATION_FIELD_NUMBER;
hash = (53 * hash) + getCollation();
}
if (hasColumnLen()) {
hash = (37 * hash) + COLUMNLEN_FIELD_NUMBER;
hash = (53 * hash) + getColumnLen();
}
if (hasDecimal()) {
hash = (37 * hash) + DECIMAL_FIELD_NUMBER;
hash = (53 * hash) + getDecimal();
}
if (hasFlag()) {
hash = (37 * hash) + FLAG_FIELD_NUMBER;
hash = (53 * hash) + getFlag();
}
if (getElemsCount() > 0) {
hash = (37 * hash) + ELEMS_FIELD_NUMBER;
hash = (53 * hash) + getElemsList().hashCode();
}
if (hasDefaultVal()) {
hash = (37 * hash) + DEFAULT_VAL_FIELD_NUMBER;
hash = (53 * hash) + getDefaultVal().hashCode();
}
if (hasPkHandle()) {
hash = (37 * hash) + PK_HANDLE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getPkHandle());
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.pingcap.tidb.tipb.ColumnInfo parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.pingcap.tidb.tipb.ColumnInfo 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.ColumnInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.pingcap.tidb.tipb.ColumnInfo 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.ColumnInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.pingcap.tidb.tipb.ColumnInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.pingcap.tidb.tipb.ColumnInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.pingcap.tidb.tipb.ColumnInfo 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.ColumnInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.pingcap.tidb.tipb.ColumnInfo 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.ColumnInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.pingcap.tidb.tipb.ColumnInfo 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.ColumnInfo 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.ColumnInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tipb.ColumnInfo)
com.pingcap.tidb.tipb.ColumnInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.pingcap.tidb.tipb.Schema.internal_static_tipb_ColumnInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.pingcap.tidb.tipb.Schema.internal_static_tipb_ColumnInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.pingcap.tidb.tipb.ColumnInfo.class, com.pingcap.tidb.tipb.ColumnInfo.Builder.class);
}
// Construct using com.pingcap.tidb.tipb.ColumnInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
columnId_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
tp_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
collation_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
columnLen_ = 0;
bitField0_ = (bitField0_ & ~0x00000008);
decimal_ = 0;
bitField0_ = (bitField0_ & ~0x00000010);
flag_ = 0;
bitField0_ = (bitField0_ & ~0x00000020);
elems_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000040);
defaultVal_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000080);
pkHandle_ = false;
bitField0_ = (bitField0_ & ~0x00000100);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.pingcap.tidb.tipb.Schema.internal_static_tipb_ColumnInfo_descriptor;
}
public com.pingcap.tidb.tipb.ColumnInfo getDefaultInstanceForType() {
return com.pingcap.tidb.tipb.ColumnInfo.getDefaultInstance();
}
public com.pingcap.tidb.tipb.ColumnInfo build() {
com.pingcap.tidb.tipb.ColumnInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.pingcap.tidb.tipb.ColumnInfo buildPartial() {
com.pingcap.tidb.tipb.ColumnInfo result = new com.pingcap.tidb.tipb.ColumnInfo(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.columnId_ = columnId_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.tp_ = tp_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.collation_ = collation_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.columnLen_ = columnLen_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.decimal_ = decimal_;
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000020;
}
result.flag_ = flag_;
if (((bitField0_ & 0x00000040) == 0x00000040)) {
elems_ = elems_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000040);
}
result.elems_ = elems_;
if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
to_bitField0_ |= 0x00000040;
}
result.defaultVal_ = defaultVal_;
if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
to_bitField0_ |= 0x00000080;
}
result.pkHandle_ = pkHandle_;
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.ColumnInfo) {
return mergeFrom((com.pingcap.tidb.tipb.ColumnInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.pingcap.tidb.tipb.ColumnInfo other) {
if (other == com.pingcap.tidb.tipb.ColumnInfo.getDefaultInstance()) return this;
if (other.hasColumnId()) {
setColumnId(other.getColumnId());
}
if (other.hasTp()) {
setTp(other.getTp());
}
if (other.hasCollation()) {
setCollation(other.getCollation());
}
if (other.hasColumnLen()) {
setColumnLen(other.getColumnLen());
}
if (other.hasDecimal()) {
setDecimal(other.getDecimal());
}
if (other.hasFlag()) {
setFlag(other.getFlag());
}
if (!other.elems_.isEmpty()) {
if (elems_.isEmpty()) {
elems_ = other.elems_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureElemsIsMutable();
elems_.addAll(other.elems_);
}
onChanged();
}
if (other.hasDefaultVal()) {
setDefaultVal(other.getDefaultVal());
}
if (other.hasPkHandle()) {
setPkHandle(other.getPkHandle());
}
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.ColumnInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.pingcap.tidb.tipb.ColumnInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long columnId_ ;
/**
* optional int64 column_id = 1 [(.gogoproto.nullable) = false];
*/
public boolean hasColumnId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int64 column_id = 1 [(.gogoproto.nullable) = false];
*/
public long getColumnId() {
return columnId_;
}
/**
* optional int64 column_id = 1 [(.gogoproto.nullable) = false];
*/
public Builder setColumnId(long value) {
bitField0_ |= 0x00000001;
columnId_ = value;
onChanged();
return this;
}
/**
* optional int64 column_id = 1 [(.gogoproto.nullable) = false];
*/
public Builder clearColumnId() {
bitField0_ = (bitField0_ & ~0x00000001);
columnId_ = 0L;
onChanged();
return this;
}
private int tp_ ;
/**
*
* MySQL type.
*
*
* optional int32 tp = 2 [(.gogoproto.nullable) = false];
*/
public boolean hasTp() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
*
* MySQL type.
*
*
* optional int32 tp = 2 [(.gogoproto.nullable) = false];
*/
public int getTp() {
return tp_;
}
/**
*
* MySQL type.
*
*
* optional int32 tp = 2 [(.gogoproto.nullable) = false];
*/
public Builder setTp(int value) {
bitField0_ |= 0x00000002;
tp_ = value;
onChanged();
return this;
}
/**
*
* MySQL type.
*
*
* optional int32 tp = 2 [(.gogoproto.nullable) = false];
*/
public Builder clearTp() {
bitField0_ = (bitField0_ & ~0x00000002);
tp_ = 0;
onChanged();
return this;
}
private int collation_ ;
/**
* optional int32 collation = 3 [(.gogoproto.nullable) = false];
*/
public boolean hasCollation() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int32 collation = 3 [(.gogoproto.nullable) = false];
*/
public int getCollation() {
return collation_;
}
/**
* optional int32 collation = 3 [(.gogoproto.nullable) = false];
*/
public Builder setCollation(int value) {
bitField0_ |= 0x00000004;
collation_ = value;
onChanged();
return this;
}
/**
* optional int32 collation = 3 [(.gogoproto.nullable) = false];
*/
public Builder clearCollation() {
bitField0_ = (bitField0_ & ~0x00000004);
collation_ = 0;
onChanged();
return this;
}
private int columnLen_ ;
/**
* optional int32 columnLen = 4 [(.gogoproto.nullable) = false];
*/
public boolean hasColumnLen() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional int32 columnLen = 4 [(.gogoproto.nullable) = false];
*/
public int getColumnLen() {
return columnLen_;
}
/**
* optional int32 columnLen = 4 [(.gogoproto.nullable) = false];
*/
public Builder setColumnLen(int value) {
bitField0_ |= 0x00000008;
columnLen_ = value;
onChanged();
return this;
}
/**
* optional int32 columnLen = 4 [(.gogoproto.nullable) = false];
*/
public Builder clearColumnLen() {
bitField0_ = (bitField0_ & ~0x00000008);
columnLen_ = 0;
onChanged();
return this;
}
private int decimal_ ;
/**
* optional int32 decimal = 5 [(.gogoproto.nullable) = false];
*/
public boolean hasDecimal() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional int32 decimal = 5 [(.gogoproto.nullable) = false];
*/
public int getDecimal() {
return decimal_;
}
/**
* optional int32 decimal = 5 [(.gogoproto.nullable) = false];
*/
public Builder setDecimal(int value) {
bitField0_ |= 0x00000010;
decimal_ = value;
onChanged();
return this;
}
/**
* optional int32 decimal = 5 [(.gogoproto.nullable) = false];
*/
public Builder clearDecimal() {
bitField0_ = (bitField0_ & ~0x00000010);
decimal_ = 0;
onChanged();
return this;
}
private int flag_ ;
/**
* optional int32 flag = 6 [(.gogoproto.nullable) = false];
*/
public boolean hasFlag() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional int32 flag = 6 [(.gogoproto.nullable) = false];
*/
public int getFlag() {
return flag_;
}
/**
* optional int32 flag = 6 [(.gogoproto.nullable) = false];
*/
public Builder setFlag(int value) {
bitField0_ |= 0x00000020;
flag_ = value;
onChanged();
return this;
}
/**
* optional int32 flag = 6 [(.gogoproto.nullable) = false];
*/
public Builder clearFlag() {
bitField0_ = (bitField0_ & ~0x00000020);
flag_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList elems_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureElemsIsMutable() {
if (!((bitField0_ & 0x00000040) == 0x00000040)) {
elems_ = new com.google.protobuf.LazyStringArrayList(elems_);
bitField0_ |= 0x00000040;
}
}
/**
* repeated string elems = 7;
*/
public com.google.protobuf.ProtocolStringList
getElemsList() {
return elems_.getUnmodifiableView();
}
/**
* repeated string elems = 7;
*/
public int getElemsCount() {
return elems_.size();
}
/**
* repeated string elems = 7;
*/
public java.lang.String getElems(int index) {
return elems_.get(index);
}
/**
* repeated string elems = 7;
*/
public com.google.protobuf.ByteString
getElemsBytes(int index) {
return elems_.getByteString(index);
}
/**
* repeated string elems = 7;
*/
public Builder setElems(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureElemsIsMutable();
elems_.set(index, value);
onChanged();
return this;
}
/**
* repeated string elems = 7;
*/
public Builder addElems(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureElemsIsMutable();
elems_.add(value);
onChanged();
return this;
}
/**
* repeated string elems = 7;
*/
public Builder addAllElems(
java.lang.Iterable values) {
ensureElemsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, elems_);
onChanged();
return this;
}
/**
* repeated string elems = 7;
*/
public Builder clearElems() {
elems_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
* repeated string elems = 7;
*/
public Builder addElemsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureElemsIsMutable();
elems_.add(value);
onChanged();
return this;
}
private com.google.protobuf.ByteString defaultVal_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* Encoded datum.
*
*
* optional bytes default_val = 8;
*/
public boolean hasDefaultVal() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
*
* Encoded datum.
*
*
* optional bytes default_val = 8;
*/
public com.google.protobuf.ByteString getDefaultVal() {
return defaultVal_;
}
/**
*
* Encoded datum.
*
*
* optional bytes default_val = 8;
*/
public Builder setDefaultVal(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000080;
defaultVal_ = value;
onChanged();
return this;
}
/**
*
* Encoded datum.
*
*
* optional bytes default_val = 8;
*/
public Builder clearDefaultVal() {
bitField0_ = (bitField0_ & ~0x00000080);
defaultVal_ = getDefaultInstance().getDefaultVal();
onChanged();
return this;
}
private boolean pkHandle_ ;
/**
*
* PK handle column value is row handle.
*
*
* optional bool pk_handle = 21 [(.gogoproto.nullable) = false];
*/
public boolean hasPkHandle() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
*
* PK handle column value is row handle.
*
*
* optional bool pk_handle = 21 [(.gogoproto.nullable) = false];
*/
public boolean getPkHandle() {
return pkHandle_;
}
/**
*
* PK handle column value is row handle.
*
*
* optional bool pk_handle = 21 [(.gogoproto.nullable) = false];
*/
public Builder setPkHandle(boolean value) {
bitField0_ |= 0x00000100;
pkHandle_ = value;
onChanged();
return this;
}
/**
*
* PK handle column value is row handle.
*
*
* optional bool pk_handle = 21 [(.gogoproto.nullable) = false];
*/
public Builder clearPkHandle() {
bitField0_ = (bitField0_ & ~0x00000100);
pkHandle_ = 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.ColumnInfo)
}
// @@protoc_insertion_point(class_scope:tipb.ColumnInfo)
private static final com.pingcap.tidb.tipb.ColumnInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.pingcap.tidb.tipb.ColumnInfo();
}
public static com.pingcap.tidb.tipb.ColumnInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ColumnInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ColumnInfo(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.ColumnInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy