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

  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)1);
  private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField PASSWD_FIELD_DESC = new org.apache.thrift.protocol.TField("passwd", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField TBL_FIELD_DESC = new org.apache.thrift.protocol.TField("tbl", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField USER_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("user_ip", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField LABEL_FIELD_DESC = new org.apache.thrift.protocol.TField("label", org.apache.thrift.protocol.TType.STRING, (short)7);
  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)8);
  private static final org.apache.thrift.protocol.TField AUTH_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("auth_code", org.apache.thrift.protocol.TType.I64, (short)9);
  private static final org.apache.thrift.protocol.TField TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("timeout", org.apache.thrift.protocol.TType.I64, (short)10);
  private static final org.apache.thrift.protocol.TField REQUEST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("request_id", org.apache.thrift.protocol.TType.STRUCT, (short)11);
  private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)12);
  private static final org.apache.thrift.protocol.TField AUTH_CODE_UUID_FIELD_DESC = new org.apache.thrift.protocol.TField("auth_code_uuid", org.apache.thrift.protocol.TType.STRING, (short)13);
  private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("table_id", org.apache.thrift.protocol.TType.I64, (short)14);
  private static final org.apache.thrift.protocol.TField BACKEND_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("backend_id", org.apache.thrift.protocol.TType.I64, (short)15);
  private static final org.apache.thrift.protocol.TField CERT_BASED_AUTH_FIELD_DESC = new org.apache.thrift.protocol.TField("cert_based_auth", org.apache.thrift.protocol.TType.STRUCT, (short)16);
  private static final org.apache.thrift.protocol.TField USE_TABLE_GROUP_COMMIT_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("use_table_group_commit_mode", org.apache.thrift.protocol.TType.BOOL, (short)17);

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

  public @org.apache.thrift.annotation.Nullable java.lang.String cluster; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String user; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String passwd; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String db; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String tbl; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String user_ip; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String label; // required
  public long timestamp; // optional
  public long auth_code; // optional
  public long timeout; // optional
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TUniqueId request_id; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String token; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String auth_code_uuid; // optional
  public long table_id; // optional
  public long backend_id; // optional
  public @org.apache.thrift.annotation.Nullable TCertBasedAuth cert_based_auth; // optional
  public boolean use_table_group_commit_mode; // 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 {
    CLUSTER((short)1, "cluster"),
    USER((short)2, "user"),
    PASSWD((short)3, "passwd"),
    DB((short)4, "db"),
    TBL((short)5, "tbl"),
    USER_IP((short)6, "user_ip"),
    LABEL((short)7, "label"),
    TIMESTAMP((short)8, "timestamp"),
    AUTH_CODE((short)9, "auth_code"),
    TIMEOUT((short)10, "timeout"),
    REQUEST_ID((short)11, "request_id"),
    TOKEN((short)12, "token"),
    AUTH_CODE_UUID((short)13, "auth_code_uuid"),
    TABLE_ID((short)14, "table_id"),
    BACKEND_ID((short)15, "backend_id"),
    CERT_BASED_AUTH((short)16, "cert_based_auth"),
    USE_TABLE_GROUP_COMMIT_MODE((short)17, "use_table_group_commit_mode");

    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: // CLUSTER
          return CLUSTER;
        case 2: // USER
          return USER;
        case 3: // PASSWD
          return PASSWD;
        case 4: // DB
          return DB;
        case 5: // TBL
          return TBL;
        case 6: // USER_IP
          return USER_IP;
        case 7: // LABEL
          return LABEL;
        case 8: // TIMESTAMP
          return TIMESTAMP;
        case 9: // AUTH_CODE
          return AUTH_CODE;
        case 10: // TIMEOUT
          return TIMEOUT;
        case 11: // REQUEST_ID
          return REQUEST_ID;
        case 12: // TOKEN
          return TOKEN;
        case 13: // AUTH_CODE_UUID
          return AUTH_CODE_UUID;
        case 14: // TABLE_ID
          return TABLE_ID;
        case 15: // BACKEND_ID
          return BACKEND_ID;
        case 16: // CERT_BASED_AUTH
          return CERT_BASED_AUTH;
        case 17: // USE_TABLE_GROUP_COMMIT_MODE
          return USE_TABLE_GROUP_COMMIT_MODE;
        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 __TIMESTAMP_ISSET_ID = 0;
  private static final int __AUTH_CODE_ISSET_ID = 1;
  private static final int __TIMEOUT_ISSET_ID = 2;
  private static final int __TABLE_ID_ISSET_ID = 3;
  private static final int __BACKEND_ID_ISSET_ID = 4;
  private static final int __USE_TABLE_GROUP_COMMIT_MODE_ISSET_ID = 5;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.CLUSTER,_Fields.USER_IP,_Fields.TIMESTAMP,_Fields.AUTH_CODE,_Fields.TIMEOUT,_Fields.REQUEST_ID,_Fields.TOKEN,_Fields.AUTH_CODE_UUID,_Fields.TABLE_ID,_Fields.BACKEND_ID,_Fields.CERT_BASED_AUTH,_Fields.USE_TABLE_GROUP_COMMIT_MODE};
  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.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.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PASSWD, new org.apache.thrift.meta_data.FieldMetaData("passwd", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TBL, new org.apache.thrift.meta_data.FieldMetaData("tbl", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.USER_IP, new org.apache.thrift.meta_data.FieldMetaData("user_ip", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.LABEL, new org.apache.thrift.meta_data.FieldMetaData("label", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    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.AUTH_CODE, new org.apache.thrift.meta_data.FieldMetaData("auth_code", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData("request_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TUniqueId.class)));
    tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.AUTH_CODE_UUID, new org.apache.thrift.meta_data.FieldMetaData("auth_code_uuid", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("table_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.BACKEND_ID, new org.apache.thrift.meta_data.FieldMetaData("backend_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.CERT_BASED_AUTH, new org.apache.thrift.meta_data.FieldMetaData("cert_based_auth", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCertBasedAuth.class)));
    tmpMap.put(_Fields.USE_TABLE_GROUP_COMMIT_MODE, new org.apache.thrift.meta_data.FieldMetaData("use_table_group_commit_mode", 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(TLoadTxnBeginRequest.class, metaDataMap);
  }

  public TLoadTxnBeginRequest() {
  }

  public TLoadTxnBeginRequest(
    java.lang.String user,
    java.lang.String passwd,
    java.lang.String db,
    java.lang.String tbl,
    java.lang.String label)
  {
    this();
    this.user = user;
    this.passwd = passwd;
    this.db = db;
    this.tbl = tbl;
    this.label = label;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TLoadTxnBeginRequest(TLoadTxnBeginRequest other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetCluster()) {
      this.cluster = other.cluster;
    }
    if (other.isSetUser()) {
      this.user = other.user;
    }
    if (other.isSetPasswd()) {
      this.passwd = other.passwd;
    }
    if (other.isSetDb()) {
      this.db = other.db;
    }
    if (other.isSetTbl()) {
      this.tbl = other.tbl;
    }
    if (other.isSetUserIp()) {
      this.user_ip = other.user_ip;
    }
    if (other.isSetLabel()) {
      this.label = other.label;
    }
    this.timestamp = other.timestamp;
    this.auth_code = other.auth_code;
    this.timeout = other.timeout;
    if (other.isSetRequestId()) {
      this.request_id = new org.apache.doris.thrift.TUniqueId(other.request_id);
    }
    if (other.isSetToken()) {
      this.token = other.token;
    }
    if (other.isSetAuthCodeUuid()) {
      this.auth_code_uuid = other.auth_code_uuid;
    }
    this.table_id = other.table_id;
    this.backend_id = other.backend_id;
    if (other.isSetCertBasedAuth()) {
      this.cert_based_auth = new TCertBasedAuth(other.cert_based_auth);
    }
    this.use_table_group_commit_mode = other.use_table_group_commit_mode;
  }

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

  @Override
  public void clear() {
    this.cluster = null;
    this.user = null;
    this.passwd = null;
    this.db = null;
    this.tbl = null;
    this.user_ip = null;
    this.label = null;
    setTimestampIsSet(false);
    this.timestamp = 0;
    setAuthCodeIsSet(false);
    this.auth_code = 0;
    setTimeoutIsSet(false);
    this.timeout = 0;
    this.request_id = null;
    this.token = null;
    this.auth_code_uuid = null;
    setTableIdIsSet(false);
    this.table_id = 0;
    setBackendIdIsSet(false);
    this.backend_id = 0;
    this.cert_based_auth = null;
    setUseTableGroupCommitModeIsSet(false);
    this.use_table_group_commit_mode = false;
  }

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

  public TLoadTxnBeginRequest 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;
    }
  }

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

  public TLoadTxnBeginRequest setUser(@org.apache.thrift.annotation.Nullable java.lang.String user) {
    this.user = user;
    return this;
  }

  public void unsetUser() {
    this.user = null;
  }

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

  public void setUserIsSet(boolean value) {
    if (!value) {
      this.user = null;
    }
  }

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

  public TLoadTxnBeginRequest setPasswd(@org.apache.thrift.annotation.Nullable java.lang.String passwd) {
    this.passwd = passwd;
    return this;
  }

  public void unsetPasswd() {
    this.passwd = null;
  }

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

  public void setPasswdIsSet(boolean value) {
    if (!value) {
      this.passwd = null;
    }
  }

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

  public TLoadTxnBeginRequest setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
    this.db = db;
    return this;
  }

  public void unsetDb() {
    this.db = null;
  }

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

  public void setDbIsSet(boolean value) {
    if (!value) {
      this.db = null;
    }
  }

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

  public TLoadTxnBeginRequest setTbl(@org.apache.thrift.annotation.Nullable java.lang.String tbl) {
    this.tbl = tbl;
    return this;
  }

  public void unsetTbl() {
    this.tbl = null;
  }

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

  public void setTblIsSet(boolean value) {
    if (!value) {
      this.tbl = null;
    }
  }

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

  public TLoadTxnBeginRequest setUserIp(@org.apache.thrift.annotation.Nullable java.lang.String user_ip) {
    this.user_ip = user_ip;
    return this;
  }

  public void unsetUserIp() {
    this.user_ip = null;
  }

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

  public void setUserIpIsSet(boolean value) {
    if (!value) {
      this.user_ip = null;
    }
  }

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

  public TLoadTxnBeginRequest setLabel(@org.apache.thrift.annotation.Nullable java.lang.String label) {
    this.label = label;
    return this;
  }

  public void unsetLabel() {
    this.label = null;
  }

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

  public void setLabelIsSet(boolean value) {
    if (!value) {
      this.label = null;
    }
  }

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

  public TLoadTxnBeginRequest 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);
  }

  public long getAuthCode() {
    return this.auth_code;
  }

  public TLoadTxnBeginRequest setAuthCode(long auth_code) {
    this.auth_code = auth_code;
    setAuthCodeIsSet(true);
    return this;
  }

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

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

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

  public long getTimeout() {
    return this.timeout;
  }

  public TLoadTxnBeginRequest setTimeout(long timeout) {
    this.timeout = timeout;
    setTimeoutIsSet(true);
    return this;
  }

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

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

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

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TUniqueId getRequestId() {
    return this.request_id;
  }

  public TLoadTxnBeginRequest setRequestId(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TUniqueId request_id) {
    this.request_id = request_id;
    return this;
  }

  public void unsetRequestId() {
    this.request_id = null;
  }

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

  public void setRequestIdIsSet(boolean value) {
    if (!value) {
      this.request_id = null;
    }
  }

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

  public TLoadTxnBeginRequest setToken(@org.apache.thrift.annotation.Nullable java.lang.String token) {
    this.token = token;
    return this;
  }

  public void unsetToken() {
    this.token = null;
  }

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

  public void setTokenIsSet(boolean value) {
    if (!value) {
      this.token = null;
    }
  }

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

  public TLoadTxnBeginRequest setAuthCodeUuid(@org.apache.thrift.annotation.Nullable java.lang.String auth_code_uuid) {
    this.auth_code_uuid = auth_code_uuid;
    return this;
  }

  public void unsetAuthCodeUuid() {
    this.auth_code_uuid = null;
  }

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

  public void setAuthCodeUuidIsSet(boolean value) {
    if (!value) {
      this.auth_code_uuid = null;
    }
  }

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

  public TLoadTxnBeginRequest setTableId(long table_id) {
    this.table_id = table_id;
    setTableIdIsSet(true);
    return this;
  }

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

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

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

  public long getBackendId() {
    return this.backend_id;
  }

  public TLoadTxnBeginRequest setBackendId(long backend_id) {
    this.backend_id = backend_id;
    setBackendIdIsSet(true);
    return this;
  }

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

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

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

  @org.apache.thrift.annotation.Nullable
  public TCertBasedAuth getCertBasedAuth() {
    return this.cert_based_auth;
  }

  public TLoadTxnBeginRequest setCertBasedAuth(@org.apache.thrift.annotation.Nullable TCertBasedAuth cert_based_auth) {
    this.cert_based_auth = cert_based_auth;
    return this;
  }

  public void unsetCertBasedAuth() {
    this.cert_based_auth = null;
  }

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

  public void setCertBasedAuthIsSet(boolean value) {
    if (!value) {
      this.cert_based_auth = null;
    }
  }

  public boolean isUseTableGroupCommitMode() {
    return this.use_table_group_commit_mode;
  }

  public TLoadTxnBeginRequest setUseTableGroupCommitMode(boolean use_table_group_commit_mode) {
    this.use_table_group_commit_mode = use_table_group_commit_mode;
    setUseTableGroupCommitModeIsSet(true);
    return this;
  }

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

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

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

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case CLUSTER:
      if (value == null) {
        unsetCluster();
      } else {
        setCluster((java.lang.String)value);
      }
      break;

    case USER:
      if (value == null) {
        unsetUser();
      } else {
        setUser((java.lang.String)value);
      }
      break;

    case PASSWD:
      if (value == null) {
        unsetPasswd();
      } else {
        setPasswd((java.lang.String)value);
      }
      break;

    case DB:
      if (value == null) {
        unsetDb();
      } else {
        setDb((java.lang.String)value);
      }
      break;

    case TBL:
      if (value == null) {
        unsetTbl();
      } else {
        setTbl((java.lang.String)value);
      }
      break;

    case USER_IP:
      if (value == null) {
        unsetUserIp();
      } else {
        setUserIp((java.lang.String)value);
      }
      break;

    case LABEL:
      if (value == null) {
        unsetLabel();
      } else {
        setLabel((java.lang.String)value);
      }
      break;

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

    case AUTH_CODE:
      if (value == null) {
        unsetAuthCode();
      } else {
        setAuthCode((java.lang.Long)value);
      }
      break;

    case TIMEOUT:
      if (value == null) {
        unsetTimeout();
      } else {
        setTimeout((java.lang.Long)value);
      }
      break;

    case REQUEST_ID:
      if (value == null) {
        unsetRequestId();
      } else {
        setRequestId((org.apache.doris.thrift.TUniqueId)value);
      }
      break;

    case TOKEN:
      if (value == null) {
        unsetToken();
      } else {
        setToken((java.lang.String)value);
      }
      break;

    case AUTH_CODE_UUID:
      if (value == null) {
        unsetAuthCodeUuid();
      } else {
        setAuthCodeUuid((java.lang.String)value);
      }
      break;

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

    case BACKEND_ID:
      if (value == null) {
        unsetBackendId();
      } else {
        setBackendId((java.lang.Long)value);
      }
      break;

    case CERT_BASED_AUTH:
      if (value == null) {
        unsetCertBasedAuth();
      } else {
        setCertBasedAuth((TCertBasedAuth)value);
      }
      break;

    case USE_TABLE_GROUP_COMMIT_MODE:
      if (value == null) {
        unsetUseTableGroupCommitMode();
      } else {
        setUseTableGroupCommitMode((java.lang.Boolean)value);
      }
      break;

    }
  }

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

    case USER:
      return getUser();

    case PASSWD:
      return getPasswd();

    case DB:
      return getDb();

    case TBL:
      return getTbl();

    case USER_IP:
      return getUserIp();

    case LABEL:
      return getLabel();

    case TIMESTAMP:
      return getTimestamp();

    case AUTH_CODE:
      return getAuthCode();

    case TIMEOUT:
      return getTimeout();

    case REQUEST_ID:
      return getRequestId();

    case TOKEN:
      return getToken();

    case AUTH_CODE_UUID:
      return getAuthCodeUuid();

    case TABLE_ID:
      return getTableId();

    case BACKEND_ID:
      return getBackendId();

    case CERT_BASED_AUTH:
      return getCertBasedAuth();

    case USE_TABLE_GROUP_COMMIT_MODE:
      return isUseTableGroupCommitMode();

    }
    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 CLUSTER:
      return isSetCluster();
    case USER:
      return isSetUser();
    case PASSWD:
      return isSetPasswd();
    case DB:
      return isSetDb();
    case TBL:
      return isSetTbl();
    case USER_IP:
      return isSetUserIp();
    case LABEL:
      return isSetLabel();
    case TIMESTAMP:
      return isSetTimestamp();
    case AUTH_CODE:
      return isSetAuthCode();
    case TIMEOUT:
      return isSetTimeout();
    case REQUEST_ID:
      return isSetRequestId();
    case TOKEN:
      return isSetToken();
    case AUTH_CODE_UUID:
      return isSetAuthCodeUuid();
    case TABLE_ID:
      return isSetTableId();
    case BACKEND_ID:
      return isSetBackendId();
    case CERT_BASED_AUTH:
      return isSetCertBasedAuth();
    case USE_TABLE_GROUP_COMMIT_MODE:
      return isSetUseTableGroupCommitMode();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    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_user = true && this.isSetUser();
    boolean that_present_user = true && that.isSetUser();
    if (this_present_user || that_present_user) {
      if (!(this_present_user && that_present_user))
        return false;
      if (!this.user.equals(that.user))
        return false;
    }

    boolean this_present_passwd = true && this.isSetPasswd();
    boolean that_present_passwd = true && that.isSetPasswd();
    if (this_present_passwd || that_present_passwd) {
      if (!(this_present_passwd && that_present_passwd))
        return false;
      if (!this.passwd.equals(that.passwd))
        return false;
    }

    boolean this_present_db = true && this.isSetDb();
    boolean that_present_db = true && that.isSetDb();
    if (this_present_db || that_present_db) {
      if (!(this_present_db && that_present_db))
        return false;
      if (!this.db.equals(that.db))
        return false;
    }

    boolean this_present_tbl = true && this.isSetTbl();
    boolean that_present_tbl = true && that.isSetTbl();
    if (this_present_tbl || that_present_tbl) {
      if (!(this_present_tbl && that_present_tbl))
        return false;
      if (!this.tbl.equals(that.tbl))
        return false;
    }

    boolean this_present_user_ip = true && this.isSetUserIp();
    boolean that_present_user_ip = true && that.isSetUserIp();
    if (this_present_user_ip || that_present_user_ip) {
      if (!(this_present_user_ip && that_present_user_ip))
        return false;
      if (!this.user_ip.equals(that.user_ip))
        return false;
    }

    boolean this_present_label = true && this.isSetLabel();
    boolean that_present_label = true && that.isSetLabel();
    if (this_present_label || that_present_label) {
      if (!(this_present_label && that_present_label))
        return false;
      if (!this.label.equals(that.label))
        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_auth_code = true && this.isSetAuthCode();
    boolean that_present_auth_code = true && that.isSetAuthCode();
    if (this_present_auth_code || that_present_auth_code) {
      if (!(this_present_auth_code && that_present_auth_code))
        return false;
      if (this.auth_code != that.auth_code)
        return false;
    }

    boolean this_present_timeout = true && this.isSetTimeout();
    boolean that_present_timeout = true && that.isSetTimeout();
    if (this_present_timeout || that_present_timeout) {
      if (!(this_present_timeout && that_present_timeout))
        return false;
      if (this.timeout != that.timeout)
        return false;
    }

    boolean this_present_request_id = true && this.isSetRequestId();
    boolean that_present_request_id = true && that.isSetRequestId();
    if (this_present_request_id || that_present_request_id) {
      if (!(this_present_request_id && that_present_request_id))
        return false;
      if (!this.request_id.equals(that.request_id))
        return false;
    }

    boolean this_present_token = true && this.isSetToken();
    boolean that_present_token = true && that.isSetToken();
    if (this_present_token || that_present_token) {
      if (!(this_present_token && that_present_token))
        return false;
      if (!this.token.equals(that.token))
        return false;
    }

    boolean this_present_auth_code_uuid = true && this.isSetAuthCodeUuid();
    boolean that_present_auth_code_uuid = true && that.isSetAuthCodeUuid();
    if (this_present_auth_code_uuid || that_present_auth_code_uuid) {
      if (!(this_present_auth_code_uuid && that_present_auth_code_uuid))
        return false;
      if (!this.auth_code_uuid.equals(that.auth_code_uuid))
        return false;
    }

    boolean this_present_table_id = true && this.isSetTableId();
    boolean that_present_table_id = true && that.isSetTableId();
    if (this_present_table_id || that_present_table_id) {
      if (!(this_present_table_id && that_present_table_id))
        return false;
      if (this.table_id != that.table_id)
        return false;
    }

    boolean this_present_backend_id = true && this.isSetBackendId();
    boolean that_present_backend_id = true && that.isSetBackendId();
    if (this_present_backend_id || that_present_backend_id) {
      if (!(this_present_backend_id && that_present_backend_id))
        return false;
      if (this.backend_id != that.backend_id)
        return false;
    }

    boolean this_present_cert_based_auth = true && this.isSetCertBasedAuth();
    boolean that_present_cert_based_auth = true && that.isSetCertBasedAuth();
    if (this_present_cert_based_auth || that_present_cert_based_auth) {
      if (!(this_present_cert_based_auth && that_present_cert_based_auth))
        return false;
      if (!this.cert_based_auth.equals(that.cert_based_auth))
        return false;
    }

    boolean this_present_use_table_group_commit_mode = true && this.isSetUseTableGroupCommitMode();
    boolean that_present_use_table_group_commit_mode = true && that.isSetUseTableGroupCommitMode();
    if (this_present_use_table_group_commit_mode || that_present_use_table_group_commit_mode) {
      if (!(this_present_use_table_group_commit_mode && that_present_use_table_group_commit_mode))
        return false;
      if (this.use_table_group_commit_mode != that.use_table_group_commit_mode)
        return false;
    }

    return true;
  }

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

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

    hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287);
    if (isSetUser())
      hashCode = hashCode * 8191 + user.hashCode();

    hashCode = hashCode * 8191 + ((isSetPasswd()) ? 131071 : 524287);
    if (isSetPasswd())
      hashCode = hashCode * 8191 + passwd.hashCode();

    hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
    if (isSetDb())
      hashCode = hashCode * 8191 + db.hashCode();

    hashCode = hashCode * 8191 + ((isSetTbl()) ? 131071 : 524287);
    if (isSetTbl())
      hashCode = hashCode * 8191 + tbl.hashCode();

    hashCode = hashCode * 8191 + ((isSetUserIp()) ? 131071 : 524287);
    if (isSetUserIp())
      hashCode = hashCode * 8191 + user_ip.hashCode();

    hashCode = hashCode * 8191 + ((isSetLabel()) ? 131071 : 524287);
    if (isSetLabel())
      hashCode = hashCode * 8191 + label.hashCode();

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

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

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

    hashCode = hashCode * 8191 + ((isSetRequestId()) ? 131071 : 524287);
    if (isSetRequestId())
      hashCode = hashCode * 8191 + request_id.hashCode();

    hashCode = hashCode * 8191 + ((isSetToken()) ? 131071 : 524287);
    if (isSetToken())
      hashCode = hashCode * 8191 + token.hashCode();

    hashCode = hashCode * 8191 + ((isSetAuthCodeUuid()) ? 131071 : 524287);
    if (isSetAuthCodeUuid())
      hashCode = hashCode * 8191 + auth_code_uuid.hashCode();

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

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

    hashCode = hashCode * 8191 + ((isSetCertBasedAuth()) ? 131071 : 524287);
    if (isSetCertBasedAuth())
      hashCode = hashCode * 8191 + cert_based_auth.hashCode();

    hashCode = hashCode * 8191 + ((isSetUseTableGroupCommitMode()) ? 131071 : 524287);
    if (isSetUseTableGroupCommitMode())
      hashCode = hashCode * 8191 + ((use_table_group_commit_mode) ? 131071 : 524287);

    return hashCode;
  }

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

    int lastComparison = 0;

    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(isSetUser(), other.isSetUser());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUser()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPasswd(), other.isSetPasswd());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPasswd()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passwd, other.passwd);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDb(), other.isSetDb());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDb()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTbl(), other.isSetTbl());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTbl()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, other.tbl);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUserIp(), other.isSetUserIp());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUserIp()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user_ip, other.user_ip);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLabel(), other.isSetLabel());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLabel()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label, other.label);
      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(isSetAuthCode(), other.isSetAuthCode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAuthCode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.auth_code, other.auth_code);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTimeout(), other.isSetTimeout());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTimeout()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeout, other.timeout);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetRequestId(), other.isSetRequestId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRequestId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request_id, other.request_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetToken(), other.isSetToken());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetToken()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetAuthCodeUuid(), other.isSetAuthCodeUuid());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAuthCodeUuid()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.auth_code_uuid, other.auth_code_uuid);
      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.table_id, other.table_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBackendId(), other.isSetBackendId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBackendId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.backend_id, other.backend_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetCertBasedAuth(), other.isSetCertBasedAuth());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCertBasedAuth()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cert_based_auth, other.cert_based_auth);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUseTableGroupCommitMode(), other.isSetUseTableGroupCommitMode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUseTableGroupCommitMode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.use_table_group_commit_mode, other.use_table_group_commit_mode);
      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("TLoadTxnBeginRequest(");
    boolean first = true;

    if (isSetCluster()) {
      sb.append("cluster:");
      if (this.cluster == null) {
        sb.append("null");
      } else {
        sb.append(this.cluster);
      }
      first = false;
    }
    if (!first) sb.append(", ");
    sb.append("user:");
    if (this.user == null) {
      sb.append("null");
    } else {
      sb.append(this.user);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("passwd:");
    if (this.passwd == null) {
      sb.append("null");
    } else {
      sb.append(this.passwd);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("db:");
    if (this.db == null) {
      sb.append("null");
    } else {
      sb.append(this.db);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("tbl:");
    if (this.tbl == null) {
      sb.append("null");
    } else {
      sb.append(this.tbl);
    }
    first = false;
    if (isSetUserIp()) {
      if (!first) sb.append(", ");
      sb.append("user_ip:");
      if (this.user_ip == null) {
        sb.append("null");
      } else {
        sb.append(this.user_ip);
      }
      first = false;
    }
    if (!first) sb.append(", ");
    sb.append("label:");
    if (this.label == null) {
      sb.append("null");
    } else {
      sb.append(this.label);
    }
    first = false;
    if (isSetTimestamp()) {
      if (!first) sb.append(", ");
      sb.append("timestamp:");
      sb.append(this.timestamp);
      first = false;
    }
    if (isSetAuthCode()) {
      if (!first) sb.append(", ");
      sb.append("auth_code:");
      sb.append(this.auth_code);
      first = false;
    }
    if (isSetTimeout()) {
      if (!first) sb.append(", ");
      sb.append("timeout:");
      sb.append(this.timeout);
      first = false;
    }
    if (isSetRequestId()) {
      if (!first) sb.append(", ");
      sb.append("request_id:");
      if (this.request_id == null) {
        sb.append("null");
      } else {
        sb.append(this.request_id);
      }
      first = false;
    }
    if (isSetToken()) {
      if (!first) sb.append(", ");
      sb.append("token:");
      if (this.token == null) {
        sb.append("null");
      } else {
        sb.append(this.token);
      }
      first = false;
    }
    if (isSetAuthCodeUuid()) {
      if (!first) sb.append(", ");
      sb.append("auth_code_uuid:");
      if (this.auth_code_uuid == null) {
        sb.append("null");
      } else {
        sb.append(this.auth_code_uuid);
      }
      first = false;
    }
    if (isSetTableId()) {
      if (!first) sb.append(", ");
      sb.append("table_id:");
      sb.append(this.table_id);
      first = false;
    }
    if (isSetBackendId()) {
      if (!first) sb.append(", ");
      sb.append("backend_id:");
      sb.append(this.backend_id);
      first = false;
    }
    if (isSetCertBasedAuth()) {
      if (!first) sb.append(", ");
      sb.append("cert_based_auth:");
      if (this.cert_based_auth == null) {
        sb.append("null");
      } else {
        sb.append(this.cert_based_auth);
      }
      first = false;
    }
    if (isSetUseTableGroupCommitMode()) {
      if (!first) sb.append(", ");
      sb.append("use_table_group_commit_mode:");
      sb.append(this.use_table_group_commit_mode);
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (user == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'user' was not present! Struct: " + toString());
    }
    if (passwd == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'passwd' was not present! Struct: " + toString());
    }
    if (db == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'db' was not present! Struct: " + toString());
    }
    if (tbl == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'tbl' was not present! Struct: " + toString());
    }
    if (label == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'label' was not present! Struct: " + toString());
    }
    // check for sub-struct validity
    if (request_id != null) {
      request_id.validate();
    }
    if (cert_based_auth != null) {
      cert_based_auth.validate();
    }
  }

  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 TLoadTxnBeginRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TLoadTxnBeginRequestStandardScheme getScheme() {
      return new TLoadTxnBeginRequestStandardScheme();
    }
  }

  private static class TLoadTxnBeginRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<TLoadTxnBeginRequest> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TLoadTxnBeginRequest 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: // 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 2: // USER
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.user = iprot.readString();
              struct.setUserIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // PASSWD
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.passwd = iprot.readString();
              struct.setPasswdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // DB
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.db = iprot.readString();
              struct.setDbIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // TBL
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.tbl = iprot.readString();
              struct.setTblIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // USER_IP
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.user_ip = iprot.readString();
              struct.setUserIpIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // LABEL
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.label = iprot.readString();
              struct.setLabelIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // 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 9: // AUTH_CODE
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.auth_code = iprot.readI64();
              struct.setAuthCodeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // TIMEOUT
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.timeout = iprot.readI64();
              struct.setTimeoutIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // REQUEST_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.request_id = new org.apache.doris.thrift.TUniqueId();
              struct.request_id.read(iprot);
              struct.setRequestIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // TOKEN
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.token = iprot.readString();
              struct.setTokenIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // AUTH_CODE_UUID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.auth_code_uuid = iprot.readString();
              struct.setAuthCodeUuidIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 14: // TABLE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.table_id = iprot.readI64();
              struct.setTableIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 15: // BACKEND_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.backend_id = iprot.readI64();
              struct.setBackendIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 16: // CERT_BASED_AUTH
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.cert_based_auth = new TCertBasedAuth();
              struct.cert_based_auth.read(iprot);
              struct.setCertBasedAuthIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 17: // USE_TABLE_GROUP_COMMIT_MODE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.use_table_group_commit_mode = iprot.readBool();
              struct.setUseTableGroupCommitModeIsSet(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, TLoadTxnBeginRequest struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.cluster != null) {
        if (struct.isSetCluster()) {
          oprot.writeFieldBegin(CLUSTER_FIELD_DESC);
          oprot.writeString(struct.cluster);
          oprot.writeFieldEnd();
        }
      }
      if (struct.user != null) {
        oprot.writeFieldBegin(USER_FIELD_DESC);
        oprot.writeString(struct.user);
        oprot.writeFieldEnd();
      }
      if (struct.passwd != null) {
        oprot.writeFieldBegin(PASSWD_FIELD_DESC);
        oprot.writeString(struct.passwd);
        oprot.writeFieldEnd();
      }
      if (struct.db != null) {
        oprot.writeFieldBegin(DB_FIELD_DESC);
        oprot.writeString(struct.db);
        oprot.writeFieldEnd();
      }
      if (struct.tbl != null) {
        oprot.writeFieldBegin(TBL_FIELD_DESC);
        oprot.writeString(struct.tbl);
        oprot.writeFieldEnd();
      }
      if (struct.user_ip != null) {
        if (struct.isSetUserIp()) {
          oprot.writeFieldBegin(USER_IP_FIELD_DESC);
          oprot.writeString(struct.user_ip);
          oprot.writeFieldEnd();
        }
      }
      if (struct.label != null) {
        oprot.writeFieldBegin(LABEL_FIELD_DESC);
        oprot.writeString(struct.label);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTimestamp()) {
        oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
        oprot.writeI64(struct.timestamp);
        oprot.writeFieldEnd();
      }
      if (struct.isSetAuthCode()) {
        oprot.writeFieldBegin(AUTH_CODE_FIELD_DESC);
        oprot.writeI64(struct.auth_code);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTimeout()) {
        oprot.writeFieldBegin(TIMEOUT_FIELD_DESC);
        oprot.writeI64(struct.timeout);
        oprot.writeFieldEnd();
      }
      if (struct.request_id != null) {
        if (struct.isSetRequestId()) {
          oprot.writeFieldBegin(REQUEST_ID_FIELD_DESC);
          struct.request_id.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.token != null) {
        if (struct.isSetToken()) {
          oprot.writeFieldBegin(TOKEN_FIELD_DESC);
          oprot.writeString(struct.token);
          oprot.writeFieldEnd();
        }
      }
      if (struct.auth_code_uuid != null) {
        if (struct.isSetAuthCodeUuid()) {
          oprot.writeFieldBegin(AUTH_CODE_UUID_FIELD_DESC);
          oprot.writeString(struct.auth_code_uuid);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetTableId()) {
        oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
        oprot.writeI64(struct.table_id);
        oprot.writeFieldEnd();
      }
      if (struct.isSetBackendId()) {
        oprot.writeFieldBegin(BACKEND_ID_FIELD_DESC);
        oprot.writeI64(struct.backend_id);
        oprot.writeFieldEnd();
      }
      if (struct.cert_based_auth != null) {
        if (struct.isSetCertBasedAuth()) {
          oprot.writeFieldBegin(CERT_BASED_AUTH_FIELD_DESC);
          struct.cert_based_auth.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetUseTableGroupCommitMode()) {
        oprot.writeFieldBegin(USE_TABLE_GROUP_COMMIT_MODE_FIELD_DESC);
        oprot.writeBool(struct.use_table_group_commit_mode);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TLoadTxnBeginRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<TLoadTxnBeginRequest> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TLoadTxnBeginRequest struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeString(struct.user);
      oprot.writeString(struct.passwd);
      oprot.writeString(struct.db);
      oprot.writeString(struct.tbl);
      oprot.writeString(struct.label);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetCluster()) {
        optionals.set(0);
      }
      if (struct.isSetUserIp()) {
        optionals.set(1);
      }
      if (struct.isSetTimestamp()) {
        optionals.set(2);
      }
      if (struct.isSetAuthCode()) {
        optionals.set(3);
      }
      if (struct.isSetTimeout()) {
        optionals.set(4);
      }
      if (struct.isSetRequestId()) {
        optionals.set(5);
      }
      if (struct.isSetToken()) {
        optionals.set(6);
      }
      if (struct.isSetAuthCodeUuid()) {
        optionals.set(7);
      }
      if (struct.isSetTableId()) {
        optionals.set(8);
      }
      if (struct.isSetBackendId()) {
        optionals.set(9);
      }
      if (struct.isSetCertBasedAuth()) {
        optionals.set(10);
      }
      if (struct.isSetUseTableGroupCommitMode()) {
        optionals.set(11);
      }
      oprot.writeBitSet(optionals, 12);
      if (struct.isSetCluster()) {
        oprot.writeString(struct.cluster);
      }
      if (struct.isSetUserIp()) {
        oprot.writeString(struct.user_ip);
      }
      if (struct.isSetTimestamp()) {
        oprot.writeI64(struct.timestamp);
      }
      if (struct.isSetAuthCode()) {
        oprot.writeI64(struct.auth_code);
      }
      if (struct.isSetTimeout()) {
        oprot.writeI64(struct.timeout);
      }
      if (struct.isSetRequestId()) {
        struct.request_id.write(oprot);
      }
      if (struct.isSetToken()) {
        oprot.writeString(struct.token);
      }
      if (struct.isSetAuthCodeUuid()) {
        oprot.writeString(struct.auth_code_uuid);
      }
      if (struct.isSetTableId()) {
        oprot.writeI64(struct.table_id);
      }
      if (struct.isSetBackendId()) {
        oprot.writeI64(struct.backend_id);
      }
      if (struct.isSetCertBasedAuth()) {
        struct.cert_based_auth.write(oprot);
      }
      if (struct.isSetUseTableGroupCommitMode()) {
        oprot.writeBool(struct.use_table_group_commit_mode);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TLoadTxnBeginRequest struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.user = iprot.readString();
      struct.setUserIsSet(true);
      struct.passwd = iprot.readString();
      struct.setPasswdIsSet(true);
      struct.db = iprot.readString();
      struct.setDbIsSet(true);
      struct.tbl = iprot.readString();
      struct.setTblIsSet(true);
      struct.label = iprot.readString();
      struct.setLabelIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(12);
      if (incoming.get(0)) {
        struct.cluster = iprot.readString();
        struct.setClusterIsSet(true);
      }
      if (incoming.get(1)) {
        struct.user_ip = iprot.readString();
        struct.setUserIpIsSet(true);
      }
      if (incoming.get(2)) {
        struct.timestamp = iprot.readI64();
        struct.setTimestampIsSet(true);
      }
      if (incoming.get(3)) {
        struct.auth_code = iprot.readI64();
        struct.setAuthCodeIsSet(true);
      }
      if (incoming.get(4)) {
        struct.timeout = iprot.readI64();
        struct.setTimeoutIsSet(true);
      }
      if (incoming.get(5)) {
        struct.request_id = new org.apache.doris.thrift.TUniqueId();
        struct.request_id.read(iprot);
        struct.setRequestIdIsSet(true);
      }
      if (incoming.get(6)) {
        struct.token = iprot.readString();
        struct.setTokenIsSet(true);
      }
      if (incoming.get(7)) {
        struct.auth_code_uuid = iprot.readString();
        struct.setAuthCodeUuidIsSet(true);
      }
      if (incoming.get(8)) {
        struct.table_id = iprot.readI64();
        struct.setTableIdIsSet(true);
      }
      if (incoming.get(9)) {
        struct.backend_id = iprot.readI64();
        struct.setBackendIdIsSet(true);
      }
      if (incoming.get(10)) {
        struct.cert_based_auth = new TCertBasedAuth();
        struct.cert_based_auth.read(iprot);
        struct.setCertBasedAuthIsSet(true);
      }
      if (incoming.get(11)) {
        struct.use_table_group_commit_mode = iprot.readBool();
        struct.setUseTableGroupCommitModeIsSet(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();
  }
}