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

  private static final org.apache.thrift.protocol.TField LOAD_SOURCE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("loadSourceType", org.apache.thrift.protocol.TType.I32, (short)1);
  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRUCT, (short)2);
  private static final org.apache.thrift.protocol.TField JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("jobId", org.apache.thrift.protocol.TType.I64, (short)3);
  private static final org.apache.thrift.protocol.TField LOADED_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("loadedRows", org.apache.thrift.protocol.TType.I64, (short)4);
  private static final org.apache.thrift.protocol.TField FILTERED_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("filteredRows", org.apache.thrift.protocol.TType.I64, (short)5);
  private static final org.apache.thrift.protocol.TField UNSELECTED_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("unselectedRows", org.apache.thrift.protocol.TType.I64, (short)6);
  private static final org.apache.thrift.protocol.TField RECEIVED_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("receivedBytes", org.apache.thrift.protocol.TType.I64, (short)7);
  private static final org.apache.thrift.protocol.TField LOADED_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("loadedBytes", org.apache.thrift.protocol.TType.I64, (short)8);
  private static final org.apache.thrift.protocol.TField LOAD_COST_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("loadCostMs", org.apache.thrift.protocol.TType.I64, (short)9);
  private static final org.apache.thrift.protocol.TField KAFKA_RLTASK_PROGRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("kafkaRLTaskProgress", org.apache.thrift.protocol.TType.STRUCT, (short)10);
  private static final org.apache.thrift.protocol.TField ERROR_LOG_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("errorLogUrl", org.apache.thrift.protocol.TType.STRING, (short)11);

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

  /**
   * 
   * @see org.apache.doris.thrift.TLoadSourceType
   */
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TLoadSourceType loadSourceType; // required
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TUniqueId id; // required
  public long jobId; // required
  public long loadedRows; // optional
  public long filteredRows; // optional
  public long unselectedRows; // optional
  public long receivedBytes; // optional
  public long loadedBytes; // optional
  public long loadCostMs; // optional
  public @org.apache.thrift.annotation.Nullable TKafkaRLTaskProgress kafkaRLTaskProgress; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String errorLogUrl; // 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 {
    /**
     * 
     * @see org.apache.doris.thrift.TLoadSourceType
     */
    LOAD_SOURCE_TYPE((short)1, "loadSourceType"),
    ID((short)2, "id"),
    JOB_ID((short)3, "jobId"),
    LOADED_ROWS((short)4, "loadedRows"),
    FILTERED_ROWS((short)5, "filteredRows"),
    UNSELECTED_ROWS((short)6, "unselectedRows"),
    RECEIVED_BYTES((short)7, "receivedBytes"),
    LOADED_BYTES((short)8, "loadedBytes"),
    LOAD_COST_MS((short)9, "loadCostMs"),
    KAFKA_RLTASK_PROGRESS((short)10, "kafkaRLTaskProgress"),
    ERROR_LOG_URL((short)11, "errorLogUrl");

    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: // LOAD_SOURCE_TYPE
          return LOAD_SOURCE_TYPE;
        case 2: // ID
          return ID;
        case 3: // JOB_ID
          return JOB_ID;
        case 4: // LOADED_ROWS
          return LOADED_ROWS;
        case 5: // FILTERED_ROWS
          return FILTERED_ROWS;
        case 6: // UNSELECTED_ROWS
          return UNSELECTED_ROWS;
        case 7: // RECEIVED_BYTES
          return RECEIVED_BYTES;
        case 8: // LOADED_BYTES
          return LOADED_BYTES;
        case 9: // LOAD_COST_MS
          return LOAD_COST_MS;
        case 10: // KAFKA_RLTASK_PROGRESS
          return KAFKA_RLTASK_PROGRESS;
        case 11: // ERROR_LOG_URL
          return ERROR_LOG_URL;
        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 __JOBID_ISSET_ID = 0;
  private static final int __LOADEDROWS_ISSET_ID = 1;
  private static final int __FILTEREDROWS_ISSET_ID = 2;
  private static final int __UNSELECTEDROWS_ISSET_ID = 3;
  private static final int __RECEIVEDBYTES_ISSET_ID = 4;
  private static final int __LOADEDBYTES_ISSET_ID = 5;
  private static final int __LOADCOSTMS_ISSET_ID = 6;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.LOADED_ROWS,_Fields.FILTERED_ROWS,_Fields.UNSELECTED_ROWS,_Fields.RECEIVED_BYTES,_Fields.LOADED_BYTES,_Fields.LOAD_COST_MS,_Fields.KAFKA_RLTASK_PROGRESS,_Fields.ERROR_LOG_URL};
  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.LOAD_SOURCE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("loadSourceType", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.doris.thrift.TLoadSourceType.class)));
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TUniqueId.class)));
    tmpMap.put(_Fields.JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("jobId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.LOADED_ROWS, new org.apache.thrift.meta_data.FieldMetaData("loadedRows", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.FILTERED_ROWS, new org.apache.thrift.meta_data.FieldMetaData("filteredRows", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.UNSELECTED_ROWS, new org.apache.thrift.meta_data.FieldMetaData("unselectedRows", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.RECEIVED_BYTES, new org.apache.thrift.meta_data.FieldMetaData("receivedBytes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.LOADED_BYTES, new org.apache.thrift.meta_data.FieldMetaData("loadedBytes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.LOAD_COST_MS, new org.apache.thrift.meta_data.FieldMetaData("loadCostMs", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.KAFKA_RLTASK_PROGRESS, new org.apache.thrift.meta_data.FieldMetaData("kafkaRLTaskProgress", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TKafkaRLTaskProgress.class)));
    tmpMap.put(_Fields.ERROR_LOG_URL, new org.apache.thrift.meta_data.FieldMetaData("errorLogUrl", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRLTaskTxnCommitAttachment.class, metaDataMap);
  }

  public TRLTaskTxnCommitAttachment() {
  }

  public TRLTaskTxnCommitAttachment(
    org.apache.doris.thrift.TLoadSourceType loadSourceType,
    org.apache.doris.thrift.TUniqueId id,
    long jobId)
  {
    this();
    this.loadSourceType = loadSourceType;
    this.id = id;
    this.jobId = jobId;
    setJobIdIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TRLTaskTxnCommitAttachment(TRLTaskTxnCommitAttachment other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetLoadSourceType()) {
      this.loadSourceType = other.loadSourceType;
    }
    if (other.isSetId()) {
      this.id = new org.apache.doris.thrift.TUniqueId(other.id);
    }
    this.jobId = other.jobId;
    this.loadedRows = other.loadedRows;
    this.filteredRows = other.filteredRows;
    this.unselectedRows = other.unselectedRows;
    this.receivedBytes = other.receivedBytes;
    this.loadedBytes = other.loadedBytes;
    this.loadCostMs = other.loadCostMs;
    if (other.isSetKafkaRLTaskProgress()) {
      this.kafkaRLTaskProgress = new TKafkaRLTaskProgress(other.kafkaRLTaskProgress);
    }
    if (other.isSetErrorLogUrl()) {
      this.errorLogUrl = other.errorLogUrl;
    }
  }

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

  @Override
  public void clear() {
    this.loadSourceType = null;
    this.id = null;
    setJobIdIsSet(false);
    this.jobId = 0;
    setLoadedRowsIsSet(false);
    this.loadedRows = 0;
    setFilteredRowsIsSet(false);
    this.filteredRows = 0;
    setUnselectedRowsIsSet(false);
    this.unselectedRows = 0;
    setReceivedBytesIsSet(false);
    this.receivedBytes = 0;
    setLoadedBytesIsSet(false);
    this.loadedBytes = 0;
    setLoadCostMsIsSet(false);
    this.loadCostMs = 0;
    this.kafkaRLTaskProgress = null;
    this.errorLogUrl = null;
  }

  /**
   * 
   * @see org.apache.doris.thrift.TLoadSourceType
   */
  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TLoadSourceType getLoadSourceType() {
    return this.loadSourceType;
  }

  /**
   * 
   * @see org.apache.doris.thrift.TLoadSourceType
   */
  public TRLTaskTxnCommitAttachment setLoadSourceType(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TLoadSourceType loadSourceType) {
    this.loadSourceType = loadSourceType;
    return this;
  }

  public void unsetLoadSourceType() {
    this.loadSourceType = null;
  }

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

  public void setLoadSourceTypeIsSet(boolean value) {
    if (!value) {
      this.loadSourceType = null;
    }
  }

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

  public TRLTaskTxnCommitAttachment setId(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TUniqueId id) {
    this.id = id;
    return this;
  }

  public void unsetId() {
    this.id = null;
  }

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

  public void setIdIsSet(boolean value) {
    if (!value) {
      this.id = null;
    }
  }

  public long getJobId() {
    return this.jobId;
  }

  public TRLTaskTxnCommitAttachment setJobId(long jobId) {
    this.jobId = jobId;
    setJobIdIsSet(true);
    return this;
  }

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

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

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

  public long getLoadedRows() {
    return this.loadedRows;
  }

  public TRLTaskTxnCommitAttachment setLoadedRows(long loadedRows) {
    this.loadedRows = loadedRows;
    setLoadedRowsIsSet(true);
    return this;
  }

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

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

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

  public long getFilteredRows() {
    return this.filteredRows;
  }

  public TRLTaskTxnCommitAttachment setFilteredRows(long filteredRows) {
    this.filteredRows = filteredRows;
    setFilteredRowsIsSet(true);
    return this;
  }

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

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

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

  public long getUnselectedRows() {
    return this.unselectedRows;
  }

  public TRLTaskTxnCommitAttachment setUnselectedRows(long unselectedRows) {
    this.unselectedRows = unselectedRows;
    setUnselectedRowsIsSet(true);
    return this;
  }

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

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

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

  public long getReceivedBytes() {
    return this.receivedBytes;
  }

  public TRLTaskTxnCommitAttachment setReceivedBytes(long receivedBytes) {
    this.receivedBytes = receivedBytes;
    setReceivedBytesIsSet(true);
    return this;
  }

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

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

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

  public long getLoadedBytes() {
    return this.loadedBytes;
  }

  public TRLTaskTxnCommitAttachment setLoadedBytes(long loadedBytes) {
    this.loadedBytes = loadedBytes;
    setLoadedBytesIsSet(true);
    return this;
  }

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

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

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

  public long getLoadCostMs() {
    return this.loadCostMs;
  }

  public TRLTaskTxnCommitAttachment setLoadCostMs(long loadCostMs) {
    this.loadCostMs = loadCostMs;
    setLoadCostMsIsSet(true);
    return this;
  }

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

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

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

  @org.apache.thrift.annotation.Nullable
  public TKafkaRLTaskProgress getKafkaRLTaskProgress() {
    return this.kafkaRLTaskProgress;
  }

  public TRLTaskTxnCommitAttachment setKafkaRLTaskProgress(@org.apache.thrift.annotation.Nullable TKafkaRLTaskProgress kafkaRLTaskProgress) {
    this.kafkaRLTaskProgress = kafkaRLTaskProgress;
    return this;
  }

  public void unsetKafkaRLTaskProgress() {
    this.kafkaRLTaskProgress = null;
  }

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

  public void setKafkaRLTaskProgressIsSet(boolean value) {
    if (!value) {
      this.kafkaRLTaskProgress = null;
    }
  }

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

  public TRLTaskTxnCommitAttachment setErrorLogUrl(@org.apache.thrift.annotation.Nullable java.lang.String errorLogUrl) {
    this.errorLogUrl = errorLogUrl;
    return this;
  }

  public void unsetErrorLogUrl() {
    this.errorLogUrl = null;
  }

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

  public void setErrorLogUrlIsSet(boolean value) {
    if (!value) {
      this.errorLogUrl = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case LOAD_SOURCE_TYPE:
      if (value == null) {
        unsetLoadSourceType();
      } else {
        setLoadSourceType((org.apache.doris.thrift.TLoadSourceType)value);
      }
      break;

    case ID:
      if (value == null) {
        unsetId();
      } else {
        setId((org.apache.doris.thrift.TUniqueId)value);
      }
      break;

    case JOB_ID:
      if (value == null) {
        unsetJobId();
      } else {
        setJobId((java.lang.Long)value);
      }
      break;

    case LOADED_ROWS:
      if (value == null) {
        unsetLoadedRows();
      } else {
        setLoadedRows((java.lang.Long)value);
      }
      break;

    case FILTERED_ROWS:
      if (value == null) {
        unsetFilteredRows();
      } else {
        setFilteredRows((java.lang.Long)value);
      }
      break;

    case UNSELECTED_ROWS:
      if (value == null) {
        unsetUnselectedRows();
      } else {
        setUnselectedRows((java.lang.Long)value);
      }
      break;

    case RECEIVED_BYTES:
      if (value == null) {
        unsetReceivedBytes();
      } else {
        setReceivedBytes((java.lang.Long)value);
      }
      break;

    case LOADED_BYTES:
      if (value == null) {
        unsetLoadedBytes();
      } else {
        setLoadedBytes((java.lang.Long)value);
      }
      break;

    case LOAD_COST_MS:
      if (value == null) {
        unsetLoadCostMs();
      } else {
        setLoadCostMs((java.lang.Long)value);
      }
      break;

    case KAFKA_RLTASK_PROGRESS:
      if (value == null) {
        unsetKafkaRLTaskProgress();
      } else {
        setKafkaRLTaskProgress((TKafkaRLTaskProgress)value);
      }
      break;

    case ERROR_LOG_URL:
      if (value == null) {
        unsetErrorLogUrl();
      } else {
        setErrorLogUrl((java.lang.String)value);
      }
      break;

    }
  }

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

    case ID:
      return getId();

    case JOB_ID:
      return getJobId();

    case LOADED_ROWS:
      return getLoadedRows();

    case FILTERED_ROWS:
      return getFilteredRows();

    case UNSELECTED_ROWS:
      return getUnselectedRows();

    case RECEIVED_BYTES:
      return getReceivedBytes();

    case LOADED_BYTES:
      return getLoadedBytes();

    case LOAD_COST_MS:
      return getLoadCostMs();

    case KAFKA_RLTASK_PROGRESS:
      return getKafkaRLTaskProgress();

    case ERROR_LOG_URL:
      return getErrorLogUrl();

    }
    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 LOAD_SOURCE_TYPE:
      return isSetLoadSourceType();
    case ID:
      return isSetId();
    case JOB_ID:
      return isSetJobId();
    case LOADED_ROWS:
      return isSetLoadedRows();
    case FILTERED_ROWS:
      return isSetFilteredRows();
    case UNSELECTED_ROWS:
      return isSetUnselectedRows();
    case RECEIVED_BYTES:
      return isSetReceivedBytes();
    case LOADED_BYTES:
      return isSetLoadedBytes();
    case LOAD_COST_MS:
      return isSetLoadCostMs();
    case KAFKA_RLTASK_PROGRESS:
      return isSetKafkaRLTaskProgress();
    case ERROR_LOG_URL:
      return isSetErrorLogUrl();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_loadSourceType = true && this.isSetLoadSourceType();
    boolean that_present_loadSourceType = true && that.isSetLoadSourceType();
    if (this_present_loadSourceType || that_present_loadSourceType) {
      if (!(this_present_loadSourceType && that_present_loadSourceType))
        return false;
      if (!this.loadSourceType.equals(that.loadSourceType))
        return false;
    }

    boolean this_present_id = true && this.isSetId();
    boolean that_present_id = true && that.isSetId();
    if (this_present_id || that_present_id) {
      if (!(this_present_id && that_present_id))
        return false;
      if (!this.id.equals(that.id))
        return false;
    }

    boolean this_present_jobId = true;
    boolean that_present_jobId = true;
    if (this_present_jobId || that_present_jobId) {
      if (!(this_present_jobId && that_present_jobId))
        return false;
      if (this.jobId != that.jobId)
        return false;
    }

    boolean this_present_loadedRows = true && this.isSetLoadedRows();
    boolean that_present_loadedRows = true && that.isSetLoadedRows();
    if (this_present_loadedRows || that_present_loadedRows) {
      if (!(this_present_loadedRows && that_present_loadedRows))
        return false;
      if (this.loadedRows != that.loadedRows)
        return false;
    }

    boolean this_present_filteredRows = true && this.isSetFilteredRows();
    boolean that_present_filteredRows = true && that.isSetFilteredRows();
    if (this_present_filteredRows || that_present_filteredRows) {
      if (!(this_present_filteredRows && that_present_filteredRows))
        return false;
      if (this.filteredRows != that.filteredRows)
        return false;
    }

    boolean this_present_unselectedRows = true && this.isSetUnselectedRows();
    boolean that_present_unselectedRows = true && that.isSetUnselectedRows();
    if (this_present_unselectedRows || that_present_unselectedRows) {
      if (!(this_present_unselectedRows && that_present_unselectedRows))
        return false;
      if (this.unselectedRows != that.unselectedRows)
        return false;
    }

    boolean this_present_receivedBytes = true && this.isSetReceivedBytes();
    boolean that_present_receivedBytes = true && that.isSetReceivedBytes();
    if (this_present_receivedBytes || that_present_receivedBytes) {
      if (!(this_present_receivedBytes && that_present_receivedBytes))
        return false;
      if (this.receivedBytes != that.receivedBytes)
        return false;
    }

    boolean this_present_loadedBytes = true && this.isSetLoadedBytes();
    boolean that_present_loadedBytes = true && that.isSetLoadedBytes();
    if (this_present_loadedBytes || that_present_loadedBytes) {
      if (!(this_present_loadedBytes && that_present_loadedBytes))
        return false;
      if (this.loadedBytes != that.loadedBytes)
        return false;
    }

    boolean this_present_loadCostMs = true && this.isSetLoadCostMs();
    boolean that_present_loadCostMs = true && that.isSetLoadCostMs();
    if (this_present_loadCostMs || that_present_loadCostMs) {
      if (!(this_present_loadCostMs && that_present_loadCostMs))
        return false;
      if (this.loadCostMs != that.loadCostMs)
        return false;
    }

    boolean this_present_kafkaRLTaskProgress = true && this.isSetKafkaRLTaskProgress();
    boolean that_present_kafkaRLTaskProgress = true && that.isSetKafkaRLTaskProgress();
    if (this_present_kafkaRLTaskProgress || that_present_kafkaRLTaskProgress) {
      if (!(this_present_kafkaRLTaskProgress && that_present_kafkaRLTaskProgress))
        return false;
      if (!this.kafkaRLTaskProgress.equals(that.kafkaRLTaskProgress))
        return false;
    }

    boolean this_present_errorLogUrl = true && this.isSetErrorLogUrl();
    boolean that_present_errorLogUrl = true && that.isSetErrorLogUrl();
    if (this_present_errorLogUrl || that_present_errorLogUrl) {
      if (!(this_present_errorLogUrl && that_present_errorLogUrl))
        return false;
      if (!this.errorLogUrl.equals(that.errorLogUrl))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetLoadSourceType()) ? 131071 : 524287);
    if (isSetLoadSourceType())
      hashCode = hashCode * 8191 + loadSourceType.getValue();

    hashCode = hashCode * 8191 + ((isSetId()) ? 131071 : 524287);
    if (isSetId())
      hashCode = hashCode * 8191 + id.hashCode();

    hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(jobId);

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

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

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

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

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

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

    hashCode = hashCode * 8191 + ((isSetKafkaRLTaskProgress()) ? 131071 : 524287);
    if (isSetKafkaRLTaskProgress())
      hashCode = hashCode * 8191 + kafkaRLTaskProgress.hashCode();

    hashCode = hashCode * 8191 + ((isSetErrorLogUrl()) ? 131071 : 524287);
    if (isSetErrorLogUrl())
      hashCode = hashCode * 8191 + errorLogUrl.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetLoadSourceType(), other.isSetLoadSourceType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLoadSourceType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.loadSourceType, other.loadSourceType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetId(), other.isSetId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetJobId(), other.isSetJobId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetJobId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobId, other.jobId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLoadedRows(), other.isSetLoadedRows());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLoadedRows()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.loadedRows, other.loadedRows);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFilteredRows(), other.isSetFilteredRows());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFilteredRows()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filteredRows, other.filteredRows);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUnselectedRows(), other.isSetUnselectedRows());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUnselectedRows()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unselectedRows, other.unselectedRows);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReceivedBytes(), other.isSetReceivedBytes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReceivedBytes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.receivedBytes, other.receivedBytes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLoadedBytes(), other.isSetLoadedBytes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLoadedBytes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.loadedBytes, other.loadedBytes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLoadCostMs(), other.isSetLoadCostMs());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLoadCostMs()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.loadCostMs, other.loadCostMs);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetKafkaRLTaskProgress(), other.isSetKafkaRLTaskProgress());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetKafkaRLTaskProgress()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.kafkaRLTaskProgress, other.kafkaRLTaskProgress);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetErrorLogUrl(), other.isSetErrorLogUrl());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetErrorLogUrl()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorLogUrl, other.errorLogUrl);
      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("TRLTaskTxnCommitAttachment(");
    boolean first = true;

    sb.append("loadSourceType:");
    if (this.loadSourceType == null) {
      sb.append("null");
    } else {
      sb.append(this.loadSourceType);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("id:");
    if (this.id == null) {
      sb.append("null");
    } else {
      sb.append(this.id);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("jobId:");
    sb.append(this.jobId);
    first = false;
    if (isSetLoadedRows()) {
      if (!first) sb.append(", ");
      sb.append("loadedRows:");
      sb.append(this.loadedRows);
      first = false;
    }
    if (isSetFilteredRows()) {
      if (!first) sb.append(", ");
      sb.append("filteredRows:");
      sb.append(this.filteredRows);
      first = false;
    }
    if (isSetUnselectedRows()) {
      if (!first) sb.append(", ");
      sb.append("unselectedRows:");
      sb.append(this.unselectedRows);
      first = false;
    }
    if (isSetReceivedBytes()) {
      if (!first) sb.append(", ");
      sb.append("receivedBytes:");
      sb.append(this.receivedBytes);
      first = false;
    }
    if (isSetLoadedBytes()) {
      if (!first) sb.append(", ");
      sb.append("loadedBytes:");
      sb.append(this.loadedBytes);
      first = false;
    }
    if (isSetLoadCostMs()) {
      if (!first) sb.append(", ");
      sb.append("loadCostMs:");
      sb.append(this.loadCostMs);
      first = false;
    }
    if (isSetKafkaRLTaskProgress()) {
      if (!first) sb.append(", ");
      sb.append("kafkaRLTaskProgress:");
      if (this.kafkaRLTaskProgress == null) {
        sb.append("null");
      } else {
        sb.append(this.kafkaRLTaskProgress);
      }
      first = false;
    }
    if (isSetErrorLogUrl()) {
      if (!first) sb.append(", ");
      sb.append("errorLogUrl:");
      if (this.errorLogUrl == null) {
        sb.append("null");
      } else {
        sb.append(this.errorLogUrl);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (loadSourceType == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'loadSourceType' was not present! Struct: " + toString());
    }
    if (id == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' was not present! Struct: " + toString());
    }
    // alas, we cannot check 'jobId' because it's a primitive and you chose the non-beans generator.
    // check for sub-struct validity
    if (id != null) {
      id.validate();
    }
    if (kafkaRLTaskProgress != null) {
      kafkaRLTaskProgress.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 TRLTaskTxnCommitAttachmentStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TRLTaskTxnCommitAttachmentStandardScheme getScheme() {
      return new TRLTaskTxnCommitAttachmentStandardScheme();
    }
  }

  private static class TRLTaskTxnCommitAttachmentStandardScheme extends org.apache.thrift.scheme.StandardScheme<TRLTaskTxnCommitAttachment> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TRLTaskTxnCommitAttachment 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: // LOAD_SOURCE_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.loadSourceType = org.apache.doris.thrift.TLoadSourceType.findByValue(iprot.readI32());
              struct.setLoadSourceTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.id = new org.apache.doris.thrift.TUniqueId();
              struct.id.read(iprot);
              struct.setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // JOB_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.jobId = iprot.readI64();
              struct.setJobIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // LOADED_ROWS
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.loadedRows = iprot.readI64();
              struct.setLoadedRowsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // FILTERED_ROWS
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.filteredRows = iprot.readI64();
              struct.setFilteredRowsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // UNSELECTED_ROWS
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.unselectedRows = iprot.readI64();
              struct.setUnselectedRowsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // RECEIVED_BYTES
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.receivedBytes = iprot.readI64();
              struct.setReceivedBytesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // LOADED_BYTES
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.loadedBytes = iprot.readI64();
              struct.setLoadedBytesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // LOAD_COST_MS
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.loadCostMs = iprot.readI64();
              struct.setLoadCostMsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // KAFKA_RLTASK_PROGRESS
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.kafkaRLTaskProgress = new TKafkaRLTaskProgress();
              struct.kafkaRLTaskProgress.read(iprot);
              struct.setKafkaRLTaskProgressIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // ERROR_LOG_URL
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.errorLogUrl = iprot.readString();
              struct.setErrorLogUrlIsSet(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
      if (!struct.isSetJobId()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'jobId' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.loadSourceType != null) {
        oprot.writeFieldBegin(LOAD_SOURCE_TYPE_FIELD_DESC);
        oprot.writeI32(struct.loadSourceType.getValue());
        oprot.writeFieldEnd();
      }
      if (struct.id != null) {
        oprot.writeFieldBegin(ID_FIELD_DESC);
        struct.id.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(JOB_ID_FIELD_DESC);
      oprot.writeI64(struct.jobId);
      oprot.writeFieldEnd();
      if (struct.isSetLoadedRows()) {
        oprot.writeFieldBegin(LOADED_ROWS_FIELD_DESC);
        oprot.writeI64(struct.loadedRows);
        oprot.writeFieldEnd();
      }
      if (struct.isSetFilteredRows()) {
        oprot.writeFieldBegin(FILTERED_ROWS_FIELD_DESC);
        oprot.writeI64(struct.filteredRows);
        oprot.writeFieldEnd();
      }
      if (struct.isSetUnselectedRows()) {
        oprot.writeFieldBegin(UNSELECTED_ROWS_FIELD_DESC);
        oprot.writeI64(struct.unselectedRows);
        oprot.writeFieldEnd();
      }
      if (struct.isSetReceivedBytes()) {
        oprot.writeFieldBegin(RECEIVED_BYTES_FIELD_DESC);
        oprot.writeI64(struct.receivedBytes);
        oprot.writeFieldEnd();
      }
      if (struct.isSetLoadedBytes()) {
        oprot.writeFieldBegin(LOADED_BYTES_FIELD_DESC);
        oprot.writeI64(struct.loadedBytes);
        oprot.writeFieldEnd();
      }
      if (struct.isSetLoadCostMs()) {
        oprot.writeFieldBegin(LOAD_COST_MS_FIELD_DESC);
        oprot.writeI64(struct.loadCostMs);
        oprot.writeFieldEnd();
      }
      if (struct.kafkaRLTaskProgress != null) {
        if (struct.isSetKafkaRLTaskProgress()) {
          oprot.writeFieldBegin(KAFKA_RLTASK_PROGRESS_FIELD_DESC);
          struct.kafkaRLTaskProgress.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.errorLogUrl != null) {
        if (struct.isSetErrorLogUrl()) {
          oprot.writeFieldBegin(ERROR_LOG_URL_FIELD_DESC);
          oprot.writeString(struct.errorLogUrl);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TRLTaskTxnCommitAttachmentTupleScheme extends org.apache.thrift.scheme.TupleScheme<TRLTaskTxnCommitAttachment> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TRLTaskTxnCommitAttachment struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeI32(struct.loadSourceType.getValue());
      struct.id.write(oprot);
      oprot.writeI64(struct.jobId);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetLoadedRows()) {
        optionals.set(0);
      }
      if (struct.isSetFilteredRows()) {
        optionals.set(1);
      }
      if (struct.isSetUnselectedRows()) {
        optionals.set(2);
      }
      if (struct.isSetReceivedBytes()) {
        optionals.set(3);
      }
      if (struct.isSetLoadedBytes()) {
        optionals.set(4);
      }
      if (struct.isSetLoadCostMs()) {
        optionals.set(5);
      }
      if (struct.isSetKafkaRLTaskProgress()) {
        optionals.set(6);
      }
      if (struct.isSetErrorLogUrl()) {
        optionals.set(7);
      }
      oprot.writeBitSet(optionals, 8);
      if (struct.isSetLoadedRows()) {
        oprot.writeI64(struct.loadedRows);
      }
      if (struct.isSetFilteredRows()) {
        oprot.writeI64(struct.filteredRows);
      }
      if (struct.isSetUnselectedRows()) {
        oprot.writeI64(struct.unselectedRows);
      }
      if (struct.isSetReceivedBytes()) {
        oprot.writeI64(struct.receivedBytes);
      }
      if (struct.isSetLoadedBytes()) {
        oprot.writeI64(struct.loadedBytes);
      }
      if (struct.isSetLoadCostMs()) {
        oprot.writeI64(struct.loadCostMs);
      }
      if (struct.isSetKafkaRLTaskProgress()) {
        struct.kafkaRLTaskProgress.write(oprot);
      }
      if (struct.isSetErrorLogUrl()) {
        oprot.writeString(struct.errorLogUrl);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TRLTaskTxnCommitAttachment struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.loadSourceType = org.apache.doris.thrift.TLoadSourceType.findByValue(iprot.readI32());
      struct.setLoadSourceTypeIsSet(true);
      struct.id = new org.apache.doris.thrift.TUniqueId();
      struct.id.read(iprot);
      struct.setIdIsSet(true);
      struct.jobId = iprot.readI64();
      struct.setJobIdIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(8);
      if (incoming.get(0)) {
        struct.loadedRows = iprot.readI64();
        struct.setLoadedRowsIsSet(true);
      }
      if (incoming.get(1)) {
        struct.filteredRows = iprot.readI64();
        struct.setFilteredRowsIsSet(true);
      }
      if (incoming.get(2)) {
        struct.unselectedRows = iprot.readI64();
        struct.setUnselectedRowsIsSet(true);
      }
      if (incoming.get(3)) {
        struct.receivedBytes = iprot.readI64();
        struct.setReceivedBytesIsSet(true);
      }
      if (incoming.get(4)) {
        struct.loadedBytes = iprot.readI64();
        struct.setLoadedBytesIsSet(true);
      }
      if (incoming.get(5)) {
        struct.loadCostMs = iprot.readI64();
        struct.setLoadCostMsIsSet(true);
      }
      if (incoming.get(6)) {
        struct.kafkaRLTaskProgress = new TKafkaRLTaskProgress();
        struct.kafkaRLTaskProgress.read(iprot);
        struct.setKafkaRLTaskProgressIsSet(true);
      }
      if (incoming.get(7)) {
        struct.errorLogUrl = iprot.readString();
        struct.setErrorLogUrlIsSet(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();
  }
}