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

  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1);
  private static final org.apache.thrift.protocol.TField PIPELINE_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("pipeline_params", org.apache.thrift.protocol.TType.STRUCT, (short)3);
  private static final org.apache.thrift.protocol.TField BASE_SCHEMA_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("base_schema_version", org.apache.thrift.protocol.TType.I64, (short)4);
  private static final org.apache.thrift.protocol.TField DB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("db_id", org.apache.thrift.protocol.TType.I64, (short)5);
  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)6);
  private static final org.apache.thrift.protocol.TField WAIT_INTERNAL_GROUP_COMMIT_FINISH_FIELD_DESC = new org.apache.thrift.protocol.TField("wait_internal_group_commit_finish", org.apache.thrift.protocol.TType.BOOL, (short)7);
  private static final org.apache.thrift.protocol.TField GROUP_COMMIT_INTERVAL_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("group_commit_interval_ms", org.apache.thrift.protocol.TType.I64, (short)8);
  private static final org.apache.thrift.protocol.TField GROUP_COMMIT_DATA_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("group_commit_data_bytes", org.apache.thrift.protocol.TType.I64, (short)9);

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

  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStatus status; // required
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPipelineFragmentParams pipeline_params; // optional
  public long base_schema_version; // optional
  public long db_id; // optional
  public long table_id; // optional
  public boolean wait_internal_group_commit_finish; // optional
  public long group_commit_interval_ms; // optional
  public long group_commit_data_bytes; // 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 {
    STATUS((short)1, "status"),
    PIPELINE_PARAMS((short)3, "pipeline_params"),
    BASE_SCHEMA_VERSION((short)4, "base_schema_version"),
    DB_ID((short)5, "db_id"),
    TABLE_ID((short)6, "table_id"),
    WAIT_INTERNAL_GROUP_COMMIT_FINISH((short)7, "wait_internal_group_commit_finish"),
    GROUP_COMMIT_INTERVAL_MS((short)8, "group_commit_interval_ms"),
    GROUP_COMMIT_DATA_BYTES((short)9, "group_commit_data_bytes");

    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: // STATUS
          return STATUS;
        case 3: // PIPELINE_PARAMS
          return PIPELINE_PARAMS;
        case 4: // BASE_SCHEMA_VERSION
          return BASE_SCHEMA_VERSION;
        case 5: // DB_ID
          return DB_ID;
        case 6: // TABLE_ID
          return TABLE_ID;
        case 7: // WAIT_INTERNAL_GROUP_COMMIT_FINISH
          return WAIT_INTERNAL_GROUP_COMMIT_FINISH;
        case 8: // GROUP_COMMIT_INTERVAL_MS
          return GROUP_COMMIT_INTERVAL_MS;
        case 9: // GROUP_COMMIT_DATA_BYTES
          return GROUP_COMMIT_DATA_BYTES;
        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 __BASE_SCHEMA_VERSION_ISSET_ID = 0;
  private static final int __DB_ID_ISSET_ID = 1;
  private static final int __TABLE_ID_ISSET_ID = 2;
  private static final int __WAIT_INTERNAL_GROUP_COMMIT_FINISH_ISSET_ID = 3;
  private static final int __GROUP_COMMIT_INTERVAL_MS_ISSET_ID = 4;
  private static final int __GROUP_COMMIT_DATA_BYTES_ISSET_ID = 5;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.PIPELINE_PARAMS,_Fields.BASE_SCHEMA_VERSION,_Fields.DB_ID,_Fields.TABLE_ID,_Fields.WAIT_INTERNAL_GROUP_COMMIT_FINISH,_Fields.GROUP_COMMIT_INTERVAL_MS,_Fields.GROUP_COMMIT_DATA_BYTES};
  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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TStatus.class)));
    tmpMap.put(_Fields.PIPELINE_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("pipeline_params", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TPipelineFragmentParams.class)));
    tmpMap.put(_Fields.BASE_SCHEMA_VERSION, new org.apache.thrift.meta_data.FieldMetaData("base_schema_version", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.DB_ID, new org.apache.thrift.meta_data.FieldMetaData("db_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TABLE_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.WAIT_INTERNAL_GROUP_COMMIT_FINISH, new org.apache.thrift.meta_data.FieldMetaData("wait_internal_group_commit_finish", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.GROUP_COMMIT_INTERVAL_MS, new org.apache.thrift.meta_data.FieldMetaData("group_commit_interval_ms", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.GROUP_COMMIT_DATA_BYTES, new org.apache.thrift.meta_data.FieldMetaData("group_commit_data_bytes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TStreamLoadPutResult.class, metaDataMap);
  }

  public TStreamLoadPutResult() {
    this.wait_internal_group_commit_finish = false;

  }

  public TStreamLoadPutResult(
    org.apache.doris.thrift.TStatus status)
  {
    this();
    this.status = status;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TStreamLoadPutResult(TStreamLoadPutResult other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetStatus()) {
      this.status = new org.apache.doris.thrift.TStatus(other.status);
    }
    if (other.isSetPipelineParams()) {
      this.pipeline_params = new org.apache.doris.thrift.TPipelineFragmentParams(other.pipeline_params);
    }
    this.base_schema_version = other.base_schema_version;
    this.db_id = other.db_id;
    this.table_id = other.table_id;
    this.wait_internal_group_commit_finish = other.wait_internal_group_commit_finish;
    this.group_commit_interval_ms = other.group_commit_interval_ms;
    this.group_commit_data_bytes = other.group_commit_data_bytes;
  }

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

  @Override
  public void clear() {
    this.status = null;
    this.pipeline_params = null;
    setBaseSchemaVersionIsSet(false);
    this.base_schema_version = 0;
    setDbIdIsSet(false);
    this.db_id = 0;
    setTableIdIsSet(false);
    this.table_id = 0;
    this.wait_internal_group_commit_finish = false;

    setGroupCommitIntervalMsIsSet(false);
    this.group_commit_interval_ms = 0;
    setGroupCommitDataBytesIsSet(false);
    this.group_commit_data_bytes = 0;
  }

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TStatus getStatus() {
    return this.status;
  }

  public TStreamLoadPutResult setStatus(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStatus status) {
    this.status = status;
    return this;
  }

  public void unsetStatus() {
    this.status = null;
  }

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

  public void setStatusIsSet(boolean value) {
    if (!value) {
      this.status = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TPipelineFragmentParams getPipelineParams() {
    return this.pipeline_params;
  }

  public TStreamLoadPutResult setPipelineParams(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TPipelineFragmentParams pipeline_params) {
    this.pipeline_params = pipeline_params;
    return this;
  }

  public void unsetPipelineParams() {
    this.pipeline_params = null;
  }

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

  public void setPipelineParamsIsSet(boolean value) {
    if (!value) {
      this.pipeline_params = null;
    }
  }

  public long getBaseSchemaVersion() {
    return this.base_schema_version;
  }

  public TStreamLoadPutResult setBaseSchemaVersion(long base_schema_version) {
    this.base_schema_version = base_schema_version;
    setBaseSchemaVersionIsSet(true);
    return this;
  }

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

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

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

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

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

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

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

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

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

  public TStreamLoadPutResult 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 boolean isWaitInternalGroupCommitFinish() {
    return this.wait_internal_group_commit_finish;
  }

  public TStreamLoadPutResult setWaitInternalGroupCommitFinish(boolean wait_internal_group_commit_finish) {
    this.wait_internal_group_commit_finish = wait_internal_group_commit_finish;
    setWaitInternalGroupCommitFinishIsSet(true);
    return this;
  }

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

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

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

  public long getGroupCommitIntervalMs() {
    return this.group_commit_interval_ms;
  }

  public TStreamLoadPutResult setGroupCommitIntervalMs(long group_commit_interval_ms) {
    this.group_commit_interval_ms = group_commit_interval_ms;
    setGroupCommitIntervalMsIsSet(true);
    return this;
  }

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

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

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

  public long getGroupCommitDataBytes() {
    return this.group_commit_data_bytes;
  }

  public TStreamLoadPutResult setGroupCommitDataBytes(long group_commit_data_bytes) {
    this.group_commit_data_bytes = group_commit_data_bytes;
    setGroupCommitDataBytesIsSet(true);
    return this;
  }

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

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

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

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case STATUS:
      if (value == null) {
        unsetStatus();
      } else {
        setStatus((org.apache.doris.thrift.TStatus)value);
      }
      break;

    case PIPELINE_PARAMS:
      if (value == null) {
        unsetPipelineParams();
      } else {
        setPipelineParams((org.apache.doris.thrift.TPipelineFragmentParams)value);
      }
      break;

    case BASE_SCHEMA_VERSION:
      if (value == null) {
        unsetBaseSchemaVersion();
      } else {
        setBaseSchemaVersion((java.lang.Long)value);
      }
      break;

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

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

    case WAIT_INTERNAL_GROUP_COMMIT_FINISH:
      if (value == null) {
        unsetWaitInternalGroupCommitFinish();
      } else {
        setWaitInternalGroupCommitFinish((java.lang.Boolean)value);
      }
      break;

    case GROUP_COMMIT_INTERVAL_MS:
      if (value == null) {
        unsetGroupCommitIntervalMs();
      } else {
        setGroupCommitIntervalMs((java.lang.Long)value);
      }
      break;

    case GROUP_COMMIT_DATA_BYTES:
      if (value == null) {
        unsetGroupCommitDataBytes();
      } else {
        setGroupCommitDataBytes((java.lang.Long)value);
      }
      break;

    }
  }

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

    case PIPELINE_PARAMS:
      return getPipelineParams();

    case BASE_SCHEMA_VERSION:
      return getBaseSchemaVersion();

    case DB_ID:
      return getDbId();

    case TABLE_ID:
      return getTableId();

    case WAIT_INTERNAL_GROUP_COMMIT_FINISH:
      return isWaitInternalGroupCommitFinish();

    case GROUP_COMMIT_INTERVAL_MS:
      return getGroupCommitIntervalMs();

    case GROUP_COMMIT_DATA_BYTES:
      return getGroupCommitDataBytes();

    }
    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 STATUS:
      return isSetStatus();
    case PIPELINE_PARAMS:
      return isSetPipelineParams();
    case BASE_SCHEMA_VERSION:
      return isSetBaseSchemaVersion();
    case DB_ID:
      return isSetDbId();
    case TABLE_ID:
      return isSetTableId();
    case WAIT_INTERNAL_GROUP_COMMIT_FINISH:
      return isSetWaitInternalGroupCommitFinish();
    case GROUP_COMMIT_INTERVAL_MS:
      return isSetGroupCommitIntervalMs();
    case GROUP_COMMIT_DATA_BYTES:
      return isSetGroupCommitDataBytes();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_status = true && this.isSetStatus();
    boolean that_present_status = true && that.isSetStatus();
    if (this_present_status || that_present_status) {
      if (!(this_present_status && that_present_status))
        return false;
      if (!this.status.equals(that.status))
        return false;
    }

    boolean this_present_pipeline_params = true && this.isSetPipelineParams();
    boolean that_present_pipeline_params = true && that.isSetPipelineParams();
    if (this_present_pipeline_params || that_present_pipeline_params) {
      if (!(this_present_pipeline_params && that_present_pipeline_params))
        return false;
      if (!this.pipeline_params.equals(that.pipeline_params))
        return false;
    }

    boolean this_present_base_schema_version = true && this.isSetBaseSchemaVersion();
    boolean that_present_base_schema_version = true && that.isSetBaseSchemaVersion();
    if (this_present_base_schema_version || that_present_base_schema_version) {
      if (!(this_present_base_schema_version && that_present_base_schema_version))
        return false;
      if (this.base_schema_version != that.base_schema_version)
        return false;
    }

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

    boolean this_present_table_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_wait_internal_group_commit_finish = true && this.isSetWaitInternalGroupCommitFinish();
    boolean that_present_wait_internal_group_commit_finish = true && that.isSetWaitInternalGroupCommitFinish();
    if (this_present_wait_internal_group_commit_finish || that_present_wait_internal_group_commit_finish) {
      if (!(this_present_wait_internal_group_commit_finish && that_present_wait_internal_group_commit_finish))
        return false;
      if (this.wait_internal_group_commit_finish != that.wait_internal_group_commit_finish)
        return false;
    }

    boolean this_present_group_commit_interval_ms = true && this.isSetGroupCommitIntervalMs();
    boolean that_present_group_commit_interval_ms = true && that.isSetGroupCommitIntervalMs();
    if (this_present_group_commit_interval_ms || that_present_group_commit_interval_ms) {
      if (!(this_present_group_commit_interval_ms && that_present_group_commit_interval_ms))
        return false;
      if (this.group_commit_interval_ms != that.group_commit_interval_ms)
        return false;
    }

    boolean this_present_group_commit_data_bytes = true && this.isSetGroupCommitDataBytes();
    boolean that_present_group_commit_data_bytes = true && that.isSetGroupCommitDataBytes();
    if (this_present_group_commit_data_bytes || that_present_group_commit_data_bytes) {
      if (!(this_present_group_commit_data_bytes && that_present_group_commit_data_bytes))
        return false;
      if (this.group_commit_data_bytes != that.group_commit_data_bytes)
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
    if (isSetStatus())
      hashCode = hashCode * 8191 + status.hashCode();

    hashCode = hashCode * 8191 + ((isSetPipelineParams()) ? 131071 : 524287);
    if (isSetPipelineParams())
      hashCode = hashCode * 8191 + pipeline_params.hashCode();

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

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

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

    hashCode = hashCode * 8191 + ((isSetWaitInternalGroupCommitFinish()) ? 131071 : 524287);
    if (isSetWaitInternalGroupCommitFinish())
      hashCode = hashCode * 8191 + ((wait_internal_group_commit_finish) ? 131071 : 524287);

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

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

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStatus()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPipelineParams(), other.isSetPipelineParams());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPipelineParams()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pipeline_params, other.pipeline_params);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBaseSchemaVersion(), other.isSetBaseSchemaVersion());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBaseSchemaVersion()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base_schema_version, other.base_schema_version);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDbId(), other.isSetDbId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDbId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db_id, other.db_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(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(isSetWaitInternalGroupCommitFinish(), other.isSetWaitInternalGroupCommitFinish());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWaitInternalGroupCommitFinish()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wait_internal_group_commit_finish, other.wait_internal_group_commit_finish);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetGroupCommitIntervalMs(), other.isSetGroupCommitIntervalMs());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGroupCommitIntervalMs()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_commit_interval_ms, other.group_commit_interval_ms);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetGroupCommitDataBytes(), other.isSetGroupCommitDataBytes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGroupCommitDataBytes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group_commit_data_bytes, other.group_commit_data_bytes);
      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("TStreamLoadPutResult(");
    boolean first = true;

    sb.append("status:");
    if (this.status == null) {
      sb.append("null");
    } else {
      sb.append(this.status);
    }
    first = false;
    if (isSetPipelineParams()) {
      if (!first) sb.append(", ");
      sb.append("pipeline_params:");
      if (this.pipeline_params == null) {
        sb.append("null");
      } else {
        sb.append(this.pipeline_params);
      }
      first = false;
    }
    if (isSetBaseSchemaVersion()) {
      if (!first) sb.append(", ");
      sb.append("base_schema_version:");
      sb.append(this.base_schema_version);
      first = false;
    }
    if (isSetDbId()) {
      if (!first) sb.append(", ");
      sb.append("db_id:");
      sb.append(this.db_id);
      first = false;
    }
    if (isSetTableId()) {
      if (!first) sb.append(", ");
      sb.append("table_id:");
      sb.append(this.table_id);
      first = false;
    }
    if (isSetWaitInternalGroupCommitFinish()) {
      if (!first) sb.append(", ");
      sb.append("wait_internal_group_commit_finish:");
      sb.append(this.wait_internal_group_commit_finish);
      first = false;
    }
    if (isSetGroupCommitIntervalMs()) {
      if (!first) sb.append(", ");
      sb.append("group_commit_interval_ms:");
      sb.append(this.group_commit_interval_ms);
      first = false;
    }
    if (isSetGroupCommitDataBytes()) {
      if (!first) sb.append(", ");
      sb.append("group_commit_data_bytes:");
      sb.append(this.group_commit_data_bytes);
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (status == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString());
    }
    // check for sub-struct validity
    if (status != null) {
      status.validate();
    }
    if (pipeline_params != null) {
      pipeline_params.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 TStreamLoadPutResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TStreamLoadPutResultStandardScheme getScheme() {
      return new TStreamLoadPutResultStandardScheme();
    }
  }

  private static class TStreamLoadPutResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TStreamLoadPutResult> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TStreamLoadPutResult 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: // STATUS
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.status = new org.apache.doris.thrift.TStatus();
              struct.status.read(iprot);
              struct.setStatusIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // PIPELINE_PARAMS
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.pipeline_params = new org.apache.doris.thrift.TPipelineFragmentParams();
              struct.pipeline_params.read(iprot);
              struct.setPipelineParamsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // BASE_SCHEMA_VERSION
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.base_schema_version = iprot.readI64();
              struct.setBaseSchemaVersionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // DB_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.db_id = iprot.readI64();
              struct.setDbIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // 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 7: // WAIT_INTERNAL_GROUP_COMMIT_FINISH
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.wait_internal_group_commit_finish = iprot.readBool();
              struct.setWaitInternalGroupCommitFinishIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // GROUP_COMMIT_INTERVAL_MS
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.group_commit_interval_ms = iprot.readI64();
              struct.setGroupCommitIntervalMsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // GROUP_COMMIT_DATA_BYTES
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.group_commit_data_bytes = iprot.readI64();
              struct.setGroupCommitDataBytesIsSet(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, TStreamLoadPutResult struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.status != null) {
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
        struct.status.write(oprot);
        oprot.writeFieldEnd();
      }
      if (struct.pipeline_params != null) {
        if (struct.isSetPipelineParams()) {
          oprot.writeFieldBegin(PIPELINE_PARAMS_FIELD_DESC);
          struct.pipeline_params.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetBaseSchemaVersion()) {
        oprot.writeFieldBegin(BASE_SCHEMA_VERSION_FIELD_DESC);
        oprot.writeI64(struct.base_schema_version);
        oprot.writeFieldEnd();
      }
      if (struct.isSetDbId()) {
        oprot.writeFieldBegin(DB_ID_FIELD_DESC);
        oprot.writeI64(struct.db_id);
        oprot.writeFieldEnd();
      }
      if (struct.isSetTableId()) {
        oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
        oprot.writeI64(struct.table_id);
        oprot.writeFieldEnd();
      }
      if (struct.isSetWaitInternalGroupCommitFinish()) {
        oprot.writeFieldBegin(WAIT_INTERNAL_GROUP_COMMIT_FINISH_FIELD_DESC);
        oprot.writeBool(struct.wait_internal_group_commit_finish);
        oprot.writeFieldEnd();
      }
      if (struct.isSetGroupCommitIntervalMs()) {
        oprot.writeFieldBegin(GROUP_COMMIT_INTERVAL_MS_FIELD_DESC);
        oprot.writeI64(struct.group_commit_interval_ms);
        oprot.writeFieldEnd();
      }
      if (struct.isSetGroupCommitDataBytes()) {
        oprot.writeFieldBegin(GROUP_COMMIT_DATA_BYTES_FIELD_DESC);
        oprot.writeI64(struct.group_commit_data_bytes);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TStreamLoadPutResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TStreamLoadPutResult> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TStreamLoadPutResult struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.status.write(oprot);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetPipelineParams()) {
        optionals.set(0);
      }
      if (struct.isSetBaseSchemaVersion()) {
        optionals.set(1);
      }
      if (struct.isSetDbId()) {
        optionals.set(2);
      }
      if (struct.isSetTableId()) {
        optionals.set(3);
      }
      if (struct.isSetWaitInternalGroupCommitFinish()) {
        optionals.set(4);
      }
      if (struct.isSetGroupCommitIntervalMs()) {
        optionals.set(5);
      }
      if (struct.isSetGroupCommitDataBytes()) {
        optionals.set(6);
      }
      oprot.writeBitSet(optionals, 7);
      if (struct.isSetPipelineParams()) {
        struct.pipeline_params.write(oprot);
      }
      if (struct.isSetBaseSchemaVersion()) {
        oprot.writeI64(struct.base_schema_version);
      }
      if (struct.isSetDbId()) {
        oprot.writeI64(struct.db_id);
      }
      if (struct.isSetTableId()) {
        oprot.writeI64(struct.table_id);
      }
      if (struct.isSetWaitInternalGroupCommitFinish()) {
        oprot.writeBool(struct.wait_internal_group_commit_finish);
      }
      if (struct.isSetGroupCommitIntervalMs()) {
        oprot.writeI64(struct.group_commit_interval_ms);
      }
      if (struct.isSetGroupCommitDataBytes()) {
        oprot.writeI64(struct.group_commit_data_bytes);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TStreamLoadPutResult struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.status = new org.apache.doris.thrift.TStatus();
      struct.status.read(iprot);
      struct.setStatusIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(7);
      if (incoming.get(0)) {
        struct.pipeline_params = new org.apache.doris.thrift.TPipelineFragmentParams();
        struct.pipeline_params.read(iprot);
        struct.setPipelineParamsIsSet(true);
      }
      if (incoming.get(1)) {
        struct.base_schema_version = iprot.readI64();
        struct.setBaseSchemaVersionIsSet(true);
      }
      if (incoming.get(2)) {
        struct.db_id = iprot.readI64();
        struct.setDbIdIsSet(true);
      }
      if (incoming.get(3)) {
        struct.table_id = iprot.readI64();
        struct.setTableIdIsSet(true);
      }
      if (incoming.get(4)) {
        struct.wait_internal_group_commit_finish = iprot.readBool();
        struct.setWaitInternalGroupCommitFinishIsSet(true);
      }
      if (incoming.get(5)) {
        struct.group_commit_interval_ms = iprot.readI64();
        struct.setGroupCommitIntervalMsIsSet(true);
      }
      if (incoming.get(6)) {
        struct.group_commit_data_bytes = iprot.readI64();
        struct.setGroupCommitDataBytesIsSet(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();
  }
}