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

  private static final org.apache.thrift.protocol.TField FILE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("file_path", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField ROW_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("row_count", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("file_size", org.apache.thrift.protocol.TType.I64, (short)3);
  private static final org.apache.thrift.protocol.TField FILE_CONTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("file_content", org.apache.thrift.protocol.TType.I32, (short)4);
  private static final org.apache.thrift.protocol.TField PARTITION_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("partition_values", org.apache.thrift.protocol.TType.LIST, (short)5);
  private static final org.apache.thrift.protocol.TField REFERENCED_DATA_FILES_FIELD_DESC = new org.apache.thrift.protocol.TField("referenced_data_files", org.apache.thrift.protocol.TType.LIST, (short)6);

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

  public @org.apache.thrift.annotation.Nullable java.lang.String file_path; // optional
  public long row_count; // optional
  public long file_size; // optional
  /**
   * 
   * @see TFileContent
   */
  public @org.apache.thrift.annotation.Nullable TFileContent file_content; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> partition_values; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> referenced_data_files; // 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 {
    FILE_PATH((short)1, "file_path"),
    ROW_COUNT((short)2, "row_count"),
    FILE_SIZE((short)3, "file_size"),
    /**
     * 
     * @see TFileContent
     */
    FILE_CONTENT((short)4, "file_content"),
    PARTITION_VALUES((short)5, "partition_values"),
    REFERENCED_DATA_FILES((short)6, "referenced_data_files");

    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: // FILE_PATH
          return FILE_PATH;
        case 2: // ROW_COUNT
          return ROW_COUNT;
        case 3: // FILE_SIZE
          return FILE_SIZE;
        case 4: // FILE_CONTENT
          return FILE_CONTENT;
        case 5: // PARTITION_VALUES
          return PARTITION_VALUES;
        case 6: // REFERENCED_DATA_FILES
          return REFERENCED_DATA_FILES;
        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 __ROW_COUNT_ISSET_ID = 0;
  private static final int __FILE_SIZE_ISSET_ID = 1;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.FILE_PATH,_Fields.ROW_COUNT,_Fields.FILE_SIZE,_Fields.FILE_CONTENT,_Fields.PARTITION_VALUES,_Fields.REFERENCED_DATA_FILES};
  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.FILE_PATH, new org.apache.thrift.meta_data.FieldMetaData("file_path", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ROW_COUNT, new org.apache.thrift.meta_data.FieldMetaData("row_count", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("file_size", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.FILE_CONTENT, new org.apache.thrift.meta_data.FieldMetaData("file_content", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TFileContent.class)));
    tmpMap.put(_Fields.PARTITION_VALUES, new org.apache.thrift.meta_data.FieldMetaData("partition_values", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.REFERENCED_DATA_FILES, new org.apache.thrift.meta_data.FieldMetaData("referenced_data_files", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TIcebergCommitData.class, metaDataMap);
  }

  public TIcebergCommitData() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TIcebergCommitData(TIcebergCommitData other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetFilePath()) {
      this.file_path = other.file_path;
    }
    this.row_count = other.row_count;
    this.file_size = other.file_size;
    if (other.isSetFileContent()) {
      this.file_content = other.file_content;
    }
    if (other.isSetPartitionValues()) {
      java.util.List<java.lang.String> __this__partition_values = new java.util.ArrayList<java.lang.String>(other.partition_values);
      this.partition_values = __this__partition_values;
    }
    if (other.isSetReferencedDataFiles()) {
      java.util.List<java.lang.String> __this__referenced_data_files = new java.util.ArrayList<java.lang.String>(other.referenced_data_files);
      this.referenced_data_files = __this__referenced_data_files;
    }
  }

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

  @Override
  public void clear() {
    this.file_path = null;
    setRowCountIsSet(false);
    this.row_count = 0;
    setFileSizeIsSet(false);
    this.file_size = 0;
    this.file_content = null;
    this.partition_values = null;
    this.referenced_data_files = null;
  }

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

  public TIcebergCommitData setFilePath(@org.apache.thrift.annotation.Nullable java.lang.String file_path) {
    this.file_path = file_path;
    return this;
  }

  public void unsetFilePath() {
    this.file_path = null;
  }

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

  public void setFilePathIsSet(boolean value) {
    if (!value) {
      this.file_path = null;
    }
  }

  public long getRowCount() {
    return this.row_count;
  }

  public TIcebergCommitData setRowCount(long row_count) {
    this.row_count = row_count;
    setRowCountIsSet(true);
    return this;
  }

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

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

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

  public long getFileSize() {
    return this.file_size;
  }

  public TIcebergCommitData setFileSize(long file_size) {
    this.file_size = file_size;
    setFileSizeIsSet(true);
    return this;
  }

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

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

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

  /**
   * 
   * @see TFileContent
   */
  @org.apache.thrift.annotation.Nullable
  public TFileContent getFileContent() {
    return this.file_content;
  }

  /**
   * 
   * @see TFileContent
   */
  public TIcebergCommitData setFileContent(@org.apache.thrift.annotation.Nullable TFileContent file_content) {
    this.file_content = file_content;
    return this;
  }

  public void unsetFileContent() {
    this.file_content = null;
  }

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

  public void setFileContentIsSet(boolean value) {
    if (!value) {
      this.file_content = null;
    }
  }

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

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

  public void addToPartitionValues(java.lang.String elem) {
    if (this.partition_values == null) {
      this.partition_values = new java.util.ArrayList<java.lang.String>();
    }
    this.partition_values.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.String> getPartitionValues() {
    return this.partition_values;
  }

  public TIcebergCommitData setPartitionValues(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> partition_values) {
    this.partition_values = partition_values;
    return this;
  }

  public void unsetPartitionValues() {
    this.partition_values = null;
  }

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

  public void setPartitionValuesIsSet(boolean value) {
    if (!value) {
      this.partition_values = null;
    }
  }

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

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

  public void addToReferencedDataFiles(java.lang.String elem) {
    if (this.referenced_data_files == null) {
      this.referenced_data_files = new java.util.ArrayList<java.lang.String>();
    }
    this.referenced_data_files.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.String> getReferencedDataFiles() {
    return this.referenced_data_files;
  }

  public TIcebergCommitData setReferencedDataFiles(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> referenced_data_files) {
    this.referenced_data_files = referenced_data_files;
    return this;
  }

  public void unsetReferencedDataFiles() {
    this.referenced_data_files = null;
  }

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

  public void setReferencedDataFilesIsSet(boolean value) {
    if (!value) {
      this.referenced_data_files = null;
    }
  }

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

    case ROW_COUNT:
      if (value == null) {
        unsetRowCount();
      } else {
        setRowCount((java.lang.Long)value);
      }
      break;

    case FILE_SIZE:
      if (value == null) {
        unsetFileSize();
      } else {
        setFileSize((java.lang.Long)value);
      }
      break;

    case FILE_CONTENT:
      if (value == null) {
        unsetFileContent();
      } else {
        setFileContent((TFileContent)value);
      }
      break;

    case PARTITION_VALUES:
      if (value == null) {
        unsetPartitionValues();
      } else {
        setPartitionValues((java.util.List<java.lang.String>)value);
      }
      break;

    case REFERENCED_DATA_FILES:
      if (value == null) {
        unsetReferencedDataFiles();
      } else {
        setReferencedDataFiles((java.util.List<java.lang.String>)value);
      }
      break;

    }
  }

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

    case ROW_COUNT:
      return getRowCount();

    case FILE_SIZE:
      return getFileSize();

    case FILE_CONTENT:
      return getFileContent();

    case PARTITION_VALUES:
      return getPartitionValues();

    case REFERENCED_DATA_FILES:
      return getReferencedDataFiles();

    }
    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 FILE_PATH:
      return isSetFilePath();
    case ROW_COUNT:
      return isSetRowCount();
    case FILE_SIZE:
      return isSetFileSize();
    case FILE_CONTENT:
      return isSetFileContent();
    case PARTITION_VALUES:
      return isSetPartitionValues();
    case REFERENCED_DATA_FILES:
      return isSetReferencedDataFiles();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_file_path = true && this.isSetFilePath();
    boolean that_present_file_path = true && that.isSetFilePath();
    if (this_present_file_path || that_present_file_path) {
      if (!(this_present_file_path && that_present_file_path))
        return false;
      if (!this.file_path.equals(that.file_path))
        return false;
    }

    boolean this_present_row_count = true && this.isSetRowCount();
    boolean that_present_row_count = true && that.isSetRowCount();
    if (this_present_row_count || that_present_row_count) {
      if (!(this_present_row_count && that_present_row_count))
        return false;
      if (this.row_count != that.row_count)
        return false;
    }

    boolean this_present_file_size = true && this.isSetFileSize();
    boolean that_present_file_size = true && that.isSetFileSize();
    if (this_present_file_size || that_present_file_size) {
      if (!(this_present_file_size && that_present_file_size))
        return false;
      if (this.file_size != that.file_size)
        return false;
    }

    boolean this_present_file_content = true && this.isSetFileContent();
    boolean that_present_file_content = true && that.isSetFileContent();
    if (this_present_file_content || that_present_file_content) {
      if (!(this_present_file_content && that_present_file_content))
        return false;
      if (!this.file_content.equals(that.file_content))
        return false;
    }

    boolean this_present_partition_values = true && this.isSetPartitionValues();
    boolean that_present_partition_values = true && that.isSetPartitionValues();
    if (this_present_partition_values || that_present_partition_values) {
      if (!(this_present_partition_values && that_present_partition_values))
        return false;
      if (!this.partition_values.equals(that.partition_values))
        return false;
    }

    boolean this_present_referenced_data_files = true && this.isSetReferencedDataFiles();
    boolean that_present_referenced_data_files = true && that.isSetReferencedDataFiles();
    if (this_present_referenced_data_files || that_present_referenced_data_files) {
      if (!(this_present_referenced_data_files && that_present_referenced_data_files))
        return false;
      if (!this.referenced_data_files.equals(that.referenced_data_files))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetFilePath()) ? 131071 : 524287);
    if (isSetFilePath())
      hashCode = hashCode * 8191 + file_path.hashCode();

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

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

    hashCode = hashCode * 8191 + ((isSetFileContent()) ? 131071 : 524287);
    if (isSetFileContent())
      hashCode = hashCode * 8191 + file_content.getValue();

    hashCode = hashCode * 8191 + ((isSetPartitionValues()) ? 131071 : 524287);
    if (isSetPartitionValues())
      hashCode = hashCode * 8191 + partition_values.hashCode();

    hashCode = hashCode * 8191 + ((isSetReferencedDataFiles()) ? 131071 : 524287);
    if (isSetReferencedDataFiles())
      hashCode = hashCode * 8191 + referenced_data_files.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetFilePath(), other.isSetFilePath());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFilePath()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file_path, other.file_path);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetRowCount(), other.isSetRowCount());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRowCount()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row_count, other.row_count);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFileSize(), other.isSetFileSize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFileSize()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file_size, other.file_size);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFileContent(), other.isSetFileContent());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFileContent()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file_content, other.file_content);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPartitionValues(), other.isSetPartitionValues());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPartitionValues()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition_values, other.partition_values);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReferencedDataFiles(), other.isSetReferencedDataFiles());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReferencedDataFiles()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.referenced_data_files, other.referenced_data_files);
      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("TIcebergCommitData(");
    boolean first = true;

    if (isSetFilePath()) {
      sb.append("file_path:");
      if (this.file_path == null) {
        sb.append("null");
      } else {
        sb.append(this.file_path);
      }
      first = false;
    }
    if (isSetRowCount()) {
      if (!first) sb.append(", ");
      sb.append("row_count:");
      sb.append(this.row_count);
      first = false;
    }
    if (isSetFileSize()) {
      if (!first) sb.append(", ");
      sb.append("file_size:");
      sb.append(this.file_size);
      first = false;
    }
    if (isSetFileContent()) {
      if (!first) sb.append(", ");
      sb.append("file_content:");
      if (this.file_content == null) {
        sb.append("null");
      } else {
        sb.append(this.file_content);
      }
      first = false;
    }
    if (isSetPartitionValues()) {
      if (!first) sb.append(", ");
      sb.append("partition_values:");
      if (this.partition_values == null) {
        sb.append("null");
      } else {
        sb.append(this.partition_values);
      }
      first = false;
    }
    if (isSetReferencedDataFiles()) {
      if (!first) sb.append(", ");
      sb.append("referenced_data_files:");
      if (this.referenced_data_files == null) {
        sb.append("null");
      } else {
        sb.append(this.referenced_data_files);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

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

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

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

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

  private static class TIcebergCommitDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<TIcebergCommitData> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TIcebergCommitData 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: // FILE_PATH
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.file_path = iprot.readString();
              struct.setFilePathIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // ROW_COUNT
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.row_count = iprot.readI64();
              struct.setRowCountIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // FILE_SIZE
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.file_size = iprot.readI64();
              struct.setFileSizeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // FILE_CONTENT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.file_content = org.apache.doris.thrift.TFileContent.findByValue(iprot.readI32());
              struct.setFileContentIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // PARTITION_VALUES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list218 = iprot.readListBegin();
                struct.partition_values = new java.util.ArrayList<java.lang.String>(_list218.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem219;
                for (int _i220 = 0; _i220 < _list218.size; ++_i220)
                {
                  _elem219 = iprot.readString();
                  struct.partition_values.add(_elem219);
                }
                iprot.readListEnd();
              }
              struct.setPartitionValuesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // REFERENCED_DATA_FILES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list221 = iprot.readListBegin();
                struct.referenced_data_files = new java.util.ArrayList<java.lang.String>(_list221.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem222;
                for (int _i223 = 0; _i223 < _list221.size; ++_i223)
                {
                  _elem222 = iprot.readString();
                  struct.referenced_data_files.add(_elem222);
                }
                iprot.readListEnd();
              }
              struct.setReferencedDataFilesIsSet(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, TIcebergCommitData struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.file_path != null) {
        if (struct.isSetFilePath()) {
          oprot.writeFieldBegin(FILE_PATH_FIELD_DESC);
          oprot.writeString(struct.file_path);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetRowCount()) {
        oprot.writeFieldBegin(ROW_COUNT_FIELD_DESC);
        oprot.writeI64(struct.row_count);
        oprot.writeFieldEnd();
      }
      if (struct.isSetFileSize()) {
        oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC);
        oprot.writeI64(struct.file_size);
        oprot.writeFieldEnd();
      }
      if (struct.file_content != null) {
        if (struct.isSetFileContent()) {
          oprot.writeFieldBegin(FILE_CONTENT_FIELD_DESC);
          oprot.writeI32(struct.file_content.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.partition_values != null) {
        if (struct.isSetPartitionValues()) {
          oprot.writeFieldBegin(PARTITION_VALUES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.partition_values.size()));
            for (java.lang.String _iter224 : struct.partition_values)
            {
              oprot.writeString(_iter224);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.referenced_data_files != null) {
        if (struct.isSetReferencedDataFiles()) {
          oprot.writeFieldBegin(REFERENCED_DATA_FILES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.referenced_data_files.size()));
            for (java.lang.String _iter225 : struct.referenced_data_files)
            {
              oprot.writeString(_iter225);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TIcebergCommitDataTupleScheme extends org.apache.thrift.scheme.TupleScheme<TIcebergCommitData> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TIcebergCommitData struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetFilePath()) {
        optionals.set(0);
      }
      if (struct.isSetRowCount()) {
        optionals.set(1);
      }
      if (struct.isSetFileSize()) {
        optionals.set(2);
      }
      if (struct.isSetFileContent()) {
        optionals.set(3);
      }
      if (struct.isSetPartitionValues()) {
        optionals.set(4);
      }
      if (struct.isSetReferencedDataFiles()) {
        optionals.set(5);
      }
      oprot.writeBitSet(optionals, 6);
      if (struct.isSetFilePath()) {
        oprot.writeString(struct.file_path);
      }
      if (struct.isSetRowCount()) {
        oprot.writeI64(struct.row_count);
      }
      if (struct.isSetFileSize()) {
        oprot.writeI64(struct.file_size);
      }
      if (struct.isSetFileContent()) {
        oprot.writeI32(struct.file_content.getValue());
      }
      if (struct.isSetPartitionValues()) {
        {
          oprot.writeI32(struct.partition_values.size());
          for (java.lang.String _iter226 : struct.partition_values)
          {
            oprot.writeString(_iter226);
          }
        }
      }
      if (struct.isSetReferencedDataFiles()) {
        {
          oprot.writeI32(struct.referenced_data_files.size());
          for (java.lang.String _iter227 : struct.referenced_data_files)
          {
            oprot.writeString(_iter227);
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TIcebergCommitData struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(6);
      if (incoming.get(0)) {
        struct.file_path = iprot.readString();
        struct.setFilePathIsSet(true);
      }
      if (incoming.get(1)) {
        struct.row_count = iprot.readI64();
        struct.setRowCountIsSet(true);
      }
      if (incoming.get(2)) {
        struct.file_size = iprot.readI64();
        struct.setFileSizeIsSet(true);
      }
      if (incoming.get(3)) {
        struct.file_content = org.apache.doris.thrift.TFileContent.findByValue(iprot.readI32());
        struct.setFileContentIsSet(true);
      }
      if (incoming.get(4)) {
        {
          org.apache.thrift.protocol.TList _list228 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.partition_values = new java.util.ArrayList<java.lang.String>(_list228.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem229;
          for (int _i230 = 0; _i230 < _list228.size; ++_i230)
          {
            _elem229 = iprot.readString();
            struct.partition_values.add(_elem229);
          }
        }
        struct.setPartitionValuesIsSet(true);
      }
      if (incoming.get(5)) {
        {
          org.apache.thrift.protocol.TList _list231 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.referenced_data_files = new java.util.ArrayList<java.lang.String>(_list231.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem232;
          for (int _i233 = 0; _i233 < _list231.size; ++_i233)
          {
            _elem232 = iprot.readString();
            struct.referenced_data_files.add(_elem232);
          }
        }
        struct.setReferencedDataFilesIsSet(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();
  }
}