TGroupCommitInfo.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 TGroupCommitInfo implements org.apache.thrift.TBase<TGroupCommitInfo, TGroupCommitInfo._Fields>, java.io.Serializable, Cloneable, Comparable<TGroupCommitInfo> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGroupCommitInfo");

  private static final org.apache.thrift.protocol.TField GET_GROUP_COMMIT_LOAD_BE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("getGroupCommitLoadBeId", org.apache.thrift.protocol.TType.BOOL, (short)1);
  private static final org.apache.thrift.protocol.TField GROUP_COMMIT_LOAD_TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupCommitLoadTableId", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField CLUSTER_FIELD_DESC = new org.apache.thrift.protocol.TField("cluster", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField UPDATE_LOAD_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("updateLoadData", org.apache.thrift.protocol.TType.BOOL, (short)5);
  private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tableId", org.apache.thrift.protocol.TType.I64, (short)6);
  private static final org.apache.thrift.protocol.TField RECEIVE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("receiveData", org.apache.thrift.protocol.TType.I64, (short)7);

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

  public boolean getGroupCommitLoadBeId; // optional
  public long groupCommitLoadTableId; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String cluster; // optional
  public boolean updateLoadData; // optional
  public long tableId; // optional
  public long receiveData; // 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 {
    GET_GROUP_COMMIT_LOAD_BE_ID((short)1, "getGroupCommitLoadBeId"),
    GROUP_COMMIT_LOAD_TABLE_ID((short)2, "groupCommitLoadTableId"),
    CLUSTER((short)3, "cluster"),
    UPDATE_LOAD_DATA((short)5, "updateLoadData"),
    TABLE_ID((short)6, "tableId"),
    RECEIVE_DATA((short)7, "receiveData");

    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: // GET_GROUP_COMMIT_LOAD_BE_ID
          return GET_GROUP_COMMIT_LOAD_BE_ID;
        case 2: // GROUP_COMMIT_LOAD_TABLE_ID
          return GROUP_COMMIT_LOAD_TABLE_ID;
        case 3: // CLUSTER
          return CLUSTER;
        case 5: // UPDATE_LOAD_DATA
          return UPDATE_LOAD_DATA;
        case 6: // TABLE_ID
          return TABLE_ID;
        case 7: // RECEIVE_DATA
          return RECEIVE_DATA;
        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 __GETGROUPCOMMITLOADBEID_ISSET_ID = 0;
  private static final int __GROUPCOMMITLOADTABLEID_ISSET_ID = 1;
  private static final int __UPDATELOADDATA_ISSET_ID = 2;
  private static final int __TABLEID_ISSET_ID = 3;
  private static final int __RECEIVEDATA_ISSET_ID = 4;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.GET_GROUP_COMMIT_LOAD_BE_ID,_Fields.GROUP_COMMIT_LOAD_TABLE_ID,_Fields.CLUSTER,_Fields.UPDATE_LOAD_DATA,_Fields.TABLE_ID,_Fields.RECEIVE_DATA};
  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.GET_GROUP_COMMIT_LOAD_BE_ID, new org.apache.thrift.meta_data.FieldMetaData("getGroupCommitLoadBeId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.GROUP_COMMIT_LOAD_TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("groupCommitLoadTableId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.CLUSTER, new org.apache.thrift.meta_data.FieldMetaData("cluster", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.UPDATE_LOAD_DATA, new org.apache.thrift.meta_data.FieldMetaData("updateLoadData", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("tableId", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.RECEIVE_DATA, new org.apache.thrift.meta_data.FieldMetaData("receiveData", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGroupCommitInfo.class, metaDataMap);
  }

  public TGroupCommitInfo() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TGroupCommitInfo(TGroupCommitInfo other) {
    __isset_bitfield = other.__isset_bitfield;
    this.getGroupCommitLoadBeId = other.getGroupCommitLoadBeId;
    this.groupCommitLoadTableId = other.groupCommitLoadTableId;
    if (other.isSetCluster()) {
      this.cluster = other.cluster;
    }
    this.updateLoadData = other.updateLoadData;
    this.tableId = other.tableId;
    this.receiveData = other.receiveData;
  }

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

  @Override
  public void clear() {
    setGetGroupCommitLoadBeIdIsSet(false);
    this.getGroupCommitLoadBeId = false;
    setGroupCommitLoadTableIdIsSet(false);
    this.groupCommitLoadTableId = 0;
    this.cluster = null;
    setUpdateLoadDataIsSet(false);
    this.updateLoadData = false;
    setTableIdIsSet(false);
    this.tableId = 0;
    setReceiveDataIsSet(false);
    this.receiveData = 0;
  }

  public boolean isGetGroupCommitLoadBeId() {
    return this.getGroupCommitLoadBeId;
  }

  public TGroupCommitInfo setGetGroupCommitLoadBeId(boolean getGroupCommitLoadBeId) {
    this.getGroupCommitLoadBeId = getGroupCommitLoadBeId;
    setGetGroupCommitLoadBeIdIsSet(true);
    return this;
  }

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

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

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

  public long getGroupCommitLoadTableId() {
    return this.groupCommitLoadTableId;
  }

  public TGroupCommitInfo setGroupCommitLoadTableId(long groupCommitLoadTableId) {
    this.groupCommitLoadTableId = groupCommitLoadTableId;
    setGroupCommitLoadTableIdIsSet(true);
    return this;
  }

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

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

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

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

  public TGroupCommitInfo setCluster(@org.apache.thrift.annotation.Nullable java.lang.String cluster) {
    this.cluster = cluster;
    return this;
  }

  public void unsetCluster() {
    this.cluster = null;
  }

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

  public void setClusterIsSet(boolean value) {
    if (!value) {
      this.cluster = null;
    }
  }

  public boolean isUpdateLoadData() {
    return this.updateLoadData;
  }

  public TGroupCommitInfo setUpdateLoadData(boolean updateLoadData) {
    this.updateLoadData = updateLoadData;
    setUpdateLoadDataIsSet(true);
    return this;
  }

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

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

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

  public long getTableId() {
    return this.tableId;
  }

  public TGroupCommitInfo setTableId(long tableId) {
    this.tableId = tableId;
    setTableIdIsSet(true);
    return this;
  }

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

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

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

  public long getReceiveData() {
    return this.receiveData;
  }

  public TGroupCommitInfo setReceiveData(long receiveData) {
    this.receiveData = receiveData;
    setReceiveDataIsSet(true);
    return this;
  }

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

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

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

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case GET_GROUP_COMMIT_LOAD_BE_ID:
      if (value == null) {
        unsetGetGroupCommitLoadBeId();
      } else {
        setGetGroupCommitLoadBeId((java.lang.Boolean)value);
      }
      break;

    case GROUP_COMMIT_LOAD_TABLE_ID:
      if (value == null) {
        unsetGroupCommitLoadTableId();
      } else {
        setGroupCommitLoadTableId((java.lang.Long)value);
      }
      break;

    case CLUSTER:
      if (value == null) {
        unsetCluster();
      } else {
        setCluster((java.lang.String)value);
      }
      break;

    case UPDATE_LOAD_DATA:
      if (value == null) {
        unsetUpdateLoadData();
      } else {
        setUpdateLoadData((java.lang.Boolean)value);
      }
      break;

    case TABLE_ID:
      if (value == null) {
        unsetTableId();
      } else {
        setTableId((java.lang.Long)value);
      }
      break;

    case RECEIVE_DATA:
      if (value == null) {
        unsetReceiveData();
      } else {
        setReceiveData((java.lang.Long)value);
      }
      break;

    }
  }

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

    case GROUP_COMMIT_LOAD_TABLE_ID:
      return getGroupCommitLoadTableId();

    case CLUSTER:
      return getCluster();

    case UPDATE_LOAD_DATA:
      return isUpdateLoadData();

    case TABLE_ID:
      return getTableId();

    case RECEIVE_DATA:
      return getReceiveData();

    }
    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 GET_GROUP_COMMIT_LOAD_BE_ID:
      return isSetGetGroupCommitLoadBeId();
    case GROUP_COMMIT_LOAD_TABLE_ID:
      return isSetGroupCommitLoadTableId();
    case CLUSTER:
      return isSetCluster();
    case UPDATE_LOAD_DATA:
      return isSetUpdateLoadData();
    case TABLE_ID:
      return isSetTableId();
    case RECEIVE_DATA:
      return isSetReceiveData();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_getGroupCommitLoadBeId = true && this.isSetGetGroupCommitLoadBeId();
    boolean that_present_getGroupCommitLoadBeId = true && that.isSetGetGroupCommitLoadBeId();
    if (this_present_getGroupCommitLoadBeId || that_present_getGroupCommitLoadBeId) {
      if (!(this_present_getGroupCommitLoadBeId && that_present_getGroupCommitLoadBeId))
        return false;
      if (this.getGroupCommitLoadBeId != that.getGroupCommitLoadBeId)
        return false;
    }

    boolean this_present_groupCommitLoadTableId = true && this.isSetGroupCommitLoadTableId();
    boolean that_present_groupCommitLoadTableId = true && that.isSetGroupCommitLoadTableId();
    if (this_present_groupCommitLoadTableId || that_present_groupCommitLoadTableId) {
      if (!(this_present_groupCommitLoadTableId && that_present_groupCommitLoadTableId))
        return false;
      if (this.groupCommitLoadTableId != that.groupCommitLoadTableId)
        return false;
    }

    boolean this_present_cluster = true && this.isSetCluster();
    boolean that_present_cluster = true && that.isSetCluster();
    if (this_present_cluster || that_present_cluster) {
      if (!(this_present_cluster && that_present_cluster))
        return false;
      if (!this.cluster.equals(that.cluster))
        return false;
    }

    boolean this_present_updateLoadData = true && this.isSetUpdateLoadData();
    boolean that_present_updateLoadData = true && that.isSetUpdateLoadData();
    if (this_present_updateLoadData || that_present_updateLoadData) {
      if (!(this_present_updateLoadData && that_present_updateLoadData))
        return false;
      if (this.updateLoadData != that.updateLoadData)
        return false;
    }

    boolean this_present_tableId = true && this.isSetTableId();
    boolean that_present_tableId = true && that.isSetTableId();
    if (this_present_tableId || that_present_tableId) {
      if (!(this_present_tableId && that_present_tableId))
        return false;
      if (this.tableId != that.tableId)
        return false;
    }

    boolean this_present_receiveData = true && this.isSetReceiveData();
    boolean that_present_receiveData = true && that.isSetReceiveData();
    if (this_present_receiveData || that_present_receiveData) {
      if (!(this_present_receiveData && that_present_receiveData))
        return false;
      if (this.receiveData != that.receiveData)
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetGetGroupCommitLoadBeId()) ? 131071 : 524287);
    if (isSetGetGroupCommitLoadBeId())
      hashCode = hashCode * 8191 + ((getGroupCommitLoadBeId) ? 131071 : 524287);

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

    hashCode = hashCode * 8191 + ((isSetCluster()) ? 131071 : 524287);
    if (isSetCluster())
      hashCode = hashCode * 8191 + cluster.hashCode();

    hashCode = hashCode * 8191 + ((isSetUpdateLoadData()) ? 131071 : 524287);
    if (isSetUpdateLoadData())
      hashCode = hashCode * 8191 + ((updateLoadData) ? 131071 : 524287);

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

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

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetGetGroupCommitLoadBeId(), other.isSetGetGroupCommitLoadBeId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGetGroupCommitLoadBeId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.getGroupCommitLoadBeId, other.getGroupCommitLoadBeId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetGroupCommitLoadTableId(), other.isSetGroupCommitLoadTableId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGroupCommitLoadTableId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupCommitLoadTableId, other.groupCommitLoadTableId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetCluster(), other.isSetCluster());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCluster()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cluster, other.cluster);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUpdateLoadData(), other.isSetUpdateLoadData());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUpdateLoadData()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateLoadData, other.updateLoadData);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTableId(), other.isSetTableId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableId, other.tableId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReceiveData(), other.isSetReceiveData());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReceiveData()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.receiveData, other.receiveData);
      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("TGroupCommitInfo(");
    boolean first = true;

    if (isSetGetGroupCommitLoadBeId()) {
      sb.append("getGroupCommitLoadBeId:");
      sb.append(this.getGroupCommitLoadBeId);
      first = false;
    }
    if (isSetGroupCommitLoadTableId()) {
      if (!first) sb.append(", ");
      sb.append("groupCommitLoadTableId:");
      sb.append(this.groupCommitLoadTableId);
      first = false;
    }
    if (isSetCluster()) {
      if (!first) sb.append(", ");
      sb.append("cluster:");
      if (this.cluster == null) {
        sb.append("null");
      } else {
        sb.append(this.cluster);
      }
      first = false;
    }
    if (isSetUpdateLoadData()) {
      if (!first) sb.append(", ");
      sb.append("updateLoadData:");
      sb.append(this.updateLoadData);
      first = false;
    }
    if (isSetTableId()) {
      if (!first) sb.append(", ");
      sb.append("tableId:");
      sb.append(this.tableId);
      first = false;
    }
    if (isSetReceiveData()) {
      if (!first) sb.append(", ");
      sb.append("receiveData:");
      sb.append(this.receiveData);
      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 TGroupCommitInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TGroupCommitInfoStandardScheme getScheme() {
      return new TGroupCommitInfoStandardScheme();
    }
  }

  private static class TGroupCommitInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<TGroupCommitInfo> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TGroupCommitInfo 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: // GET_GROUP_COMMIT_LOAD_BE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.getGroupCommitLoadBeId = iprot.readBool();
              struct.setGetGroupCommitLoadBeIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // GROUP_COMMIT_LOAD_TABLE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.groupCommitLoadTableId = iprot.readI64();
              struct.setGroupCommitLoadTableIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // CLUSTER
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.cluster = iprot.readString();
              struct.setClusterIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // UPDATE_LOAD_DATA
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.updateLoadData = iprot.readBool();
              struct.setUpdateLoadDataIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // TABLE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.tableId = iprot.readI64();
              struct.setTableIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // RECEIVE_DATA
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.receiveData = iprot.readI64();
              struct.setReceiveDataIsSet(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, TGroupCommitInfo struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.isSetGetGroupCommitLoadBeId()) {
        oprot.writeFieldBegin(GET_GROUP_COMMIT_LOAD_BE_ID_FIELD_DESC);
        oprot.writeBool(struct.getGroupCommitLoadBeId);
        oprot.writeFieldEnd();
      }
      if (struct.isSetGroupCommitLoadTableId()) {
        oprot.writeFieldBegin(GROUP_COMMIT_LOAD_TABLE_ID_FIELD_DESC);
        oprot.writeI64(struct.groupCommitLoadTableId);
        oprot.writeFieldEnd();
      }
      if (struct.cluster != null) {
        if (struct.isSetCluster()) {
          oprot.writeFieldBegin(CLUSTER_FIELD_DESC);
          oprot.writeString(struct.cluster);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetUpdateLoadData()) {
        oprot.writeFieldBegin(UPDATE_LOAD_DATA_FIELD_DESC);
        oprot.writeBool(struct.updateLoadData);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTableId()) {
        oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
        oprot.writeI64(struct.tableId);
        oprot.writeFieldEnd();
      }
      if (struct.isSetReceiveData()) {
        oprot.writeFieldBegin(RECEIVE_DATA_FIELD_DESC);
        oprot.writeI64(struct.receiveData);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TGroupCommitInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<TGroupCommitInfo> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TGroupCommitInfo 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.isSetGetGroupCommitLoadBeId()) {
        optionals.set(0);
      }
      if (struct.isSetGroupCommitLoadTableId()) {
        optionals.set(1);
      }
      if (struct.isSetCluster()) {
        optionals.set(2);
      }
      if (struct.isSetUpdateLoadData()) {
        optionals.set(3);
      }
      if (struct.isSetTableId()) {
        optionals.set(4);
      }
      if (struct.isSetReceiveData()) {
        optionals.set(5);
      }
      oprot.writeBitSet(optionals, 6);
      if (struct.isSetGetGroupCommitLoadBeId()) {
        oprot.writeBool(struct.getGroupCommitLoadBeId);
      }
      if (struct.isSetGroupCommitLoadTableId()) {
        oprot.writeI64(struct.groupCommitLoadTableId);
      }
      if (struct.isSetCluster()) {
        oprot.writeString(struct.cluster);
      }
      if (struct.isSetUpdateLoadData()) {
        oprot.writeBool(struct.updateLoadData);
      }
      if (struct.isSetTableId()) {
        oprot.writeI64(struct.tableId);
      }
      if (struct.isSetReceiveData()) {
        oprot.writeI64(struct.receiveData);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TGroupCommitInfo struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(6);
      if (incoming.get(0)) {
        struct.getGroupCommitLoadBeId = iprot.readBool();
        struct.setGetGroupCommitLoadBeIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.groupCommitLoadTableId = iprot.readI64();
        struct.setGroupCommitLoadTableIdIsSet(true);
      }
      if (incoming.get(2)) {
        struct.cluster = iprot.readString();
        struct.setClusterIsSet(true);
      }
      if (incoming.get(3)) {
        struct.updateLoadData = iprot.readBool();
        struct.setUpdateLoadDataIsSet(true);
      }
      if (incoming.get(4)) {
        struct.tableId = iprot.readI64();
        struct.setTableIdIsSet(true);
      }
      if (incoming.get(5)) {
        struct.receiveData = iprot.readI64();
        struct.setReceiveDataIsSet(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();
  }
}