TBinlog.java

/**
 * Autogenerated by Thrift Compiler (0.16.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.doris.thrift;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TBinlog implements org.apache.thrift.TBase<TBinlog, TBinlog._Fields>, java.io.Serializable, Cloneable, Comparable<TBinlog> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TBinlog");

  private static final org.apache.thrift.protocol.TField COMMIT_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("commit_seq", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)3);
  private static final org.apache.thrift.protocol.TField DB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("db_id", org.apache.thrift.protocol.TType.I64, (short)4);
  private static final org.apache.thrift.protocol.TField TABLE_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("table_ids", org.apache.thrift.protocol.TType.LIST, (short)5);
  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField BELONG_FIELD_DESC = new org.apache.thrift.protocol.TField("belong", org.apache.thrift.protocol.TType.I64, (short)7);
  private static final org.apache.thrift.protocol.TField TABLE_REF_FIELD_DESC = new org.apache.thrift.protocol.TField("table_ref", org.apache.thrift.protocol.TType.I64, (short)8);
  private static final org.apache.thrift.protocol.TField REMOVE_ENABLE_CACHE_FIELD_DESC = new org.apache.thrift.protocol.TField("remove_enable_cache", org.apache.thrift.protocol.TType.BOOL, (short)9);

  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TBinlogStandardSchemeFactory();
  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TBinlogTupleSchemeFactory();

  public long commit_seq; // optional
  public long timestamp; // optional
  /**
   * 
   * @see TBinlogType
   */
  public @org.apache.thrift.annotation.Nullable TBinlogType type; // optional
  public long db_id; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> table_ids; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String data; // optional
  public long belong; // optional
  public long table_ref; // optional
  public boolean remove_enable_cache; // optional

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    COMMIT_SEQ((short)1, "commit_seq"),
    TIMESTAMP((short)2, "timestamp"),
    /**
     * 
     * @see TBinlogType
     */
    TYPE((short)3, "type"),
    DB_ID((short)4, "db_id"),
    TABLE_IDS((short)5, "table_ids"),
    DATA((short)6, "data"),
    BELONG((short)7, "belong"),
    TABLE_REF((short)8, "table_ref"),
    REMOVE_ENABLE_CACHE((short)9, "remove_enable_cache");

    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

    static {
      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // COMMIT_SEQ
          return COMMIT_SEQ;
        case 2: // TIMESTAMP
          return TIMESTAMP;
        case 3: // TYPE
          return TYPE;
        case 4: // DB_ID
          return DB_ID;
        case 5: // TABLE_IDS
          return TABLE_IDS;
        case 6: // DATA
          return DATA;
        case 7: // BELONG
          return BELONG;
        case 8: // TABLE_REF
          return TABLE_REF;
        case 9: // REMOVE_ENABLE_CACHE
          return REMOVE_ENABLE_CACHE;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByName(java.lang.String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final java.lang.String _fieldName;

    _Fields(short thriftId, java.lang.String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public java.lang.String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __COMMIT_SEQ_ISSET_ID = 0;
  private static final int __TIMESTAMP_ISSET_ID = 1;
  private static final int __DB_ID_ISSET_ID = 2;
  private static final int __BELONG_ISSET_ID = 3;
  private static final int __TABLE_REF_ISSET_ID = 4;
  private static final int __REMOVE_ENABLE_CACHE_ISSET_ID = 5;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.COMMIT_SEQ,_Fields.TIMESTAMP,_Fields.TYPE,_Fields.DB_ID,_Fields.TABLE_IDS,_Fields.DATA,_Fields.BELONG,_Fields.TABLE_REF,_Fields.REMOVE_ENABLE_CACHE};
  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.COMMIT_SEQ, new org.apache.thrift.meta_data.FieldMetaData("commit_seq", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TBinlogType.class)));
    tmpMap.put(_Fields.DB_ID, new org.apache.thrift.meta_data.FieldMetaData("db_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TABLE_IDS, new org.apache.thrift.meta_data.FieldMetaData("table_ids", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
    tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.BELONG, new org.apache.thrift.meta_data.FieldMetaData("belong", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TABLE_REF, new org.apache.thrift.meta_data.FieldMetaData("table_ref", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.REMOVE_ENABLE_CACHE, new org.apache.thrift.meta_data.FieldMetaData("remove_enable_cache", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TBinlog.class, metaDataMap);
  }

  public TBinlog() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TBinlog(TBinlog other) {
    __isset_bitfield = other.__isset_bitfield;
    this.commit_seq = other.commit_seq;
    this.timestamp = other.timestamp;
    if (other.isSetType()) {
      this.type = other.type;
    }
    this.db_id = other.db_id;
    if (other.isSetTableIds()) {
      java.util.List<java.lang.Long> __this__table_ids = new java.util.ArrayList<java.lang.Long>(other.table_ids);
      this.table_ids = __this__table_ids;
    }
    if (other.isSetData()) {
      this.data = other.data;
    }
    this.belong = other.belong;
    this.table_ref = other.table_ref;
    this.remove_enable_cache = other.remove_enable_cache;
  }

  public TBinlog deepCopy() {
    return new TBinlog(this);
  }

  @Override
  public void clear() {
    setCommitSeqIsSet(false);
    this.commit_seq = 0;
    setTimestampIsSet(false);
    this.timestamp = 0;
    this.type = null;
    setDbIdIsSet(false);
    this.db_id = 0;
    this.table_ids = null;
    this.data = null;
    setBelongIsSet(false);
    this.belong = 0;
    setTableRefIsSet(false);
    this.table_ref = 0;
    setRemoveEnableCacheIsSet(false);
    this.remove_enable_cache = false;
  }

  public long getCommitSeq() {
    return this.commit_seq;
  }

  public TBinlog setCommitSeq(long commit_seq) {
    this.commit_seq = commit_seq;
    setCommitSeqIsSet(true);
    return this;
  }

  public void unsetCommitSeq() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMMIT_SEQ_ISSET_ID);
  }

  /** Returns true if field commit_seq is set (has been assigned a value) and false otherwise */
  public boolean isSetCommitSeq() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMMIT_SEQ_ISSET_ID);
  }

  public void setCommitSeqIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMMIT_SEQ_ISSET_ID, value);
  }

  public long getTimestamp() {
    return this.timestamp;
  }

  public TBinlog setTimestamp(long timestamp) {
    this.timestamp = timestamp;
    setTimestampIsSet(true);
    return this;
  }

  public void unsetTimestamp() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
  }

  /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
  public boolean isSetTimestamp() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
  }

  public void setTimestampIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TIMESTAMP_ISSET_ID, value);
  }

  /**
   * 
   * @see TBinlogType
   */
  @org.apache.thrift.annotation.Nullable
  public TBinlogType getType() {
    return this.type;
  }

  /**
   * 
   * @see TBinlogType
   */
  public TBinlog setType(@org.apache.thrift.annotation.Nullable TBinlogType type) {
    this.type = type;
    return this;
  }

  public void unsetType() {
    this.type = null;
  }

  /** Returns true if field type is set (has been assigned a value) and false otherwise */
  public boolean isSetType() {
    return this.type != null;
  }

  public void setTypeIsSet(boolean value) {
    if (!value) {
      this.type = null;
    }
  }

  public long getDbId() {
    return this.db_id;
  }

  public TBinlog setDbId(long db_id) {
    this.db_id = db_id;
    setDbIdIsSet(true);
    return this;
  }

  public void unsetDbId() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DB_ID_ISSET_ID);
  }

  /** Returns true if field db_id is set (has been assigned a value) and false otherwise */
  public boolean isSetDbId() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DB_ID_ISSET_ID);
  }

  public void setDbIdIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DB_ID_ISSET_ID, value);
  }

  public int getTableIdsSize() {
    return (this.table_ids == null) ? 0 : this.table_ids.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.lang.Long> getTableIdsIterator() {
    return (this.table_ids == null) ? null : this.table_ids.iterator();
  }

  public void addToTableIds(long elem) {
    if (this.table_ids == null) {
      this.table_ids = new java.util.ArrayList<java.lang.Long>();
    }
    this.table_ids.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.Long> getTableIds() {
    return this.table_ids;
  }

  public TBinlog setTableIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> table_ids) {
    this.table_ids = table_ids;
    return this;
  }

  public void unsetTableIds() {
    this.table_ids = null;
  }

  /** Returns true if field table_ids is set (has been assigned a value) and false otherwise */
  public boolean isSetTableIds() {
    return this.table_ids != null;
  }

  public void setTableIdsIsSet(boolean value) {
    if (!value) {
      this.table_ids = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.String getData() {
    return this.data;
  }

  public TBinlog setData(@org.apache.thrift.annotation.Nullable java.lang.String data) {
    this.data = data;
    return this;
  }

  public void unsetData() {
    this.data = null;
  }

  /** Returns true if field data is set (has been assigned a value) and false otherwise */
  public boolean isSetData() {
    return this.data != null;
  }

  public void setDataIsSet(boolean value) {
    if (!value) {
      this.data = null;
    }
  }

  public long getBelong() {
    return this.belong;
  }

  public TBinlog setBelong(long belong) {
    this.belong = belong;
    setBelongIsSet(true);
    return this;
  }

  public void unsetBelong() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BELONG_ISSET_ID);
  }

  /** Returns true if field belong is set (has been assigned a value) and false otherwise */
  public boolean isSetBelong() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BELONG_ISSET_ID);
  }

  public void setBelongIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BELONG_ISSET_ID, value);
  }

  public long getTableRef() {
    return this.table_ref;
  }

  public TBinlog setTableRef(long table_ref) {
    this.table_ref = table_ref;
    setTableRefIsSet(true);
    return this;
  }

  public void unsetTableRef() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TABLE_REF_ISSET_ID);
  }

  /** Returns true if field table_ref is set (has been assigned a value) and false otherwise */
  public boolean isSetTableRef() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TABLE_REF_ISSET_ID);
  }

  public void setTableRefIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TABLE_REF_ISSET_ID, value);
  }

  public boolean isRemoveEnableCache() {
    return this.remove_enable_cache;
  }

  public TBinlog setRemoveEnableCache(boolean remove_enable_cache) {
    this.remove_enable_cache = remove_enable_cache;
    setRemoveEnableCacheIsSet(true);
    return this;
  }

  public void unsetRemoveEnableCache() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REMOVE_ENABLE_CACHE_ISSET_ID);
  }

  /** Returns true if field remove_enable_cache is set (has been assigned a value) and false otherwise */
  public boolean isSetRemoveEnableCache() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REMOVE_ENABLE_CACHE_ISSET_ID);
  }

  public void setRemoveEnableCacheIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REMOVE_ENABLE_CACHE_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case COMMIT_SEQ:
      if (value == null) {
        unsetCommitSeq();
      } else {
        setCommitSeq((java.lang.Long)value);
      }
      break;

    case TIMESTAMP:
      if (value == null) {
        unsetTimestamp();
      } else {
        setTimestamp((java.lang.Long)value);
      }
      break;

    case TYPE:
      if (value == null) {
        unsetType();
      } else {
        setType((TBinlogType)value);
      }
      break;

    case DB_ID:
      if (value == null) {
        unsetDbId();
      } else {
        setDbId((java.lang.Long)value);
      }
      break;

    case TABLE_IDS:
      if (value == null) {
        unsetTableIds();
      } else {
        setTableIds((java.util.List<java.lang.Long>)value);
      }
      break;

    case DATA:
      if (value == null) {
        unsetData();
      } else {
        setData((java.lang.String)value);
      }
      break;

    case BELONG:
      if (value == null) {
        unsetBelong();
      } else {
        setBelong((java.lang.Long)value);
      }
      break;

    case TABLE_REF:
      if (value == null) {
        unsetTableRef();
      } else {
        setTableRef((java.lang.Long)value);
      }
      break;

    case REMOVE_ENABLE_CACHE:
      if (value == null) {
        unsetRemoveEnableCache();
      } else {
        setRemoveEnableCache((java.lang.Boolean)value);
      }
      break;

    }
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.Object getFieldValue(_Fields field) {
    switch (field) {
    case COMMIT_SEQ:
      return getCommitSeq();

    case TIMESTAMP:
      return getTimestamp();

    case TYPE:
      return getType();

    case DB_ID:
      return getDbId();

    case TABLE_IDS:
      return getTableIds();

    case DATA:
      return getData();

    case BELONG:
      return getBelong();

    case TABLE_REF:
      return getTableRef();

    case REMOVE_ENABLE_CACHE:
      return isRemoveEnableCache();

    }
    throw new java.lang.IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new java.lang.IllegalArgumentException();
    }

    switch (field) {
    case COMMIT_SEQ:
      return isSetCommitSeq();
    case TIMESTAMP:
      return isSetTimestamp();
    case TYPE:
      return isSetType();
    case DB_ID:
      return isSetDbId();
    case TABLE_IDS:
      return isSetTableIds();
    case DATA:
      return isSetData();
    case BELONG:
      return isSetBelong();
    case TABLE_REF:
      return isSetTableRef();
    case REMOVE_ENABLE_CACHE:
      return isSetRemoveEnableCache();
    }
    throw new java.lang.IllegalStateException();
  }

  @Override
  public boolean equals(java.lang.Object that) {
    if (that instanceof TBinlog)
      return this.equals((TBinlog)that);
    return false;
  }

  public boolean equals(TBinlog that) {
    if (that == null)
      return false;
    if (this == that)
      return true;

    boolean this_present_commit_seq = true && this.isSetCommitSeq();
    boolean that_present_commit_seq = true && that.isSetCommitSeq();
    if (this_present_commit_seq || that_present_commit_seq) {
      if (!(this_present_commit_seq && that_present_commit_seq))
        return false;
      if (this.commit_seq != that.commit_seq)
        return false;
    }

    boolean this_present_timestamp = true && this.isSetTimestamp();
    boolean that_present_timestamp = true && that.isSetTimestamp();
    if (this_present_timestamp || that_present_timestamp) {
      if (!(this_present_timestamp && that_present_timestamp))
        return false;
      if (this.timestamp != that.timestamp)
        return false;
    }

    boolean this_present_type = true && this.isSetType();
    boolean that_present_type = true && that.isSetType();
    if (this_present_type || that_present_type) {
      if (!(this_present_type && that_present_type))
        return false;
      if (!this.type.equals(that.type))
        return false;
    }

    boolean this_present_db_id = true && this.isSetDbId();
    boolean that_present_db_id = true && that.isSetDbId();
    if (this_present_db_id || that_present_db_id) {
      if (!(this_present_db_id && that_present_db_id))
        return false;
      if (this.db_id != that.db_id)
        return false;
    }

    boolean this_present_table_ids = true && this.isSetTableIds();
    boolean that_present_table_ids = true && that.isSetTableIds();
    if (this_present_table_ids || that_present_table_ids) {
      if (!(this_present_table_ids && that_present_table_ids))
        return false;
      if (!this.table_ids.equals(that.table_ids))
        return false;
    }

    boolean this_present_data = true && this.isSetData();
    boolean that_present_data = true && that.isSetData();
    if (this_present_data || that_present_data) {
      if (!(this_present_data && that_present_data))
        return false;
      if (!this.data.equals(that.data))
        return false;
    }

    boolean this_present_belong = true && this.isSetBelong();
    boolean that_present_belong = true && that.isSetBelong();
    if (this_present_belong || that_present_belong) {
      if (!(this_present_belong && that_present_belong))
        return false;
      if (this.belong != that.belong)
        return false;
    }

    boolean this_present_table_ref = true && this.isSetTableRef();
    boolean that_present_table_ref = true && that.isSetTableRef();
    if (this_present_table_ref || that_present_table_ref) {
      if (!(this_present_table_ref && that_present_table_ref))
        return false;
      if (this.table_ref != that.table_ref)
        return false;
    }

    boolean this_present_remove_enable_cache = true && this.isSetRemoveEnableCache();
    boolean that_present_remove_enable_cache = true && that.isSetRemoveEnableCache();
    if (this_present_remove_enable_cache || that_present_remove_enable_cache) {
      if (!(this_present_remove_enable_cache && that_present_remove_enable_cache))
        return false;
      if (this.remove_enable_cache != that.remove_enable_cache)
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    int hashCode = 1;

    hashCode = hashCode * 8191 + ((isSetCommitSeq()) ? 131071 : 524287);
    if (isSetCommitSeq())
      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(commit_seq);

    hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287);
    if (isSetTimestamp())
      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(timestamp);

    hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
    if (isSetType())
      hashCode = hashCode * 8191 + type.getValue();

    hashCode = hashCode * 8191 + ((isSetDbId()) ? 131071 : 524287);
    if (isSetDbId())
      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(db_id);

    hashCode = hashCode * 8191 + ((isSetTableIds()) ? 131071 : 524287);
    if (isSetTableIds())
      hashCode = hashCode * 8191 + table_ids.hashCode();

    hashCode = hashCode * 8191 + ((isSetData()) ? 131071 : 524287);
    if (isSetData())
      hashCode = hashCode * 8191 + data.hashCode();

    hashCode = hashCode * 8191 + ((isSetBelong()) ? 131071 : 524287);
    if (isSetBelong())
      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(belong);

    hashCode = hashCode * 8191 + ((isSetTableRef()) ? 131071 : 524287);
    if (isSetTableRef())
      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(table_ref);

    hashCode = hashCode * 8191 + ((isSetRemoveEnableCache()) ? 131071 : 524287);
    if (isSetRemoveEnableCache())
      hashCode = hashCode * 8191 + ((remove_enable_cache) ? 131071 : 524287);

    return hashCode;
  }

  @Override
  public int compareTo(TBinlog other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetCommitSeq(), other.isSetCommitSeq());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCommitSeq()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.commit_seq, other.commit_seq);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTimestamp(), other.isSetTimestamp());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimestamp()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDbId(), other.isSetDbId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDbId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_id, other.db_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTableIds(), other.isSetTableIds());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableIds()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_ids, other.table_ids);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetData(), other.isSetData());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetData()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBelong(), other.isSetBelong());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBelong()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.belong, other.belong);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTableRef(), other.isSetTableRef());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableRef()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_ref, other.table_ref);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetRemoveEnableCache(), other.isSetRemoveEnableCache());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRemoveEnableCache()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remove_enable_cache, other.remove_enable_cache);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  @org.apache.thrift.annotation.Nullable
  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    scheme(iprot).read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    scheme(oprot).write(oprot, this);
  }

  @Override
  public java.lang.String toString() {
    java.lang.StringBuilder sb = new java.lang.StringBuilder("TBinlog(");
    boolean first = true;

    if (isSetCommitSeq()) {
      sb.append("commit_seq:");
      sb.append(this.commit_seq);
      first = false;
    }
    if (isSetTimestamp()) {
      if (!first) sb.append(", ");
      sb.append("timestamp:");
      sb.append(this.timestamp);
      first = false;
    }
    if (isSetType()) {
      if (!first) sb.append(", ");
      sb.append("type:");
      if (this.type == null) {
        sb.append("null");
      } else {
        sb.append(this.type);
      }
      first = false;
    }
    if (isSetDbId()) {
      if (!first) sb.append(", ");
      sb.append("db_id:");
      sb.append(this.db_id);
      first = false;
    }
    if (isSetTableIds()) {
      if (!first) sb.append(", ");
      sb.append("table_ids:");
      if (this.table_ids == null) {
        sb.append("null");
      } else {
        sb.append(this.table_ids);
      }
      first = false;
    }
    if (isSetData()) {
      if (!first) sb.append(", ");
      sb.append("data:");
      if (this.data == null) {
        sb.append("null");
      } else {
        sb.append(this.data);
      }
      first = false;
    }
    if (isSetBelong()) {
      if (!first) sb.append(", ");
      sb.append("belong:");
      sb.append(this.belong);
      first = false;
    }
    if (isSetTableRef()) {
      if (!first) sb.append(", ");
      sb.append("table_ref:");
      sb.append(this.table_ref);
      first = false;
    }
    if (isSetRemoveEnableCache()) {
      if (!first) sb.append(", ");
      sb.append("remove_enable_cache:");
      sb.append(this.remove_enable_cache);
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class TBinlogStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TBinlogStandardScheme getScheme() {
      return new TBinlogStandardScheme();
    }
  }

  private static class TBinlogStandardScheme extends org.apache.thrift.scheme.StandardScheme<TBinlog> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TBinlog struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (schemeField.id) {
          case 1: // COMMIT_SEQ
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.commit_seq = iprot.readI64();
              struct.setCommitSeqIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // TIMESTAMP
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.timestamp = iprot.readI64();
              struct.setTimestampIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.type = org.apache.doris.thrift.TBinlogType.findByValue(iprot.readI32());
              struct.setTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // DB_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.db_id = iprot.readI64();
              struct.setDbIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // TABLE_IDS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list566 = iprot.readListBegin();
                struct.table_ids = new java.util.ArrayList<java.lang.Long>(_list566.size);
                long _elem567;
                for (int _i568 = 0; _i568 < _list566.size; ++_i568)
                {
                  _elem567 = iprot.readI64();
                  struct.table_ids.add(_elem567);
                }
                iprot.readListEnd();
              }
              struct.setTableIdsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // DATA
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.data = iprot.readString();
              struct.setDataIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // BELONG
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.belong = iprot.readI64();
              struct.setBelongIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // TABLE_REF
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.table_ref = iprot.readI64();
              struct.setTableRefIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // REMOVE_ENABLE_CACHE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.remove_enable_cache = iprot.readBool();
              struct.setRemoveEnableCacheIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, TBinlog struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.isSetCommitSeq()) {
        oprot.writeFieldBegin(COMMIT_SEQ_FIELD_DESC);
        oprot.writeI64(struct.commit_seq);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTimestamp()) {
        oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
        oprot.writeI64(struct.timestamp);
        oprot.writeFieldEnd();
      }
      if (struct.type != null) {
        if (struct.isSetType()) {
          oprot.writeFieldBegin(TYPE_FIELD_DESC);
          oprot.writeI32(struct.type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetDbId()) {
        oprot.writeFieldBegin(DB_ID_FIELD_DESC);
        oprot.writeI64(struct.db_id);
        oprot.writeFieldEnd();
      }
      if (struct.table_ids != null) {
        if (struct.isSetTableIds()) {
          oprot.writeFieldBegin(TABLE_IDS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.table_ids.size()));
            for (long _iter569 : struct.table_ids)
            {
              oprot.writeI64(_iter569);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.data != null) {
        if (struct.isSetData()) {
          oprot.writeFieldBegin(DATA_FIELD_DESC);
          oprot.writeString(struct.data);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetBelong()) {
        oprot.writeFieldBegin(BELONG_FIELD_DESC);
        oprot.writeI64(struct.belong);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTableRef()) {
        oprot.writeFieldBegin(TABLE_REF_FIELD_DESC);
        oprot.writeI64(struct.table_ref);
        oprot.writeFieldEnd();
      }
      if (struct.isSetRemoveEnableCache()) {
        oprot.writeFieldBegin(REMOVE_ENABLE_CACHE_FIELD_DESC);
        oprot.writeBool(struct.remove_enable_cache);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class TBinlogTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TBinlogTupleScheme getScheme() {
      return new TBinlogTupleScheme();
    }
  }

  private static class TBinlogTupleScheme extends org.apache.thrift.scheme.TupleScheme<TBinlog> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TBinlog struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetCommitSeq()) {
        optionals.set(0);
      }
      if (struct.isSetTimestamp()) {
        optionals.set(1);
      }
      if (struct.isSetType()) {
        optionals.set(2);
      }
      if (struct.isSetDbId()) {
        optionals.set(3);
      }
      if (struct.isSetTableIds()) {
        optionals.set(4);
      }
      if (struct.isSetData()) {
        optionals.set(5);
      }
      if (struct.isSetBelong()) {
        optionals.set(6);
      }
      if (struct.isSetTableRef()) {
        optionals.set(7);
      }
      if (struct.isSetRemoveEnableCache()) {
        optionals.set(8);
      }
      oprot.writeBitSet(optionals, 9);
      if (struct.isSetCommitSeq()) {
        oprot.writeI64(struct.commit_seq);
      }
      if (struct.isSetTimestamp()) {
        oprot.writeI64(struct.timestamp);
      }
      if (struct.isSetType()) {
        oprot.writeI32(struct.type.getValue());
      }
      if (struct.isSetDbId()) {
        oprot.writeI64(struct.db_id);
      }
      if (struct.isSetTableIds()) {
        {
          oprot.writeI32(struct.table_ids.size());
          for (long _iter570 : struct.table_ids)
          {
            oprot.writeI64(_iter570);
          }
        }
      }
      if (struct.isSetData()) {
        oprot.writeString(struct.data);
      }
      if (struct.isSetBelong()) {
        oprot.writeI64(struct.belong);
      }
      if (struct.isSetTableRef()) {
        oprot.writeI64(struct.table_ref);
      }
      if (struct.isSetRemoveEnableCache()) {
        oprot.writeBool(struct.remove_enable_cache);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TBinlog struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(9);
      if (incoming.get(0)) {
        struct.commit_seq = iprot.readI64();
        struct.setCommitSeqIsSet(true);
      }
      if (incoming.get(1)) {
        struct.timestamp = iprot.readI64();
        struct.setTimestampIsSet(true);
      }
      if (incoming.get(2)) {
        struct.type = org.apache.doris.thrift.TBinlogType.findByValue(iprot.readI32());
        struct.setTypeIsSet(true);
      }
      if (incoming.get(3)) {
        struct.db_id = iprot.readI64();
        struct.setDbIdIsSet(true);
      }
      if (incoming.get(4)) {
        {
          org.apache.thrift.protocol.TList _list571 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
          struct.table_ids = new java.util.ArrayList<java.lang.Long>(_list571.size);
          long _elem572;
          for (int _i573 = 0; _i573 < _list571.size; ++_i573)
          {
            _elem572 = iprot.readI64();
            struct.table_ids.add(_elem572);
          }
        }
        struct.setTableIdsIsSet(true);
      }
      if (incoming.get(5)) {
        struct.data = iprot.readString();
        struct.setDataIsSet(true);
      }
      if (incoming.get(6)) {
        struct.belong = iprot.readI64();
        struct.setBelongIsSet(true);
      }
      if (incoming.get(7)) {
        struct.table_ref = iprot.readI64();
        struct.setTableRefIsSet(true);
      }
      if (incoming.get(8)) {
        struct.remove_enable_cache = iprot.readBool();
        struct.setRemoveEnableCacheIsSet(true);
      }
    }
  }

  private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
    return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
  }
}