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

  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 FILE_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("file_format", org.apache.thrift.protocol.TType.I32, (short)2);
  private static final org.apache.thrift.protocol.TField COLUMN_SEPARATOR_FIELD_DESC = new org.apache.thrift.protocol.TField("column_separator", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField LINE_DELIMITER_FIELD_DESC = new org.apache.thrift.protocol.TField("line_delimiter", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField MAX_FILE_SIZE_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("max_file_size_bytes", org.apache.thrift.protocol.TType.I64, (short)5);
  private static final org.apache.thrift.protocol.TField BROKER_ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("broker_addresses", org.apache.thrift.protocol.TType.LIST, (short)6);
  private static final org.apache.thrift.protocol.TField BROKER_PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("broker_properties", org.apache.thrift.protocol.TType.MAP, (short)7);
  private static final org.apache.thrift.protocol.TField SUCCESS_FILE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("success_file_name", org.apache.thrift.protocol.TType.STRING, (short)8);
  private static final org.apache.thrift.protocol.TField SCHEMA_FIELD_DESC = new org.apache.thrift.protocol.TField("schema", org.apache.thrift.protocol.TType.LIST, (short)9);
  private static final org.apache.thrift.protocol.TField FILE_PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("file_properties", org.apache.thrift.protocol.TType.MAP, (short)10);
  private static final org.apache.thrift.protocol.TField PARQUET_SCHEMAS_FIELD_DESC = new org.apache.thrift.protocol.TField("parquet_schemas", org.apache.thrift.protocol.TType.LIST, (short)11);
  private static final org.apache.thrift.protocol.TField PARQUET_COMPRESSION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("parquet_compression_type", org.apache.thrift.protocol.TType.I32, (short)12);
  private static final org.apache.thrift.protocol.TField PARQUET_DISABLE_DICTIONARY_FIELD_DESC = new org.apache.thrift.protocol.TField("parquet_disable_dictionary", org.apache.thrift.protocol.TType.BOOL, (short)13);
  private static final org.apache.thrift.protocol.TField PARQUET_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("parquet_version", org.apache.thrift.protocol.TType.I32, (short)14);
  private static final org.apache.thrift.protocol.TField ORC_SCHEMA_FIELD_DESC = new org.apache.thrift.protocol.TField("orc_schema", org.apache.thrift.protocol.TType.STRING, (short)15);
  private static final org.apache.thrift.protocol.TField DELETE_EXISTING_FILES_FIELD_DESC = new org.apache.thrift.protocol.TField("delete_existing_files", org.apache.thrift.protocol.TType.BOOL, (short)16);
  private static final org.apache.thrift.protocol.TField FILE_SUFFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("file_suffix", org.apache.thrift.protocol.TType.STRING, (short)17);
  private static final org.apache.thrift.protocol.TField WITH_BOM_FIELD_DESC = new org.apache.thrift.protocol.TField("with_bom", org.apache.thrift.protocol.TType.BOOL, (short)18);
  private static final org.apache.thrift.protocol.TField ORC_COMPRESSION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("orc_compression_type", org.apache.thrift.protocol.TType.I32, (short)19);
  private static final org.apache.thrift.protocol.TField ORC_WRITER_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("orc_writer_version", org.apache.thrift.protocol.TType.I64, (short)20);
  private static final org.apache.thrift.protocol.TField ENABLE_INT96_TIMESTAMPS_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_int96_timestamps", org.apache.thrift.protocol.TType.BOOL, (short)21);
  private static final org.apache.thrift.protocol.TField COMPRESSION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("compression_type", org.apache.thrift.protocol.TType.I32, (short)22);

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

  public @org.apache.thrift.annotation.Nullable java.lang.String file_path; // required
  /**
   * 
   * @see org.apache.doris.thrift.TFileFormatType
   */
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TFileFormatType file_format; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String column_separator; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String line_delimiter; // optional
  public long max_file_size_bytes; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TNetworkAddress> broker_addresses; // optional
  public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> broker_properties; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String success_file_name; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.String>> schema; // optional
  public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> file_properties; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<TParquetSchema> parquet_schemas; // optional
  /**
   * 
   * @see TParquetCompressionType
   */
  public @org.apache.thrift.annotation.Nullable TParquetCompressionType parquet_compression_type; // optional
  public boolean parquet_disable_dictionary; // optional
  /**
   * 
   * @see TParquetVersion
   */
  public @org.apache.thrift.annotation.Nullable TParquetVersion parquet_version; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String orc_schema; // optional
  public boolean delete_existing_files; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String file_suffix; // optional
  public boolean with_bom; // optional
  /**
   * 
   * @see org.apache.doris.thrift.TFileCompressType
   */
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TFileCompressType orc_compression_type; // optional
  public long orc_writer_version; // optional
  public boolean enable_int96_timestamps; // optional
  /**
   * 
   * @see org.apache.doris.thrift.TFileCompressType
   */
  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TFileCompressType compression_type; // 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"),
    /**
     * 
     * @see org.apache.doris.thrift.TFileFormatType
     */
    FILE_FORMAT((short)2, "file_format"),
    COLUMN_SEPARATOR((short)3, "column_separator"),
    LINE_DELIMITER((short)4, "line_delimiter"),
    MAX_FILE_SIZE_BYTES((short)5, "max_file_size_bytes"),
    BROKER_ADDRESSES((short)6, "broker_addresses"),
    BROKER_PROPERTIES((short)7, "broker_properties"),
    SUCCESS_FILE_NAME((short)8, "success_file_name"),
    SCHEMA((short)9, "schema"),
    FILE_PROPERTIES((short)10, "file_properties"),
    PARQUET_SCHEMAS((short)11, "parquet_schemas"),
    /**
     * 
     * @see TParquetCompressionType
     */
    PARQUET_COMPRESSION_TYPE((short)12, "parquet_compression_type"),
    PARQUET_DISABLE_DICTIONARY((short)13, "parquet_disable_dictionary"),
    /**
     * 
     * @see TParquetVersion
     */
    PARQUET_VERSION((short)14, "parquet_version"),
    ORC_SCHEMA((short)15, "orc_schema"),
    DELETE_EXISTING_FILES((short)16, "delete_existing_files"),
    FILE_SUFFIX((short)17, "file_suffix"),
    WITH_BOM((short)18, "with_bom"),
    /**
     * 
     * @see org.apache.doris.thrift.TFileCompressType
     */
    ORC_COMPRESSION_TYPE((short)19, "orc_compression_type"),
    ORC_WRITER_VERSION((short)20, "orc_writer_version"),
    ENABLE_INT96_TIMESTAMPS((short)21, "enable_int96_timestamps"),
    /**
     * 
     * @see org.apache.doris.thrift.TFileCompressType
     */
    COMPRESSION_TYPE((short)22, "compression_type");

    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: // FILE_FORMAT
          return FILE_FORMAT;
        case 3: // COLUMN_SEPARATOR
          return COLUMN_SEPARATOR;
        case 4: // LINE_DELIMITER
          return LINE_DELIMITER;
        case 5: // MAX_FILE_SIZE_BYTES
          return MAX_FILE_SIZE_BYTES;
        case 6: // BROKER_ADDRESSES
          return BROKER_ADDRESSES;
        case 7: // BROKER_PROPERTIES
          return BROKER_PROPERTIES;
        case 8: // SUCCESS_FILE_NAME
          return SUCCESS_FILE_NAME;
        case 9: // SCHEMA
          return SCHEMA;
        case 10: // FILE_PROPERTIES
          return FILE_PROPERTIES;
        case 11: // PARQUET_SCHEMAS
          return PARQUET_SCHEMAS;
        case 12: // PARQUET_COMPRESSION_TYPE
          return PARQUET_COMPRESSION_TYPE;
        case 13: // PARQUET_DISABLE_DICTIONARY
          return PARQUET_DISABLE_DICTIONARY;
        case 14: // PARQUET_VERSION
          return PARQUET_VERSION;
        case 15: // ORC_SCHEMA
          return ORC_SCHEMA;
        case 16: // DELETE_EXISTING_FILES
          return DELETE_EXISTING_FILES;
        case 17: // FILE_SUFFIX
          return FILE_SUFFIX;
        case 18: // WITH_BOM
          return WITH_BOM;
        case 19: // ORC_COMPRESSION_TYPE
          return ORC_COMPRESSION_TYPE;
        case 20: // ORC_WRITER_VERSION
          return ORC_WRITER_VERSION;
        case 21: // ENABLE_INT96_TIMESTAMPS
          return ENABLE_INT96_TIMESTAMPS;
        case 22: // COMPRESSION_TYPE
          return COMPRESSION_TYPE;
        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 __MAX_FILE_SIZE_BYTES_ISSET_ID = 0;
  private static final int __PARQUET_DISABLE_DICTIONARY_ISSET_ID = 1;
  private static final int __DELETE_EXISTING_FILES_ISSET_ID = 2;
  private static final int __WITH_BOM_ISSET_ID = 3;
  private static final int __ORC_WRITER_VERSION_ISSET_ID = 4;
  private static final int __ENABLE_INT96_TIMESTAMPS_ISSET_ID = 5;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.COLUMN_SEPARATOR,_Fields.LINE_DELIMITER,_Fields.MAX_FILE_SIZE_BYTES,_Fields.BROKER_ADDRESSES,_Fields.BROKER_PROPERTIES,_Fields.SUCCESS_FILE_NAME,_Fields.SCHEMA,_Fields.FILE_PROPERTIES,_Fields.PARQUET_SCHEMAS,_Fields.PARQUET_COMPRESSION_TYPE,_Fields.PARQUET_DISABLE_DICTIONARY,_Fields.PARQUET_VERSION,_Fields.ORC_SCHEMA,_Fields.DELETE_EXISTING_FILES,_Fields.FILE_SUFFIX,_Fields.WITH_BOM,_Fields.ORC_COMPRESSION_TYPE,_Fields.ORC_WRITER_VERSION,_Fields.ENABLE_INT96_TIMESTAMPS,_Fields.COMPRESSION_TYPE};
  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.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.FILE_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("file_format", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.doris.thrift.TFileFormatType.class)));
    tmpMap.put(_Fields.COLUMN_SEPARATOR, new org.apache.thrift.meta_data.FieldMetaData("column_separator", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.LINE_DELIMITER, new org.apache.thrift.meta_data.FieldMetaData("line_delimiter", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.MAX_FILE_SIZE_BYTES, new org.apache.thrift.meta_data.FieldMetaData("max_file_size_bytes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.BROKER_ADDRESSES, new org.apache.thrift.meta_data.FieldMetaData("broker_addresses", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TNetworkAddress.class))));
    tmpMap.put(_Fields.BROKER_PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("broker_properties", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.SUCCESS_FILE_NAME, new org.apache.thrift.meta_data.FieldMetaData("success_file_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SCHEMA, new org.apache.thrift.meta_data.FieldMetaData("schema", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            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.FILE_PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("file_properties", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.PARQUET_SCHEMAS, new org.apache.thrift.meta_data.FieldMetaData("parquet_schemas", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TParquetSchema.class))));
    tmpMap.put(_Fields.PARQUET_COMPRESSION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("parquet_compression_type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TParquetCompressionType.class)));
    tmpMap.put(_Fields.PARQUET_DISABLE_DICTIONARY, new org.apache.thrift.meta_data.FieldMetaData("parquet_disable_dictionary", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.PARQUET_VERSION, new org.apache.thrift.meta_data.FieldMetaData("parquet_version", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TParquetVersion.class)));
    tmpMap.put(_Fields.ORC_SCHEMA, new org.apache.thrift.meta_data.FieldMetaData("orc_schema", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.DELETE_EXISTING_FILES, new org.apache.thrift.meta_data.FieldMetaData("delete_existing_files", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.FILE_SUFFIX, new org.apache.thrift.meta_data.FieldMetaData("file_suffix", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.WITH_BOM, new org.apache.thrift.meta_data.FieldMetaData("with_bom", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.ORC_COMPRESSION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("orc_compression_type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.doris.thrift.TFileCompressType.class)));
    tmpMap.put(_Fields.ORC_WRITER_VERSION, new org.apache.thrift.meta_data.FieldMetaData("orc_writer_version", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.ENABLE_INT96_TIMESTAMPS, new org.apache.thrift.meta_data.FieldMetaData("enable_int96_timestamps", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.COMPRESSION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("compression_type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, org.apache.doris.thrift.TFileCompressType.class)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TResultFileSinkOptions.class, metaDataMap);
  }

  public TResultFileSinkOptions() {
  }

  public TResultFileSinkOptions(
    java.lang.String file_path,
    org.apache.doris.thrift.TFileFormatType file_format)
  {
    this();
    this.file_path = file_path;
    this.file_format = file_format;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TResultFileSinkOptions(TResultFileSinkOptions other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetFilePath()) {
      this.file_path = other.file_path;
    }
    if (other.isSetFileFormat()) {
      this.file_format = other.file_format;
    }
    if (other.isSetColumnSeparator()) {
      this.column_separator = other.column_separator;
    }
    if (other.isSetLineDelimiter()) {
      this.line_delimiter = other.line_delimiter;
    }
    this.max_file_size_bytes = other.max_file_size_bytes;
    if (other.isSetBrokerAddresses()) {
      java.util.List<org.apache.doris.thrift.TNetworkAddress> __this__broker_addresses = new java.util.ArrayList<org.apache.doris.thrift.TNetworkAddress>(other.broker_addresses.size());
      for (org.apache.doris.thrift.TNetworkAddress other_element : other.broker_addresses) {
        __this__broker_addresses.add(new org.apache.doris.thrift.TNetworkAddress(other_element));
      }
      this.broker_addresses = __this__broker_addresses;
    }
    if (other.isSetBrokerProperties()) {
      java.util.Map<java.lang.String,java.lang.String> __this__broker_properties = new java.util.HashMap<java.lang.String,java.lang.String>(other.broker_properties);
      this.broker_properties = __this__broker_properties;
    }
    if (other.isSetSuccessFileName()) {
      this.success_file_name = other.success_file_name;
    }
    if (other.isSetSchema()) {
      java.util.List<java.util.List<java.lang.String>> __this__schema = new java.util.ArrayList<java.util.List<java.lang.String>>(other.schema.size());
      for (java.util.List<java.lang.String> other_element : other.schema) {
        java.util.List<java.lang.String> __this__schema_copy = new java.util.ArrayList<java.lang.String>(other_element);
        __this__schema.add(__this__schema_copy);
      }
      this.schema = __this__schema;
    }
    if (other.isSetFileProperties()) {
      java.util.Map<java.lang.String,java.lang.String> __this__file_properties = new java.util.HashMap<java.lang.String,java.lang.String>(other.file_properties);
      this.file_properties = __this__file_properties;
    }
    if (other.isSetParquetSchemas()) {
      java.util.List<TParquetSchema> __this__parquet_schemas = new java.util.ArrayList<TParquetSchema>(other.parquet_schemas.size());
      for (TParquetSchema other_element : other.parquet_schemas) {
        __this__parquet_schemas.add(new TParquetSchema(other_element));
      }
      this.parquet_schemas = __this__parquet_schemas;
    }
    if (other.isSetParquetCompressionType()) {
      this.parquet_compression_type = other.parquet_compression_type;
    }
    this.parquet_disable_dictionary = other.parquet_disable_dictionary;
    if (other.isSetParquetVersion()) {
      this.parquet_version = other.parquet_version;
    }
    if (other.isSetOrcSchema()) {
      this.orc_schema = other.orc_schema;
    }
    this.delete_existing_files = other.delete_existing_files;
    if (other.isSetFileSuffix()) {
      this.file_suffix = other.file_suffix;
    }
    this.with_bom = other.with_bom;
    if (other.isSetOrcCompressionType()) {
      this.orc_compression_type = other.orc_compression_type;
    }
    this.orc_writer_version = other.orc_writer_version;
    this.enable_int96_timestamps = other.enable_int96_timestamps;
    if (other.isSetCompressionType()) {
      this.compression_type = other.compression_type;
    }
  }

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

  @Override
  public void clear() {
    this.file_path = null;
    this.file_format = null;
    this.column_separator = null;
    this.line_delimiter = null;
    setMaxFileSizeBytesIsSet(false);
    this.max_file_size_bytes = 0;
    this.broker_addresses = null;
    this.broker_properties = null;
    this.success_file_name = null;
    this.schema = null;
    this.file_properties = null;
    this.parquet_schemas = null;
    this.parquet_compression_type = null;
    setParquetDisableDictionaryIsSet(false);
    this.parquet_disable_dictionary = false;
    this.parquet_version = null;
    this.orc_schema = null;
    setDeleteExistingFilesIsSet(false);
    this.delete_existing_files = false;
    this.file_suffix = null;
    setWithBomIsSet(false);
    this.with_bom = false;
    this.orc_compression_type = null;
    setOrcWriterVersionIsSet(false);
    this.orc_writer_version = 0;
    setEnableInt96TimestampsIsSet(false);
    this.enable_int96_timestamps = false;
    this.compression_type = null;
  }

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

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

  /**
   * 
   * @see org.apache.doris.thrift.TFileFormatType
   */
  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TFileFormatType getFileFormat() {
    return this.file_format;
  }

  /**
   * 
   * @see org.apache.doris.thrift.TFileFormatType
   */
  public TResultFileSinkOptions setFileFormat(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TFileFormatType file_format) {
    this.file_format = file_format;
    return this;
  }

  public void unsetFileFormat() {
    this.file_format = null;
  }

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

  public void setFileFormatIsSet(boolean value) {
    if (!value) {
      this.file_format = null;
    }
  }

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

  public TResultFileSinkOptions setColumnSeparator(@org.apache.thrift.annotation.Nullable java.lang.String column_separator) {
    this.column_separator = column_separator;
    return this;
  }

  public void unsetColumnSeparator() {
    this.column_separator = null;
  }

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

  public void setColumnSeparatorIsSet(boolean value) {
    if (!value) {
      this.column_separator = null;
    }
  }

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

  public TResultFileSinkOptions setLineDelimiter(@org.apache.thrift.annotation.Nullable java.lang.String line_delimiter) {
    this.line_delimiter = line_delimiter;
    return this;
  }

  public void unsetLineDelimiter() {
    this.line_delimiter = null;
  }

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

  public void setLineDelimiterIsSet(boolean value) {
    if (!value) {
      this.line_delimiter = null;
    }
  }

  public long getMaxFileSizeBytes() {
    return this.max_file_size_bytes;
  }

  public TResultFileSinkOptions setMaxFileSizeBytes(long max_file_size_bytes) {
    this.max_file_size_bytes = max_file_size_bytes;
    setMaxFileSizeBytesIsSet(true);
    return this;
  }

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

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

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

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<org.apache.doris.thrift.TNetworkAddress> getBrokerAddressesIterator() {
    return (this.broker_addresses == null) ? null : this.broker_addresses.iterator();
  }

  public void addToBrokerAddresses(org.apache.doris.thrift.TNetworkAddress elem) {
    if (this.broker_addresses == null) {
      this.broker_addresses = new java.util.ArrayList<org.apache.doris.thrift.TNetworkAddress>();
    }
    this.broker_addresses.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<org.apache.doris.thrift.TNetworkAddress> getBrokerAddresses() {
    return this.broker_addresses;
  }

  public TResultFileSinkOptions setBrokerAddresses(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TNetworkAddress> broker_addresses) {
    this.broker_addresses = broker_addresses;
    return this;
  }

  public void unsetBrokerAddresses() {
    this.broker_addresses = null;
  }

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

  public void setBrokerAddressesIsSet(boolean value) {
    if (!value) {
      this.broker_addresses = null;
    }
  }

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

  public void putToBrokerProperties(java.lang.String key, java.lang.String val) {
    if (this.broker_properties == null) {
      this.broker_properties = new java.util.HashMap<java.lang.String,java.lang.String>();
    }
    this.broker_properties.put(key, val);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Map<java.lang.String,java.lang.String> getBrokerProperties() {
    return this.broker_properties;
  }

  public TResultFileSinkOptions setBrokerProperties(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> broker_properties) {
    this.broker_properties = broker_properties;
    return this;
  }

  public void unsetBrokerProperties() {
    this.broker_properties = null;
  }

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

  public void setBrokerPropertiesIsSet(boolean value) {
    if (!value) {
      this.broker_properties = null;
    }
  }

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

  public TResultFileSinkOptions setSuccessFileName(@org.apache.thrift.annotation.Nullable java.lang.String success_file_name) {
    this.success_file_name = success_file_name;
    return this;
  }

  public void unsetSuccessFileName() {
    this.success_file_name = null;
  }

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

  public void setSuccessFileNameIsSet(boolean value) {
    if (!value) {
      this.success_file_name = null;
    }
  }

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

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

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

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

  public TResultFileSinkOptions setSchema(@org.apache.thrift.annotation.Nullable java.util.List<java.util.List<java.lang.String>> schema) {
    this.schema = schema;
    return this;
  }

  public void unsetSchema() {
    this.schema = null;
  }

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

  public void setSchemaIsSet(boolean value) {
    if (!value) {
      this.schema = null;
    }
  }

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

  public void putToFileProperties(java.lang.String key, java.lang.String val) {
    if (this.file_properties == null) {
      this.file_properties = new java.util.HashMap<java.lang.String,java.lang.String>();
    }
    this.file_properties.put(key, val);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Map<java.lang.String,java.lang.String> getFileProperties() {
    return this.file_properties;
  }

  public TResultFileSinkOptions setFileProperties(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> file_properties) {
    this.file_properties = file_properties;
    return this;
  }

  public void unsetFileProperties() {
    this.file_properties = null;
  }

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

  public void setFilePropertiesIsSet(boolean value) {
    if (!value) {
      this.file_properties = null;
    }
  }

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<TParquetSchema> getParquetSchemasIterator() {
    return (this.parquet_schemas == null) ? null : this.parquet_schemas.iterator();
  }

  public void addToParquetSchemas(TParquetSchema elem) {
    if (this.parquet_schemas == null) {
      this.parquet_schemas = new java.util.ArrayList<TParquetSchema>();
    }
    this.parquet_schemas.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<TParquetSchema> getParquetSchemas() {
    return this.parquet_schemas;
  }

  public TResultFileSinkOptions setParquetSchemas(@org.apache.thrift.annotation.Nullable java.util.List<TParquetSchema> parquet_schemas) {
    this.parquet_schemas = parquet_schemas;
    return this;
  }

  public void unsetParquetSchemas() {
    this.parquet_schemas = null;
  }

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

  public void setParquetSchemasIsSet(boolean value) {
    if (!value) {
      this.parquet_schemas = null;
    }
  }

  /**
   * 
   * @see TParquetCompressionType
   */
  @org.apache.thrift.annotation.Nullable
  public TParquetCompressionType getParquetCompressionType() {
    return this.parquet_compression_type;
  }

  /**
   * 
   * @see TParquetCompressionType
   */
  public TResultFileSinkOptions setParquetCompressionType(@org.apache.thrift.annotation.Nullable TParquetCompressionType parquet_compression_type) {
    this.parquet_compression_type = parquet_compression_type;
    return this;
  }

  public void unsetParquetCompressionType() {
    this.parquet_compression_type = null;
  }

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

  public void setParquetCompressionTypeIsSet(boolean value) {
    if (!value) {
      this.parquet_compression_type = null;
    }
  }

  public boolean isParquetDisableDictionary() {
    return this.parquet_disable_dictionary;
  }

  public TResultFileSinkOptions setParquetDisableDictionary(boolean parquet_disable_dictionary) {
    this.parquet_disable_dictionary = parquet_disable_dictionary;
    setParquetDisableDictionaryIsSet(true);
    return this;
  }

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

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

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

  /**
   * 
   * @see TParquetVersion
   */
  @org.apache.thrift.annotation.Nullable
  public TParquetVersion getParquetVersion() {
    return this.parquet_version;
  }

  /**
   * 
   * @see TParquetVersion
   */
  public TResultFileSinkOptions setParquetVersion(@org.apache.thrift.annotation.Nullable TParquetVersion parquet_version) {
    this.parquet_version = parquet_version;
    return this;
  }

  public void unsetParquetVersion() {
    this.parquet_version = null;
  }

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

  public void setParquetVersionIsSet(boolean value) {
    if (!value) {
      this.parquet_version = null;
    }
  }

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

  public TResultFileSinkOptions setOrcSchema(@org.apache.thrift.annotation.Nullable java.lang.String orc_schema) {
    this.orc_schema = orc_schema;
    return this;
  }

  public void unsetOrcSchema() {
    this.orc_schema = null;
  }

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

  public void setOrcSchemaIsSet(boolean value) {
    if (!value) {
      this.orc_schema = null;
    }
  }

  public boolean isDeleteExistingFiles() {
    return this.delete_existing_files;
  }

  public TResultFileSinkOptions setDeleteExistingFiles(boolean delete_existing_files) {
    this.delete_existing_files = delete_existing_files;
    setDeleteExistingFilesIsSet(true);
    return this;
  }

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

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

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

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

  public TResultFileSinkOptions setFileSuffix(@org.apache.thrift.annotation.Nullable java.lang.String file_suffix) {
    this.file_suffix = file_suffix;
    return this;
  }

  public void unsetFileSuffix() {
    this.file_suffix = null;
  }

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

  public void setFileSuffixIsSet(boolean value) {
    if (!value) {
      this.file_suffix = null;
    }
  }

  public boolean isWithBom() {
    return this.with_bom;
  }

  public TResultFileSinkOptions setWithBom(boolean with_bom) {
    this.with_bom = with_bom;
    setWithBomIsSet(true);
    return this;
  }

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

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

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

  /**
   * 
   * @see org.apache.doris.thrift.TFileCompressType
   */
  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TFileCompressType getOrcCompressionType() {
    return this.orc_compression_type;
  }

  /**
   * 
   * @see org.apache.doris.thrift.TFileCompressType
   */
  public TResultFileSinkOptions setOrcCompressionType(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TFileCompressType orc_compression_type) {
    this.orc_compression_type = orc_compression_type;
    return this;
  }

  public void unsetOrcCompressionType() {
    this.orc_compression_type = null;
  }

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

  public void setOrcCompressionTypeIsSet(boolean value) {
    if (!value) {
      this.orc_compression_type = null;
    }
  }

  public long getOrcWriterVersion() {
    return this.orc_writer_version;
  }

  public TResultFileSinkOptions setOrcWriterVersion(long orc_writer_version) {
    this.orc_writer_version = orc_writer_version;
    setOrcWriterVersionIsSet(true);
    return this;
  }

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

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

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

  public boolean isEnableInt96Timestamps() {
    return this.enable_int96_timestamps;
  }

  public TResultFileSinkOptions setEnableInt96Timestamps(boolean enable_int96_timestamps) {
    this.enable_int96_timestamps = enable_int96_timestamps;
    setEnableInt96TimestampsIsSet(true);
    return this;
  }

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

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

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

  /**
   * 
   * @see org.apache.doris.thrift.TFileCompressType
   */
  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TFileCompressType getCompressionType() {
    return this.compression_type;
  }

  /**
   * 
   * @see org.apache.doris.thrift.TFileCompressType
   */
  public TResultFileSinkOptions setCompressionType(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TFileCompressType compression_type) {
    this.compression_type = compression_type;
    return this;
  }

  public void unsetCompressionType() {
    this.compression_type = null;
  }

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

  public void setCompressionTypeIsSet(boolean value) {
    if (!value) {
      this.compression_type = 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 FILE_FORMAT:
      if (value == null) {
        unsetFileFormat();
      } else {
        setFileFormat((org.apache.doris.thrift.TFileFormatType)value);
      }
      break;

    case COLUMN_SEPARATOR:
      if (value == null) {
        unsetColumnSeparator();
      } else {
        setColumnSeparator((java.lang.String)value);
      }
      break;

    case LINE_DELIMITER:
      if (value == null) {
        unsetLineDelimiter();
      } else {
        setLineDelimiter((java.lang.String)value);
      }
      break;

    case MAX_FILE_SIZE_BYTES:
      if (value == null) {
        unsetMaxFileSizeBytes();
      } else {
        setMaxFileSizeBytes((java.lang.Long)value);
      }
      break;

    case BROKER_ADDRESSES:
      if (value == null) {
        unsetBrokerAddresses();
      } else {
        setBrokerAddresses((java.util.List<org.apache.doris.thrift.TNetworkAddress>)value);
      }
      break;

    case BROKER_PROPERTIES:
      if (value == null) {
        unsetBrokerProperties();
      } else {
        setBrokerProperties((java.util.Map<java.lang.String,java.lang.String>)value);
      }
      break;

    case SUCCESS_FILE_NAME:
      if (value == null) {
        unsetSuccessFileName();
      } else {
        setSuccessFileName((java.lang.String)value);
      }
      break;

    case SCHEMA:
      if (value == null) {
        unsetSchema();
      } else {
        setSchema((java.util.List<java.util.List<java.lang.String>>)value);
      }
      break;

    case FILE_PROPERTIES:
      if (value == null) {
        unsetFileProperties();
      } else {
        setFileProperties((java.util.Map<java.lang.String,java.lang.String>)value);
      }
      break;

    case PARQUET_SCHEMAS:
      if (value == null) {
        unsetParquetSchemas();
      } else {
        setParquetSchemas((java.util.List<TParquetSchema>)value);
      }
      break;

    case PARQUET_COMPRESSION_TYPE:
      if (value == null) {
        unsetParquetCompressionType();
      } else {
        setParquetCompressionType((TParquetCompressionType)value);
      }
      break;

    case PARQUET_DISABLE_DICTIONARY:
      if (value == null) {
        unsetParquetDisableDictionary();
      } else {
        setParquetDisableDictionary((java.lang.Boolean)value);
      }
      break;

    case PARQUET_VERSION:
      if (value == null) {
        unsetParquetVersion();
      } else {
        setParquetVersion((TParquetVersion)value);
      }
      break;

    case ORC_SCHEMA:
      if (value == null) {
        unsetOrcSchema();
      } else {
        setOrcSchema((java.lang.String)value);
      }
      break;

    case DELETE_EXISTING_FILES:
      if (value == null) {
        unsetDeleteExistingFiles();
      } else {
        setDeleteExistingFiles((java.lang.Boolean)value);
      }
      break;

    case FILE_SUFFIX:
      if (value == null) {
        unsetFileSuffix();
      } else {
        setFileSuffix((java.lang.String)value);
      }
      break;

    case WITH_BOM:
      if (value == null) {
        unsetWithBom();
      } else {
        setWithBom((java.lang.Boolean)value);
      }
      break;

    case ORC_COMPRESSION_TYPE:
      if (value == null) {
        unsetOrcCompressionType();
      } else {
        setOrcCompressionType((org.apache.doris.thrift.TFileCompressType)value);
      }
      break;

    case ORC_WRITER_VERSION:
      if (value == null) {
        unsetOrcWriterVersion();
      } else {
        setOrcWriterVersion((java.lang.Long)value);
      }
      break;

    case ENABLE_INT96_TIMESTAMPS:
      if (value == null) {
        unsetEnableInt96Timestamps();
      } else {
        setEnableInt96Timestamps((java.lang.Boolean)value);
      }
      break;

    case COMPRESSION_TYPE:
      if (value == null) {
        unsetCompressionType();
      } else {
        setCompressionType((org.apache.doris.thrift.TFileCompressType)value);
      }
      break;

    }
  }

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

    case FILE_FORMAT:
      return getFileFormat();

    case COLUMN_SEPARATOR:
      return getColumnSeparator();

    case LINE_DELIMITER:
      return getLineDelimiter();

    case MAX_FILE_SIZE_BYTES:
      return getMaxFileSizeBytes();

    case BROKER_ADDRESSES:
      return getBrokerAddresses();

    case BROKER_PROPERTIES:
      return getBrokerProperties();

    case SUCCESS_FILE_NAME:
      return getSuccessFileName();

    case SCHEMA:
      return getSchema();

    case FILE_PROPERTIES:
      return getFileProperties();

    case PARQUET_SCHEMAS:
      return getParquetSchemas();

    case PARQUET_COMPRESSION_TYPE:
      return getParquetCompressionType();

    case PARQUET_DISABLE_DICTIONARY:
      return isParquetDisableDictionary();

    case PARQUET_VERSION:
      return getParquetVersion();

    case ORC_SCHEMA:
      return getOrcSchema();

    case DELETE_EXISTING_FILES:
      return isDeleteExistingFiles();

    case FILE_SUFFIX:
      return getFileSuffix();

    case WITH_BOM:
      return isWithBom();

    case ORC_COMPRESSION_TYPE:
      return getOrcCompressionType();

    case ORC_WRITER_VERSION:
      return getOrcWriterVersion();

    case ENABLE_INT96_TIMESTAMPS:
      return isEnableInt96Timestamps();

    case COMPRESSION_TYPE:
      return getCompressionType();

    }
    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 FILE_FORMAT:
      return isSetFileFormat();
    case COLUMN_SEPARATOR:
      return isSetColumnSeparator();
    case LINE_DELIMITER:
      return isSetLineDelimiter();
    case MAX_FILE_SIZE_BYTES:
      return isSetMaxFileSizeBytes();
    case BROKER_ADDRESSES:
      return isSetBrokerAddresses();
    case BROKER_PROPERTIES:
      return isSetBrokerProperties();
    case SUCCESS_FILE_NAME:
      return isSetSuccessFileName();
    case SCHEMA:
      return isSetSchema();
    case FILE_PROPERTIES:
      return isSetFileProperties();
    case PARQUET_SCHEMAS:
      return isSetParquetSchemas();
    case PARQUET_COMPRESSION_TYPE:
      return isSetParquetCompressionType();
    case PARQUET_DISABLE_DICTIONARY:
      return isSetParquetDisableDictionary();
    case PARQUET_VERSION:
      return isSetParquetVersion();
    case ORC_SCHEMA:
      return isSetOrcSchema();
    case DELETE_EXISTING_FILES:
      return isSetDeleteExistingFiles();
    case FILE_SUFFIX:
      return isSetFileSuffix();
    case WITH_BOM:
      return isSetWithBom();
    case ORC_COMPRESSION_TYPE:
      return isSetOrcCompressionType();
    case ORC_WRITER_VERSION:
      return isSetOrcWriterVersion();
    case ENABLE_INT96_TIMESTAMPS:
      return isSetEnableInt96Timestamps();
    case COMPRESSION_TYPE:
      return isSetCompressionType();
    }
    throw new java.lang.IllegalStateException();
  }

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

  public boolean equals(TResultFileSinkOptions 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_file_format = true && this.isSetFileFormat();
    boolean that_present_file_format = true && that.isSetFileFormat();
    if (this_present_file_format || that_present_file_format) {
      if (!(this_present_file_format && that_present_file_format))
        return false;
      if (!this.file_format.equals(that.file_format))
        return false;
    }

    boolean this_present_column_separator = true && this.isSetColumnSeparator();
    boolean that_present_column_separator = true && that.isSetColumnSeparator();
    if (this_present_column_separator || that_present_column_separator) {
      if (!(this_present_column_separator && that_present_column_separator))
        return false;
      if (!this.column_separator.equals(that.column_separator))
        return false;
    }

    boolean this_present_line_delimiter = true && this.isSetLineDelimiter();
    boolean that_present_line_delimiter = true && that.isSetLineDelimiter();
    if (this_present_line_delimiter || that_present_line_delimiter) {
      if (!(this_present_line_delimiter && that_present_line_delimiter))
        return false;
      if (!this.line_delimiter.equals(that.line_delimiter))
        return false;
    }

    boolean this_present_max_file_size_bytes = true && this.isSetMaxFileSizeBytes();
    boolean that_present_max_file_size_bytes = true && that.isSetMaxFileSizeBytes();
    if (this_present_max_file_size_bytes || that_present_max_file_size_bytes) {
      if (!(this_present_max_file_size_bytes && that_present_max_file_size_bytes))
        return false;
      if (this.max_file_size_bytes != that.max_file_size_bytes)
        return false;
    }

    boolean this_present_broker_addresses = true && this.isSetBrokerAddresses();
    boolean that_present_broker_addresses = true && that.isSetBrokerAddresses();
    if (this_present_broker_addresses || that_present_broker_addresses) {
      if (!(this_present_broker_addresses && that_present_broker_addresses))
        return false;
      if (!this.broker_addresses.equals(that.broker_addresses))
        return false;
    }

    boolean this_present_broker_properties = true && this.isSetBrokerProperties();
    boolean that_present_broker_properties = true && that.isSetBrokerProperties();
    if (this_present_broker_properties || that_present_broker_properties) {
      if (!(this_present_broker_properties && that_present_broker_properties))
        return false;
      if (!this.broker_properties.equals(that.broker_properties))
        return false;
    }

    boolean this_present_success_file_name = true && this.isSetSuccessFileName();
    boolean that_present_success_file_name = true && that.isSetSuccessFileName();
    if (this_present_success_file_name || that_present_success_file_name) {
      if (!(this_present_success_file_name && that_present_success_file_name))
        return false;
      if (!this.success_file_name.equals(that.success_file_name))
        return false;
    }

    boolean this_present_schema = true && this.isSetSchema();
    boolean that_present_schema = true && that.isSetSchema();
    if (this_present_schema || that_present_schema) {
      if (!(this_present_schema && that_present_schema))
        return false;
      if (!this.schema.equals(that.schema))
        return false;
    }

    boolean this_present_file_properties = true && this.isSetFileProperties();
    boolean that_present_file_properties = true && that.isSetFileProperties();
    if (this_present_file_properties || that_present_file_properties) {
      if (!(this_present_file_properties && that_present_file_properties))
        return false;
      if (!this.file_properties.equals(that.file_properties))
        return false;
    }

    boolean this_present_parquet_schemas = true && this.isSetParquetSchemas();
    boolean that_present_parquet_schemas = true && that.isSetParquetSchemas();
    if (this_present_parquet_schemas || that_present_parquet_schemas) {
      if (!(this_present_parquet_schemas && that_present_parquet_schemas))
        return false;
      if (!this.parquet_schemas.equals(that.parquet_schemas))
        return false;
    }

    boolean this_present_parquet_compression_type = true && this.isSetParquetCompressionType();
    boolean that_present_parquet_compression_type = true && that.isSetParquetCompressionType();
    if (this_present_parquet_compression_type || that_present_parquet_compression_type) {
      if (!(this_present_parquet_compression_type && that_present_parquet_compression_type))
        return false;
      if (!this.parquet_compression_type.equals(that.parquet_compression_type))
        return false;
    }

    boolean this_present_parquet_disable_dictionary = true && this.isSetParquetDisableDictionary();
    boolean that_present_parquet_disable_dictionary = true && that.isSetParquetDisableDictionary();
    if (this_present_parquet_disable_dictionary || that_present_parquet_disable_dictionary) {
      if (!(this_present_parquet_disable_dictionary && that_present_parquet_disable_dictionary))
        return false;
      if (this.parquet_disable_dictionary != that.parquet_disable_dictionary)
        return false;
    }

    boolean this_present_parquet_version = true && this.isSetParquetVersion();
    boolean that_present_parquet_version = true && that.isSetParquetVersion();
    if (this_present_parquet_version || that_present_parquet_version) {
      if (!(this_present_parquet_version && that_present_parquet_version))
        return false;
      if (!this.parquet_version.equals(that.parquet_version))
        return false;
    }

    boolean this_present_orc_schema = true && this.isSetOrcSchema();
    boolean that_present_orc_schema = true && that.isSetOrcSchema();
    if (this_present_orc_schema || that_present_orc_schema) {
      if (!(this_present_orc_schema && that_present_orc_schema))
        return false;
      if (!this.orc_schema.equals(that.orc_schema))
        return false;
    }

    boolean this_present_delete_existing_files = true && this.isSetDeleteExistingFiles();
    boolean that_present_delete_existing_files = true && that.isSetDeleteExistingFiles();
    if (this_present_delete_existing_files || that_present_delete_existing_files) {
      if (!(this_present_delete_existing_files && that_present_delete_existing_files))
        return false;
      if (this.delete_existing_files != that.delete_existing_files)
        return false;
    }

    boolean this_present_file_suffix = true && this.isSetFileSuffix();
    boolean that_present_file_suffix = true && that.isSetFileSuffix();
    if (this_present_file_suffix || that_present_file_suffix) {
      if (!(this_present_file_suffix && that_present_file_suffix))
        return false;
      if (!this.file_suffix.equals(that.file_suffix))
        return false;
    }

    boolean this_present_with_bom = true && this.isSetWithBom();
    boolean that_present_with_bom = true && that.isSetWithBom();
    if (this_present_with_bom || that_present_with_bom) {
      if (!(this_present_with_bom && that_present_with_bom))
        return false;
      if (this.with_bom != that.with_bom)
        return false;
    }

    boolean this_present_orc_compression_type = true && this.isSetOrcCompressionType();
    boolean that_present_orc_compression_type = true && that.isSetOrcCompressionType();
    if (this_present_orc_compression_type || that_present_orc_compression_type) {
      if (!(this_present_orc_compression_type && that_present_orc_compression_type))
        return false;
      if (!this.orc_compression_type.equals(that.orc_compression_type))
        return false;
    }

    boolean this_present_orc_writer_version = true && this.isSetOrcWriterVersion();
    boolean that_present_orc_writer_version = true && that.isSetOrcWriterVersion();
    if (this_present_orc_writer_version || that_present_orc_writer_version) {
      if (!(this_present_orc_writer_version && that_present_orc_writer_version))
        return false;
      if (this.orc_writer_version != that.orc_writer_version)
        return false;
    }

    boolean this_present_enable_int96_timestamps = true && this.isSetEnableInt96Timestamps();
    boolean that_present_enable_int96_timestamps = true && that.isSetEnableInt96Timestamps();
    if (this_present_enable_int96_timestamps || that_present_enable_int96_timestamps) {
      if (!(this_present_enable_int96_timestamps && that_present_enable_int96_timestamps))
        return false;
      if (this.enable_int96_timestamps != that.enable_int96_timestamps)
        return false;
    }

    boolean this_present_compression_type = true && this.isSetCompressionType();
    boolean that_present_compression_type = true && that.isSetCompressionType();
    if (this_present_compression_type || that_present_compression_type) {
      if (!(this_present_compression_type && that_present_compression_type))
        return false;
      if (!this.compression_type.equals(that.compression_type))
        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 + ((isSetFileFormat()) ? 131071 : 524287);
    if (isSetFileFormat())
      hashCode = hashCode * 8191 + file_format.getValue();

    hashCode = hashCode * 8191 + ((isSetColumnSeparator()) ? 131071 : 524287);
    if (isSetColumnSeparator())
      hashCode = hashCode * 8191 + column_separator.hashCode();

    hashCode = hashCode * 8191 + ((isSetLineDelimiter()) ? 131071 : 524287);
    if (isSetLineDelimiter())
      hashCode = hashCode * 8191 + line_delimiter.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetBrokerAddresses()) ? 131071 : 524287);
    if (isSetBrokerAddresses())
      hashCode = hashCode * 8191 + broker_addresses.hashCode();

    hashCode = hashCode * 8191 + ((isSetBrokerProperties()) ? 131071 : 524287);
    if (isSetBrokerProperties())
      hashCode = hashCode * 8191 + broker_properties.hashCode();

    hashCode = hashCode * 8191 + ((isSetSuccessFileName()) ? 131071 : 524287);
    if (isSetSuccessFileName())
      hashCode = hashCode * 8191 + success_file_name.hashCode();

    hashCode = hashCode * 8191 + ((isSetSchema()) ? 131071 : 524287);
    if (isSetSchema())
      hashCode = hashCode * 8191 + schema.hashCode();

    hashCode = hashCode * 8191 + ((isSetFileProperties()) ? 131071 : 524287);
    if (isSetFileProperties())
      hashCode = hashCode * 8191 + file_properties.hashCode();

    hashCode = hashCode * 8191 + ((isSetParquetSchemas()) ? 131071 : 524287);
    if (isSetParquetSchemas())
      hashCode = hashCode * 8191 + parquet_schemas.hashCode();

    hashCode = hashCode * 8191 + ((isSetParquetCompressionType()) ? 131071 : 524287);
    if (isSetParquetCompressionType())
      hashCode = hashCode * 8191 + parquet_compression_type.getValue();

    hashCode = hashCode * 8191 + ((isSetParquetDisableDictionary()) ? 131071 : 524287);
    if (isSetParquetDisableDictionary())
      hashCode = hashCode * 8191 + ((parquet_disable_dictionary) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetParquetVersion()) ? 131071 : 524287);
    if (isSetParquetVersion())
      hashCode = hashCode * 8191 + parquet_version.getValue();

    hashCode = hashCode * 8191 + ((isSetOrcSchema()) ? 131071 : 524287);
    if (isSetOrcSchema())
      hashCode = hashCode * 8191 + orc_schema.hashCode();

    hashCode = hashCode * 8191 + ((isSetDeleteExistingFiles()) ? 131071 : 524287);
    if (isSetDeleteExistingFiles())
      hashCode = hashCode * 8191 + ((delete_existing_files) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetFileSuffix()) ? 131071 : 524287);
    if (isSetFileSuffix())
      hashCode = hashCode * 8191 + file_suffix.hashCode();

    hashCode = hashCode * 8191 + ((isSetWithBom()) ? 131071 : 524287);
    if (isSetWithBom())
      hashCode = hashCode * 8191 + ((with_bom) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetOrcCompressionType()) ? 131071 : 524287);
    if (isSetOrcCompressionType())
      hashCode = hashCode * 8191 + orc_compression_type.getValue();

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

    hashCode = hashCode * 8191 + ((isSetEnableInt96Timestamps()) ? 131071 : 524287);
    if (isSetEnableInt96Timestamps())
      hashCode = hashCode * 8191 + ((enable_int96_timestamps) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetCompressionType()) ? 131071 : 524287);
    if (isSetCompressionType())
      hashCode = hashCode * 8191 + compression_type.getValue();

    return hashCode;
  }

  @Override
  public int compareTo(TResultFileSinkOptions 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(isSetFileFormat(), other.isSetFileFormat());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFileFormat()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file_format, other.file_format);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetColumnSeparator(), other.isSetColumnSeparator());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetColumnSeparator()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_separator, other.column_separator);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLineDelimiter(), other.isSetLineDelimiter());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLineDelimiter()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.line_delimiter, other.line_delimiter);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMaxFileSizeBytes(), other.isSetMaxFileSizeBytes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxFileSizeBytes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max_file_size_bytes, other.max_file_size_bytes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBrokerAddresses(), other.isSetBrokerAddresses());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBrokerAddresses()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.broker_addresses, other.broker_addresses);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBrokerProperties(), other.isSetBrokerProperties());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBrokerProperties()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.broker_properties, other.broker_properties);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSuccessFileName(), other.isSetSuccessFileName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSuccessFileName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success_file_name, other.success_file_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSchema(), other.isSetSchema());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSchema()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema, other.schema);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFileProperties(), other.isSetFileProperties());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFileProperties()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file_properties, other.file_properties);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetParquetSchemas(), other.isSetParquetSchemas());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetParquetSchemas()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parquet_schemas, other.parquet_schemas);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetParquetCompressionType(), other.isSetParquetCompressionType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetParquetCompressionType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parquet_compression_type, other.parquet_compression_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetParquetDisableDictionary(), other.isSetParquetDisableDictionary());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetParquetDisableDictionary()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parquet_disable_dictionary, other.parquet_disable_dictionary);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetParquetVersion(), other.isSetParquetVersion());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetParquetVersion()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parquet_version, other.parquet_version);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetOrcSchema(), other.isSetOrcSchema());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOrcSchema()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orc_schema, other.orc_schema);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDeleteExistingFiles(), other.isSetDeleteExistingFiles());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDeleteExistingFiles()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delete_existing_files, other.delete_existing_files);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFileSuffix(), other.isSetFileSuffix());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFileSuffix()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file_suffix, other.file_suffix);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetWithBom(), other.isSetWithBom());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWithBom()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.with_bom, other.with_bom);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetOrcCompressionType(), other.isSetOrcCompressionType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOrcCompressionType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orc_compression_type, other.orc_compression_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetOrcWriterVersion(), other.isSetOrcWriterVersion());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOrcWriterVersion()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orc_writer_version, other.orc_writer_version);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetEnableInt96Timestamps(), other.isSetEnableInt96Timestamps());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEnableInt96Timestamps()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_int96_timestamps, other.enable_int96_timestamps);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetCompressionType(), other.isSetCompressionType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCompressionType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compression_type, other.compression_type);
      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("TResultFileSinkOptions(");
    boolean first = true;

    sb.append("file_path:");
    if (this.file_path == null) {
      sb.append("null");
    } else {
      sb.append(this.file_path);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("file_format:");
    if (this.file_format == null) {
      sb.append("null");
    } else {
      sb.append(this.file_format);
    }
    first = false;
    if (isSetColumnSeparator()) {
      if (!first) sb.append(", ");
      sb.append("column_separator:");
      if (this.column_separator == null) {
        sb.append("null");
      } else {
        sb.append(this.column_separator);
      }
      first = false;
    }
    if (isSetLineDelimiter()) {
      if (!first) sb.append(", ");
      sb.append("line_delimiter:");
      if (this.line_delimiter == null) {
        sb.append("null");
      } else {
        sb.append(this.line_delimiter);
      }
      first = false;
    }
    if (isSetMaxFileSizeBytes()) {
      if (!first) sb.append(", ");
      sb.append("max_file_size_bytes:");
      sb.append(this.max_file_size_bytes);
      first = false;
    }
    if (isSetBrokerAddresses()) {
      if (!first) sb.append(", ");
      sb.append("broker_addresses:");
      if (this.broker_addresses == null) {
        sb.append("null");
      } else {
        sb.append(this.broker_addresses);
      }
      first = false;
    }
    if (isSetBrokerProperties()) {
      if (!first) sb.append(", ");
      sb.append("broker_properties:");
      if (this.broker_properties == null) {
        sb.append("null");
      } else {
        sb.append(this.broker_properties);
      }
      first = false;
    }
    if (isSetSuccessFileName()) {
      if (!first) sb.append(", ");
      sb.append("success_file_name:");
      if (this.success_file_name == null) {
        sb.append("null");
      } else {
        sb.append(this.success_file_name);
      }
      first = false;
    }
    if (isSetSchema()) {
      if (!first) sb.append(", ");
      sb.append("schema:");
      if (this.schema == null) {
        sb.append("null");
      } else {
        sb.append(this.schema);
      }
      first = false;
    }
    if (isSetFileProperties()) {
      if (!first) sb.append(", ");
      sb.append("file_properties:");
      if (this.file_properties == null) {
        sb.append("null");
      } else {
        sb.append(this.file_properties);
      }
      first = false;
    }
    if (isSetParquetSchemas()) {
      if (!first) sb.append(", ");
      sb.append("parquet_schemas:");
      if (this.parquet_schemas == null) {
        sb.append("null");
      } else {
        sb.append(this.parquet_schemas);
      }
      first = false;
    }
    if (isSetParquetCompressionType()) {
      if (!first) sb.append(", ");
      sb.append("parquet_compression_type:");
      if (this.parquet_compression_type == null) {
        sb.append("null");
      } else {
        sb.append(this.parquet_compression_type);
      }
      first = false;
    }
    if (isSetParquetDisableDictionary()) {
      if (!first) sb.append(", ");
      sb.append("parquet_disable_dictionary:");
      sb.append(this.parquet_disable_dictionary);
      first = false;
    }
    if (isSetParquetVersion()) {
      if (!first) sb.append(", ");
      sb.append("parquet_version:");
      if (this.parquet_version == null) {
        sb.append("null");
      } else {
        sb.append(this.parquet_version);
      }
      first = false;
    }
    if (isSetOrcSchema()) {
      if (!first) sb.append(", ");
      sb.append("orc_schema:");
      if (this.orc_schema == null) {
        sb.append("null");
      } else {
        sb.append(this.orc_schema);
      }
      first = false;
    }
    if (isSetDeleteExistingFiles()) {
      if (!first) sb.append(", ");
      sb.append("delete_existing_files:");
      sb.append(this.delete_existing_files);
      first = false;
    }
    if (isSetFileSuffix()) {
      if (!first) sb.append(", ");
      sb.append("file_suffix:");
      if (this.file_suffix == null) {
        sb.append("null");
      } else {
        sb.append(this.file_suffix);
      }
      first = false;
    }
    if (isSetWithBom()) {
      if (!first) sb.append(", ");
      sb.append("with_bom:");
      sb.append(this.with_bom);
      first = false;
    }
    if (isSetOrcCompressionType()) {
      if (!first) sb.append(", ");
      sb.append("orc_compression_type:");
      if (this.orc_compression_type == null) {
        sb.append("null");
      } else {
        sb.append(this.orc_compression_type);
      }
      first = false;
    }
    if (isSetOrcWriterVersion()) {
      if (!first) sb.append(", ");
      sb.append("orc_writer_version:");
      sb.append(this.orc_writer_version);
      first = false;
    }
    if (isSetEnableInt96Timestamps()) {
      if (!first) sb.append(", ");
      sb.append("enable_int96_timestamps:");
      sb.append(this.enable_int96_timestamps);
      first = false;
    }
    if (isSetCompressionType()) {
      if (!first) sb.append(", ");
      sb.append("compression_type:");
      if (this.compression_type == null) {
        sb.append("null");
      } else {
        sb.append(this.compression_type);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

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

  private static class TResultFileSinkOptionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TResultFileSinkOptions> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TResultFileSinkOptions 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: // FILE_FORMAT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.file_format = org.apache.doris.thrift.TFileFormatType.findByValue(iprot.readI32());
              struct.setFileFormatIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // COLUMN_SEPARATOR
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.column_separator = iprot.readString();
              struct.setColumnSeparatorIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // LINE_DELIMITER
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.line_delimiter = iprot.readString();
              struct.setLineDelimiterIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // MAX_FILE_SIZE_BYTES
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.max_file_size_bytes = iprot.readI64();
              struct.setMaxFileSizeBytesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // BROKER_ADDRESSES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                struct.broker_addresses = new java.util.ArrayList<org.apache.doris.thrift.TNetworkAddress>(_list0.size);
                @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNetworkAddress _elem1;
                for (int _i2 = 0; _i2 < _list0.size; ++_i2)
                {
                  _elem1 = new org.apache.doris.thrift.TNetworkAddress();
                  _elem1.read(iprot);
                  struct.broker_addresses.add(_elem1);
                }
                iprot.readListEnd();
              }
              struct.setBrokerAddressesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // BROKER_PROPERTIES
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map3 = iprot.readMapBegin();
                struct.broker_properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map3.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _key4;
                @org.apache.thrift.annotation.Nullable java.lang.String _val5;
                for (int _i6 = 0; _i6 < _map3.size; ++_i6)
                {
                  _key4 = iprot.readString();
                  _val5 = iprot.readString();
                  struct.broker_properties.put(_key4, _val5);
                }
                iprot.readMapEnd();
              }
              struct.setBrokerPropertiesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // SUCCESS_FILE_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.success_file_name = iprot.readString();
              struct.setSuccessFileNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // SCHEMA
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list7 = iprot.readListBegin();
                struct.schema = new java.util.ArrayList<java.util.List<java.lang.String>>(_list7.size);
                @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> _elem8;
                for (int _i9 = 0; _i9 < _list7.size; ++_i9)
                {
                  {
                    org.apache.thrift.protocol.TList _list10 = iprot.readListBegin();
                    _elem8 = new java.util.ArrayList<java.lang.String>(_list10.size);
                    @org.apache.thrift.annotation.Nullable java.lang.String _elem11;
                    for (int _i12 = 0; _i12 < _list10.size; ++_i12)
                    {
                      _elem11 = iprot.readString();
                      _elem8.add(_elem11);
                    }
                    iprot.readListEnd();
                  }
                  struct.schema.add(_elem8);
                }
                iprot.readListEnd();
              }
              struct.setSchemaIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // FILE_PROPERTIES
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map13 = iprot.readMapBegin();
                struct.file_properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map13.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _key14;
                @org.apache.thrift.annotation.Nullable java.lang.String _val15;
                for (int _i16 = 0; _i16 < _map13.size; ++_i16)
                {
                  _key14 = iprot.readString();
                  _val15 = iprot.readString();
                  struct.file_properties.put(_key14, _val15);
                }
                iprot.readMapEnd();
              }
              struct.setFilePropertiesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // PARQUET_SCHEMAS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list17 = iprot.readListBegin();
                struct.parquet_schemas = new java.util.ArrayList<TParquetSchema>(_list17.size);
                @org.apache.thrift.annotation.Nullable TParquetSchema _elem18;
                for (int _i19 = 0; _i19 < _list17.size; ++_i19)
                {
                  _elem18 = new TParquetSchema();
                  _elem18.read(iprot);
                  struct.parquet_schemas.add(_elem18);
                }
                iprot.readListEnd();
              }
              struct.setParquetSchemasIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // PARQUET_COMPRESSION_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.parquet_compression_type = org.apache.doris.thrift.TParquetCompressionType.findByValue(iprot.readI32());
              struct.setParquetCompressionTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // PARQUET_DISABLE_DICTIONARY
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.parquet_disable_dictionary = iprot.readBool();
              struct.setParquetDisableDictionaryIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 14: // PARQUET_VERSION
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.parquet_version = org.apache.doris.thrift.TParquetVersion.findByValue(iprot.readI32());
              struct.setParquetVersionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 15: // ORC_SCHEMA
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.orc_schema = iprot.readString();
              struct.setOrcSchemaIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 16: // DELETE_EXISTING_FILES
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.delete_existing_files = iprot.readBool();
              struct.setDeleteExistingFilesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 17: // FILE_SUFFIX
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.file_suffix = iprot.readString();
              struct.setFileSuffixIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 18: // WITH_BOM
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.with_bom = iprot.readBool();
              struct.setWithBomIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 19: // ORC_COMPRESSION_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.orc_compression_type = org.apache.doris.thrift.TFileCompressType.findByValue(iprot.readI32());
              struct.setOrcCompressionTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 20: // ORC_WRITER_VERSION
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.orc_writer_version = iprot.readI64();
              struct.setOrcWriterVersionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 21: // ENABLE_INT96_TIMESTAMPS
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.enable_int96_timestamps = iprot.readBool();
              struct.setEnableInt96TimestampsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 22: // COMPRESSION_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.compression_type = org.apache.doris.thrift.TFileCompressType.findByValue(iprot.readI32());
              struct.setCompressionTypeIsSet(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, TResultFileSinkOptions struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.file_path != null) {
        oprot.writeFieldBegin(FILE_PATH_FIELD_DESC);
        oprot.writeString(struct.file_path);
        oprot.writeFieldEnd();
      }
      if (struct.file_format != null) {
        oprot.writeFieldBegin(FILE_FORMAT_FIELD_DESC);
        oprot.writeI32(struct.file_format.getValue());
        oprot.writeFieldEnd();
      }
      if (struct.column_separator != null) {
        if (struct.isSetColumnSeparator()) {
          oprot.writeFieldBegin(COLUMN_SEPARATOR_FIELD_DESC);
          oprot.writeString(struct.column_separator);
          oprot.writeFieldEnd();
        }
      }
      if (struct.line_delimiter != null) {
        if (struct.isSetLineDelimiter()) {
          oprot.writeFieldBegin(LINE_DELIMITER_FIELD_DESC);
          oprot.writeString(struct.line_delimiter);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetMaxFileSizeBytes()) {
        oprot.writeFieldBegin(MAX_FILE_SIZE_BYTES_FIELD_DESC);
        oprot.writeI64(struct.max_file_size_bytes);
        oprot.writeFieldEnd();
      }
      if (struct.broker_addresses != null) {
        if (struct.isSetBrokerAddresses()) {
          oprot.writeFieldBegin(BROKER_ADDRESSES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.broker_addresses.size()));
            for (org.apache.doris.thrift.TNetworkAddress _iter20 : struct.broker_addresses)
            {
              _iter20.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.broker_properties != null) {
        if (struct.isSetBrokerProperties()) {
          oprot.writeFieldBegin(BROKER_PROPERTIES_FIELD_DESC);
          {
            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.broker_properties.size()));
            for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter21 : struct.broker_properties.entrySet())
            {
              oprot.writeString(_iter21.getKey());
              oprot.writeString(_iter21.getValue());
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.success_file_name != null) {
        if (struct.isSetSuccessFileName()) {
          oprot.writeFieldBegin(SUCCESS_FILE_NAME_FIELD_DESC);
          oprot.writeString(struct.success_file_name);
          oprot.writeFieldEnd();
        }
      }
      if (struct.schema != null) {
        if (struct.isSetSchema()) {
          oprot.writeFieldBegin(SCHEMA_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.LIST, struct.schema.size()));
            for (java.util.List<java.lang.String> _iter22 : struct.schema)
            {
              {
                oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter22.size()));
                for (java.lang.String _iter23 : _iter22)
                {
                  oprot.writeString(_iter23);
                }
                oprot.writeListEnd();
              }
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.file_properties != null) {
        if (struct.isSetFileProperties()) {
          oprot.writeFieldBegin(FILE_PROPERTIES_FIELD_DESC);
          {
            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.file_properties.size()));
            for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter24 : struct.file_properties.entrySet())
            {
              oprot.writeString(_iter24.getKey());
              oprot.writeString(_iter24.getValue());
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.parquet_schemas != null) {
        if (struct.isSetParquetSchemas()) {
          oprot.writeFieldBegin(PARQUET_SCHEMAS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.parquet_schemas.size()));
            for (TParquetSchema _iter25 : struct.parquet_schemas)
            {
              _iter25.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.parquet_compression_type != null) {
        if (struct.isSetParquetCompressionType()) {
          oprot.writeFieldBegin(PARQUET_COMPRESSION_TYPE_FIELD_DESC);
          oprot.writeI32(struct.parquet_compression_type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetParquetDisableDictionary()) {
        oprot.writeFieldBegin(PARQUET_DISABLE_DICTIONARY_FIELD_DESC);
        oprot.writeBool(struct.parquet_disable_dictionary);
        oprot.writeFieldEnd();
      }
      if (struct.parquet_version != null) {
        if (struct.isSetParquetVersion()) {
          oprot.writeFieldBegin(PARQUET_VERSION_FIELD_DESC);
          oprot.writeI32(struct.parquet_version.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.orc_schema != null) {
        if (struct.isSetOrcSchema()) {
          oprot.writeFieldBegin(ORC_SCHEMA_FIELD_DESC);
          oprot.writeString(struct.orc_schema);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetDeleteExistingFiles()) {
        oprot.writeFieldBegin(DELETE_EXISTING_FILES_FIELD_DESC);
        oprot.writeBool(struct.delete_existing_files);
        oprot.writeFieldEnd();
      }
      if (struct.file_suffix != null) {
        if (struct.isSetFileSuffix()) {
          oprot.writeFieldBegin(FILE_SUFFIX_FIELD_DESC);
          oprot.writeString(struct.file_suffix);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetWithBom()) {
        oprot.writeFieldBegin(WITH_BOM_FIELD_DESC);
        oprot.writeBool(struct.with_bom);
        oprot.writeFieldEnd();
      }
      if (struct.orc_compression_type != null) {
        if (struct.isSetOrcCompressionType()) {
          oprot.writeFieldBegin(ORC_COMPRESSION_TYPE_FIELD_DESC);
          oprot.writeI32(struct.orc_compression_type.getValue());
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetOrcWriterVersion()) {
        oprot.writeFieldBegin(ORC_WRITER_VERSION_FIELD_DESC);
        oprot.writeI64(struct.orc_writer_version);
        oprot.writeFieldEnd();
      }
      if (struct.isSetEnableInt96Timestamps()) {
        oprot.writeFieldBegin(ENABLE_INT96_TIMESTAMPS_FIELD_DESC);
        oprot.writeBool(struct.enable_int96_timestamps);
        oprot.writeFieldEnd();
      }
      if (struct.compression_type != null) {
        if (struct.isSetCompressionType()) {
          oprot.writeFieldBegin(COMPRESSION_TYPE_FIELD_DESC);
          oprot.writeI32(struct.compression_type.getValue());
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TResultFileSinkOptionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TResultFileSinkOptions> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TResultFileSinkOptions struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeString(struct.file_path);
      oprot.writeI32(struct.file_format.getValue());
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetColumnSeparator()) {
        optionals.set(0);
      }
      if (struct.isSetLineDelimiter()) {
        optionals.set(1);
      }
      if (struct.isSetMaxFileSizeBytes()) {
        optionals.set(2);
      }
      if (struct.isSetBrokerAddresses()) {
        optionals.set(3);
      }
      if (struct.isSetBrokerProperties()) {
        optionals.set(4);
      }
      if (struct.isSetSuccessFileName()) {
        optionals.set(5);
      }
      if (struct.isSetSchema()) {
        optionals.set(6);
      }
      if (struct.isSetFileProperties()) {
        optionals.set(7);
      }
      if (struct.isSetParquetSchemas()) {
        optionals.set(8);
      }
      if (struct.isSetParquetCompressionType()) {
        optionals.set(9);
      }
      if (struct.isSetParquetDisableDictionary()) {
        optionals.set(10);
      }
      if (struct.isSetParquetVersion()) {
        optionals.set(11);
      }
      if (struct.isSetOrcSchema()) {
        optionals.set(12);
      }
      if (struct.isSetDeleteExistingFiles()) {
        optionals.set(13);
      }
      if (struct.isSetFileSuffix()) {
        optionals.set(14);
      }
      if (struct.isSetWithBom()) {
        optionals.set(15);
      }
      if (struct.isSetOrcCompressionType()) {
        optionals.set(16);
      }
      if (struct.isSetOrcWriterVersion()) {
        optionals.set(17);
      }
      if (struct.isSetEnableInt96Timestamps()) {
        optionals.set(18);
      }
      if (struct.isSetCompressionType()) {
        optionals.set(19);
      }
      oprot.writeBitSet(optionals, 20);
      if (struct.isSetColumnSeparator()) {
        oprot.writeString(struct.column_separator);
      }
      if (struct.isSetLineDelimiter()) {
        oprot.writeString(struct.line_delimiter);
      }
      if (struct.isSetMaxFileSizeBytes()) {
        oprot.writeI64(struct.max_file_size_bytes);
      }
      if (struct.isSetBrokerAddresses()) {
        {
          oprot.writeI32(struct.broker_addresses.size());
          for (org.apache.doris.thrift.TNetworkAddress _iter26 : struct.broker_addresses)
          {
            _iter26.write(oprot);
          }
        }
      }
      if (struct.isSetBrokerProperties()) {
        {
          oprot.writeI32(struct.broker_properties.size());
          for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter27 : struct.broker_properties.entrySet())
          {
            oprot.writeString(_iter27.getKey());
            oprot.writeString(_iter27.getValue());
          }
        }
      }
      if (struct.isSetSuccessFileName()) {
        oprot.writeString(struct.success_file_name);
      }
      if (struct.isSetSchema()) {
        {
          oprot.writeI32(struct.schema.size());
          for (java.util.List<java.lang.String> _iter28 : struct.schema)
          {
            {
              oprot.writeI32(_iter28.size());
              for (java.lang.String _iter29 : _iter28)
              {
                oprot.writeString(_iter29);
              }
            }
          }
        }
      }
      if (struct.isSetFileProperties()) {
        {
          oprot.writeI32(struct.file_properties.size());
          for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter30 : struct.file_properties.entrySet())
          {
            oprot.writeString(_iter30.getKey());
            oprot.writeString(_iter30.getValue());
          }
        }
      }
      if (struct.isSetParquetSchemas()) {
        {
          oprot.writeI32(struct.parquet_schemas.size());
          for (TParquetSchema _iter31 : struct.parquet_schemas)
          {
            _iter31.write(oprot);
          }
        }
      }
      if (struct.isSetParquetCompressionType()) {
        oprot.writeI32(struct.parquet_compression_type.getValue());
      }
      if (struct.isSetParquetDisableDictionary()) {
        oprot.writeBool(struct.parquet_disable_dictionary);
      }
      if (struct.isSetParquetVersion()) {
        oprot.writeI32(struct.parquet_version.getValue());
      }
      if (struct.isSetOrcSchema()) {
        oprot.writeString(struct.orc_schema);
      }
      if (struct.isSetDeleteExistingFiles()) {
        oprot.writeBool(struct.delete_existing_files);
      }
      if (struct.isSetFileSuffix()) {
        oprot.writeString(struct.file_suffix);
      }
      if (struct.isSetWithBom()) {
        oprot.writeBool(struct.with_bom);
      }
      if (struct.isSetOrcCompressionType()) {
        oprot.writeI32(struct.orc_compression_type.getValue());
      }
      if (struct.isSetOrcWriterVersion()) {
        oprot.writeI64(struct.orc_writer_version);
      }
      if (struct.isSetEnableInt96Timestamps()) {
        oprot.writeBool(struct.enable_int96_timestamps);
      }
      if (struct.isSetCompressionType()) {
        oprot.writeI32(struct.compression_type.getValue());
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TResultFileSinkOptions struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.file_path = iprot.readString();
      struct.setFilePathIsSet(true);
      struct.file_format = org.apache.doris.thrift.TFileFormatType.findByValue(iprot.readI32());
      struct.setFileFormatIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(20);
      if (incoming.get(0)) {
        struct.column_separator = iprot.readString();
        struct.setColumnSeparatorIsSet(true);
      }
      if (incoming.get(1)) {
        struct.line_delimiter = iprot.readString();
        struct.setLineDelimiterIsSet(true);
      }
      if (incoming.get(2)) {
        struct.max_file_size_bytes = iprot.readI64();
        struct.setMaxFileSizeBytesIsSet(true);
      }
      if (incoming.get(3)) {
        {
          org.apache.thrift.protocol.TList _list32 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
          struct.broker_addresses = new java.util.ArrayList<org.apache.doris.thrift.TNetworkAddress>(_list32.size);
          @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNetworkAddress _elem33;
          for (int _i34 = 0; _i34 < _list32.size; ++_i34)
          {
            _elem33 = new org.apache.doris.thrift.TNetworkAddress();
            _elem33.read(iprot);
            struct.broker_addresses.add(_elem33);
          }
        }
        struct.setBrokerAddressesIsSet(true);
      }
      if (incoming.get(4)) {
        {
          org.apache.thrift.protocol.TMap _map35 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); 
          struct.broker_properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map35.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _key36;
          @org.apache.thrift.annotation.Nullable java.lang.String _val37;
          for (int _i38 = 0; _i38 < _map35.size; ++_i38)
          {
            _key36 = iprot.readString();
            _val37 = iprot.readString();
            struct.broker_properties.put(_key36, _val37);
          }
        }
        struct.setBrokerPropertiesIsSet(true);
      }
      if (incoming.get(5)) {
        struct.success_file_name = iprot.readString();
        struct.setSuccessFileNameIsSet(true);
      }
      if (incoming.get(6)) {
        {
          org.apache.thrift.protocol.TList _list39 = iprot.readListBegin(org.apache.thrift.protocol.TType.LIST);
          struct.schema = new java.util.ArrayList<java.util.List<java.lang.String>>(_list39.size);
          @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> _elem40;
          for (int _i41 = 0; _i41 < _list39.size; ++_i41)
          {
            {
              org.apache.thrift.protocol.TList _list42 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
              _elem40 = new java.util.ArrayList<java.lang.String>(_list42.size);
              @org.apache.thrift.annotation.Nullable java.lang.String _elem43;
              for (int _i44 = 0; _i44 < _list42.size; ++_i44)
              {
                _elem43 = iprot.readString();
                _elem40.add(_elem43);
              }
            }
            struct.schema.add(_elem40);
          }
        }
        struct.setSchemaIsSet(true);
      }
      if (incoming.get(7)) {
        {
          org.apache.thrift.protocol.TMap _map45 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); 
          struct.file_properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map45.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _key46;
          @org.apache.thrift.annotation.Nullable java.lang.String _val47;
          for (int _i48 = 0; _i48 < _map45.size; ++_i48)
          {
            _key46 = iprot.readString();
            _val47 = iprot.readString();
            struct.file_properties.put(_key46, _val47);
          }
        }
        struct.setFilePropertiesIsSet(true);
      }
      if (incoming.get(8)) {
        {
          org.apache.thrift.protocol.TList _list49 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
          struct.parquet_schemas = new java.util.ArrayList<TParquetSchema>(_list49.size);
          @org.apache.thrift.annotation.Nullable TParquetSchema _elem50;
          for (int _i51 = 0; _i51 < _list49.size; ++_i51)
          {
            _elem50 = new TParquetSchema();
            _elem50.read(iprot);
            struct.parquet_schemas.add(_elem50);
          }
        }
        struct.setParquetSchemasIsSet(true);
      }
      if (incoming.get(9)) {
        struct.parquet_compression_type = org.apache.doris.thrift.TParquetCompressionType.findByValue(iprot.readI32());
        struct.setParquetCompressionTypeIsSet(true);
      }
      if (incoming.get(10)) {
        struct.parquet_disable_dictionary = iprot.readBool();
        struct.setParquetDisableDictionaryIsSet(true);
      }
      if (incoming.get(11)) {
        struct.parquet_version = org.apache.doris.thrift.TParquetVersion.findByValue(iprot.readI32());
        struct.setParquetVersionIsSet(true);
      }
      if (incoming.get(12)) {
        struct.orc_schema = iprot.readString();
        struct.setOrcSchemaIsSet(true);
      }
      if (incoming.get(13)) {
        struct.delete_existing_files = iprot.readBool();
        struct.setDeleteExistingFilesIsSet(true);
      }
      if (incoming.get(14)) {
        struct.file_suffix = iprot.readString();
        struct.setFileSuffixIsSet(true);
      }
      if (incoming.get(15)) {
        struct.with_bom = iprot.readBool();
        struct.setWithBomIsSet(true);
      }
      if (incoming.get(16)) {
        struct.orc_compression_type = org.apache.doris.thrift.TFileCompressType.findByValue(iprot.readI32());
        struct.setOrcCompressionTypeIsSet(true);
      }
      if (incoming.get(17)) {
        struct.orc_writer_version = iprot.readI64();
        struct.setOrcWriterVersionIsSet(true);
      }
      if (incoming.get(18)) {
        struct.enable_int96_timestamps = iprot.readBool();
        struct.setEnableInt96TimestampsIsSet(true);
      }
      if (incoming.get(19)) {
        struct.compression_type = org.apache.doris.thrift.TFileCompressType.findByValue(iprot.readI32());
        struct.setCompressionTypeIsSet(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();
  }
}