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

  private static final org.apache.thrift.protocol.TField TEXT_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("text_params", org.apache.thrift.protocol.TType.STRUCT, (short)1);
  private static final org.apache.thrift.protocol.TField STRIP_OUTER_ARRAY_FIELD_DESC = new org.apache.thrift.protocol.TField("strip_outer_array", org.apache.thrift.protocol.TType.BOOL, (short)2);
  private static final org.apache.thrift.protocol.TField JSONPATHS_FIELD_DESC = new org.apache.thrift.protocol.TField("jsonpaths", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField JSON_ROOT_FIELD_DESC = new org.apache.thrift.protocol.TField("json_root", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField NUM_AS_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("num_as_string", org.apache.thrift.protocol.TType.BOOL, (short)5);
  private static final org.apache.thrift.protocol.TField FUZZY_PARSE_FIELD_DESC = new org.apache.thrift.protocol.TField("fuzzy_parse", org.apache.thrift.protocol.TType.BOOL, (short)6);
  private static final org.apache.thrift.protocol.TField READ_JSON_BY_LINE_FIELD_DESC = new org.apache.thrift.protocol.TField("read_json_by_line", org.apache.thrift.protocol.TType.BOOL, (short)7);
  private static final org.apache.thrift.protocol.TField READ_BY_COLUMN_DEF_FIELD_DESC = new org.apache.thrift.protocol.TField("read_by_column_def", org.apache.thrift.protocol.TType.BOOL, (short)8);
  private static final org.apache.thrift.protocol.TField HEADER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("header_type", org.apache.thrift.protocol.TType.STRING, (short)9);
  private static final org.apache.thrift.protocol.TField TRIM_DOUBLE_QUOTES_FIELD_DESC = new org.apache.thrift.protocol.TField("trim_double_quotes", org.apache.thrift.protocol.TType.BOOL, (short)10);
  private static final org.apache.thrift.protocol.TField SKIP_LINES_FIELD_DESC = new org.apache.thrift.protocol.TField("skip_lines", org.apache.thrift.protocol.TType.I32, (short)11);
  private static final org.apache.thrift.protocol.TField ENABLE_TEXT_VALIDATE_UTF8_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_text_validate_utf8", org.apache.thrift.protocol.TType.BOOL, (short)12);
  private static final org.apache.thrift.protocol.TField OPENX_JSON_IGNORE_MALFORMED_FIELD_DESC = new org.apache.thrift.protocol.TField("openx_json_ignore_malformed", org.apache.thrift.protocol.TType.BOOL, (short)13);
  private static final org.apache.thrift.protocol.TField IGNORE_CSV_REDUNDANT_COL_FIELD_DESC = new org.apache.thrift.protocol.TField("ignore_csv_redundant_col", org.apache.thrift.protocol.TType.BOOL, (short)1001);

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

  public @org.apache.thrift.annotation.Nullable TFileTextScanRangeParams text_params; // optional
  public boolean strip_outer_array; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String jsonpaths; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String json_root; // optional
  public boolean num_as_string; // optional
  public boolean fuzzy_parse; // optional
  public boolean read_json_by_line; // optional
  public boolean read_by_column_def; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String header_type; // optional
  public boolean trim_double_quotes; // optional
  public int skip_lines; // optional
  public boolean enable_text_validate_utf8; // optional
  public boolean openx_json_ignore_malformed; // optional
  public boolean ignore_csv_redundant_col; // 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 {
    TEXT_PARAMS((short)1, "text_params"),
    STRIP_OUTER_ARRAY((short)2, "strip_outer_array"),
    JSONPATHS((short)3, "jsonpaths"),
    JSON_ROOT((short)4, "json_root"),
    NUM_AS_STRING((short)5, "num_as_string"),
    FUZZY_PARSE((short)6, "fuzzy_parse"),
    READ_JSON_BY_LINE((short)7, "read_json_by_line"),
    READ_BY_COLUMN_DEF((short)8, "read_by_column_def"),
    HEADER_TYPE((short)9, "header_type"),
    TRIM_DOUBLE_QUOTES((short)10, "trim_double_quotes"),
    SKIP_LINES((short)11, "skip_lines"),
    ENABLE_TEXT_VALIDATE_UTF8((short)12, "enable_text_validate_utf8"),
    OPENX_JSON_IGNORE_MALFORMED((short)13, "openx_json_ignore_malformed"),
    IGNORE_CSV_REDUNDANT_COL((short)1001, "ignore_csv_redundant_col");

    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: // TEXT_PARAMS
          return TEXT_PARAMS;
        case 2: // STRIP_OUTER_ARRAY
          return STRIP_OUTER_ARRAY;
        case 3: // JSONPATHS
          return JSONPATHS;
        case 4: // JSON_ROOT
          return JSON_ROOT;
        case 5: // NUM_AS_STRING
          return NUM_AS_STRING;
        case 6: // FUZZY_PARSE
          return FUZZY_PARSE;
        case 7: // READ_JSON_BY_LINE
          return READ_JSON_BY_LINE;
        case 8: // READ_BY_COLUMN_DEF
          return READ_BY_COLUMN_DEF;
        case 9: // HEADER_TYPE
          return HEADER_TYPE;
        case 10: // TRIM_DOUBLE_QUOTES
          return TRIM_DOUBLE_QUOTES;
        case 11: // SKIP_LINES
          return SKIP_LINES;
        case 12: // ENABLE_TEXT_VALIDATE_UTF8
          return ENABLE_TEXT_VALIDATE_UTF8;
        case 13: // OPENX_JSON_IGNORE_MALFORMED
          return OPENX_JSON_IGNORE_MALFORMED;
        case 1001: // IGNORE_CSV_REDUNDANT_COL
          return IGNORE_CSV_REDUNDANT_COL;
        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 __STRIP_OUTER_ARRAY_ISSET_ID = 0;
  private static final int __NUM_AS_STRING_ISSET_ID = 1;
  private static final int __FUZZY_PARSE_ISSET_ID = 2;
  private static final int __READ_JSON_BY_LINE_ISSET_ID = 3;
  private static final int __READ_BY_COLUMN_DEF_ISSET_ID = 4;
  private static final int __TRIM_DOUBLE_QUOTES_ISSET_ID = 5;
  private static final int __SKIP_LINES_ISSET_ID = 6;
  private static final int __ENABLE_TEXT_VALIDATE_UTF8_ISSET_ID = 7;
  private static final int __OPENX_JSON_IGNORE_MALFORMED_ISSET_ID = 8;
  private static final int __IGNORE_CSV_REDUNDANT_COL_ISSET_ID = 9;
  private short __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.TEXT_PARAMS,_Fields.STRIP_OUTER_ARRAY,_Fields.JSONPATHS,_Fields.JSON_ROOT,_Fields.NUM_AS_STRING,_Fields.FUZZY_PARSE,_Fields.READ_JSON_BY_LINE,_Fields.READ_BY_COLUMN_DEF,_Fields.HEADER_TYPE,_Fields.TRIM_DOUBLE_QUOTES,_Fields.SKIP_LINES,_Fields.ENABLE_TEXT_VALIDATE_UTF8,_Fields.OPENX_JSON_IGNORE_MALFORMED,_Fields.IGNORE_CSV_REDUNDANT_COL};
  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.TEXT_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("text_params", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TFileTextScanRangeParams.class)));
    tmpMap.put(_Fields.STRIP_OUTER_ARRAY, new org.apache.thrift.meta_data.FieldMetaData("strip_outer_array", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.JSONPATHS, new org.apache.thrift.meta_data.FieldMetaData("jsonpaths", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.JSON_ROOT, new org.apache.thrift.meta_data.FieldMetaData("json_root", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.NUM_AS_STRING, new org.apache.thrift.meta_data.FieldMetaData("num_as_string", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.FUZZY_PARSE, new org.apache.thrift.meta_data.FieldMetaData("fuzzy_parse", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.READ_JSON_BY_LINE, new org.apache.thrift.meta_data.FieldMetaData("read_json_by_line", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.READ_BY_COLUMN_DEF, new org.apache.thrift.meta_data.FieldMetaData("read_by_column_def", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.HEADER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("header_type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TRIM_DOUBLE_QUOTES, new org.apache.thrift.meta_data.FieldMetaData("trim_double_quotes", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.SKIP_LINES, new org.apache.thrift.meta_data.FieldMetaData("skip_lines", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.ENABLE_TEXT_VALIDATE_UTF8, new org.apache.thrift.meta_data.FieldMetaData("enable_text_validate_utf8", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.OPENX_JSON_IGNORE_MALFORMED, new org.apache.thrift.meta_data.FieldMetaData("openx_json_ignore_malformed", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.IGNORE_CSV_REDUNDANT_COL, new org.apache.thrift.meta_data.FieldMetaData("ignore_csv_redundant_col", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TFileAttributes.class, metaDataMap);
  }

  public TFileAttributes() {
    this.enable_text_validate_utf8 = true;

    this.openx_json_ignore_malformed = false;

  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TFileAttributes(TFileAttributes other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetTextParams()) {
      this.text_params = new TFileTextScanRangeParams(other.text_params);
    }
    this.strip_outer_array = other.strip_outer_array;
    if (other.isSetJsonpaths()) {
      this.jsonpaths = other.jsonpaths;
    }
    if (other.isSetJsonRoot()) {
      this.json_root = other.json_root;
    }
    this.num_as_string = other.num_as_string;
    this.fuzzy_parse = other.fuzzy_parse;
    this.read_json_by_line = other.read_json_by_line;
    this.read_by_column_def = other.read_by_column_def;
    if (other.isSetHeaderType()) {
      this.header_type = other.header_type;
    }
    this.trim_double_quotes = other.trim_double_quotes;
    this.skip_lines = other.skip_lines;
    this.enable_text_validate_utf8 = other.enable_text_validate_utf8;
    this.openx_json_ignore_malformed = other.openx_json_ignore_malformed;
    this.ignore_csv_redundant_col = other.ignore_csv_redundant_col;
  }

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

  @Override
  public void clear() {
    this.text_params = null;
    setStripOuterArrayIsSet(false);
    this.strip_outer_array = false;
    this.jsonpaths = null;
    this.json_root = null;
    setNumAsStringIsSet(false);
    this.num_as_string = false;
    setFuzzyParseIsSet(false);
    this.fuzzy_parse = false;
    setReadJsonByLineIsSet(false);
    this.read_json_by_line = false;
    setReadByColumnDefIsSet(false);
    this.read_by_column_def = false;
    this.header_type = null;
    setTrimDoubleQuotesIsSet(false);
    this.trim_double_quotes = false;
    setSkipLinesIsSet(false);
    this.skip_lines = 0;
    this.enable_text_validate_utf8 = true;

    this.openx_json_ignore_malformed = false;

    setIgnoreCsvRedundantColIsSet(false);
    this.ignore_csv_redundant_col = false;
  }

  @org.apache.thrift.annotation.Nullable
  public TFileTextScanRangeParams getTextParams() {
    return this.text_params;
  }

  public TFileAttributes setTextParams(@org.apache.thrift.annotation.Nullable TFileTextScanRangeParams text_params) {
    this.text_params = text_params;
    return this;
  }

  public void unsetTextParams() {
    this.text_params = null;
  }

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

  public void setTextParamsIsSet(boolean value) {
    if (!value) {
      this.text_params = null;
    }
  }

  public boolean isStripOuterArray() {
    return this.strip_outer_array;
  }

  public TFileAttributes setStripOuterArray(boolean strip_outer_array) {
    this.strip_outer_array = strip_outer_array;
    setStripOuterArrayIsSet(true);
    return this;
  }

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

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

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

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

  public TFileAttributes setJsonpaths(@org.apache.thrift.annotation.Nullable java.lang.String jsonpaths) {
    this.jsonpaths = jsonpaths;
    return this;
  }

  public void unsetJsonpaths() {
    this.jsonpaths = null;
  }

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

  public void setJsonpathsIsSet(boolean value) {
    if (!value) {
      this.jsonpaths = null;
    }
  }

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

  public TFileAttributes setJsonRoot(@org.apache.thrift.annotation.Nullable java.lang.String json_root) {
    this.json_root = json_root;
    return this;
  }

  public void unsetJsonRoot() {
    this.json_root = null;
  }

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

  public void setJsonRootIsSet(boolean value) {
    if (!value) {
      this.json_root = null;
    }
  }

  public boolean isNumAsString() {
    return this.num_as_string;
  }

  public TFileAttributes setNumAsString(boolean num_as_string) {
    this.num_as_string = num_as_string;
    setNumAsStringIsSet(true);
    return this;
  }

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

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

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

  public boolean isFuzzyParse() {
    return this.fuzzy_parse;
  }

  public TFileAttributes setFuzzyParse(boolean fuzzy_parse) {
    this.fuzzy_parse = fuzzy_parse;
    setFuzzyParseIsSet(true);
    return this;
  }

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

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

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

  public boolean isReadJsonByLine() {
    return this.read_json_by_line;
  }

  public TFileAttributes setReadJsonByLine(boolean read_json_by_line) {
    this.read_json_by_line = read_json_by_line;
    setReadJsonByLineIsSet(true);
    return this;
  }

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

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

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

  public boolean isReadByColumnDef() {
    return this.read_by_column_def;
  }

  public TFileAttributes setReadByColumnDef(boolean read_by_column_def) {
    this.read_by_column_def = read_by_column_def;
    setReadByColumnDefIsSet(true);
    return this;
  }

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

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

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

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

  public TFileAttributes setHeaderType(@org.apache.thrift.annotation.Nullable java.lang.String header_type) {
    this.header_type = header_type;
    return this;
  }

  public void unsetHeaderType() {
    this.header_type = null;
  }

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

  public void setHeaderTypeIsSet(boolean value) {
    if (!value) {
      this.header_type = null;
    }
  }

  public boolean isTrimDoubleQuotes() {
    return this.trim_double_quotes;
  }

  public TFileAttributes setTrimDoubleQuotes(boolean trim_double_quotes) {
    this.trim_double_quotes = trim_double_quotes;
    setTrimDoubleQuotesIsSet(true);
    return this;
  }

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

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

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

  public int getSkipLines() {
    return this.skip_lines;
  }

  public TFileAttributes setSkipLines(int skip_lines) {
    this.skip_lines = skip_lines;
    setSkipLinesIsSet(true);
    return this;
  }

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

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

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

  public boolean isEnableTextValidateUtf8() {
    return this.enable_text_validate_utf8;
  }

  public TFileAttributes setEnableTextValidateUtf8(boolean enable_text_validate_utf8) {
    this.enable_text_validate_utf8 = enable_text_validate_utf8;
    setEnableTextValidateUtf8IsSet(true);
    return this;
  }

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

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

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

  public boolean isOpenxJsonIgnoreMalformed() {
    return this.openx_json_ignore_malformed;
  }

  public TFileAttributes setOpenxJsonIgnoreMalformed(boolean openx_json_ignore_malformed) {
    this.openx_json_ignore_malformed = openx_json_ignore_malformed;
    setOpenxJsonIgnoreMalformedIsSet(true);
    return this;
  }

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

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

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

  public boolean isIgnoreCsvRedundantCol() {
    return this.ignore_csv_redundant_col;
  }

  public TFileAttributes setIgnoreCsvRedundantCol(boolean ignore_csv_redundant_col) {
    this.ignore_csv_redundant_col = ignore_csv_redundant_col;
    setIgnoreCsvRedundantColIsSet(true);
    return this;
  }

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

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

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

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case TEXT_PARAMS:
      if (value == null) {
        unsetTextParams();
      } else {
        setTextParams((TFileTextScanRangeParams)value);
      }
      break;

    case STRIP_OUTER_ARRAY:
      if (value == null) {
        unsetStripOuterArray();
      } else {
        setStripOuterArray((java.lang.Boolean)value);
      }
      break;

    case JSONPATHS:
      if (value == null) {
        unsetJsonpaths();
      } else {
        setJsonpaths((java.lang.String)value);
      }
      break;

    case JSON_ROOT:
      if (value == null) {
        unsetJsonRoot();
      } else {
        setJsonRoot((java.lang.String)value);
      }
      break;

    case NUM_AS_STRING:
      if (value == null) {
        unsetNumAsString();
      } else {
        setNumAsString((java.lang.Boolean)value);
      }
      break;

    case FUZZY_PARSE:
      if (value == null) {
        unsetFuzzyParse();
      } else {
        setFuzzyParse((java.lang.Boolean)value);
      }
      break;

    case READ_JSON_BY_LINE:
      if (value == null) {
        unsetReadJsonByLine();
      } else {
        setReadJsonByLine((java.lang.Boolean)value);
      }
      break;

    case READ_BY_COLUMN_DEF:
      if (value == null) {
        unsetReadByColumnDef();
      } else {
        setReadByColumnDef((java.lang.Boolean)value);
      }
      break;

    case HEADER_TYPE:
      if (value == null) {
        unsetHeaderType();
      } else {
        setHeaderType((java.lang.String)value);
      }
      break;

    case TRIM_DOUBLE_QUOTES:
      if (value == null) {
        unsetTrimDoubleQuotes();
      } else {
        setTrimDoubleQuotes((java.lang.Boolean)value);
      }
      break;

    case SKIP_LINES:
      if (value == null) {
        unsetSkipLines();
      } else {
        setSkipLines((java.lang.Integer)value);
      }
      break;

    case ENABLE_TEXT_VALIDATE_UTF8:
      if (value == null) {
        unsetEnableTextValidateUtf8();
      } else {
        setEnableTextValidateUtf8((java.lang.Boolean)value);
      }
      break;

    case OPENX_JSON_IGNORE_MALFORMED:
      if (value == null) {
        unsetOpenxJsonIgnoreMalformed();
      } else {
        setOpenxJsonIgnoreMalformed((java.lang.Boolean)value);
      }
      break;

    case IGNORE_CSV_REDUNDANT_COL:
      if (value == null) {
        unsetIgnoreCsvRedundantCol();
      } else {
        setIgnoreCsvRedundantCol((java.lang.Boolean)value);
      }
      break;

    }
  }

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

    case STRIP_OUTER_ARRAY:
      return isStripOuterArray();

    case JSONPATHS:
      return getJsonpaths();

    case JSON_ROOT:
      return getJsonRoot();

    case NUM_AS_STRING:
      return isNumAsString();

    case FUZZY_PARSE:
      return isFuzzyParse();

    case READ_JSON_BY_LINE:
      return isReadJsonByLine();

    case READ_BY_COLUMN_DEF:
      return isReadByColumnDef();

    case HEADER_TYPE:
      return getHeaderType();

    case TRIM_DOUBLE_QUOTES:
      return isTrimDoubleQuotes();

    case SKIP_LINES:
      return getSkipLines();

    case ENABLE_TEXT_VALIDATE_UTF8:
      return isEnableTextValidateUtf8();

    case OPENX_JSON_IGNORE_MALFORMED:
      return isOpenxJsonIgnoreMalformed();

    case IGNORE_CSV_REDUNDANT_COL:
      return isIgnoreCsvRedundantCol();

    }
    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 TEXT_PARAMS:
      return isSetTextParams();
    case STRIP_OUTER_ARRAY:
      return isSetStripOuterArray();
    case JSONPATHS:
      return isSetJsonpaths();
    case JSON_ROOT:
      return isSetJsonRoot();
    case NUM_AS_STRING:
      return isSetNumAsString();
    case FUZZY_PARSE:
      return isSetFuzzyParse();
    case READ_JSON_BY_LINE:
      return isSetReadJsonByLine();
    case READ_BY_COLUMN_DEF:
      return isSetReadByColumnDef();
    case HEADER_TYPE:
      return isSetHeaderType();
    case TRIM_DOUBLE_QUOTES:
      return isSetTrimDoubleQuotes();
    case SKIP_LINES:
      return isSetSkipLines();
    case ENABLE_TEXT_VALIDATE_UTF8:
      return isSetEnableTextValidateUtf8();
    case OPENX_JSON_IGNORE_MALFORMED:
      return isSetOpenxJsonIgnoreMalformed();
    case IGNORE_CSV_REDUNDANT_COL:
      return isSetIgnoreCsvRedundantCol();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_text_params = true && this.isSetTextParams();
    boolean that_present_text_params = true && that.isSetTextParams();
    if (this_present_text_params || that_present_text_params) {
      if (!(this_present_text_params && that_present_text_params))
        return false;
      if (!this.text_params.equals(that.text_params))
        return false;
    }

    boolean this_present_strip_outer_array = true && this.isSetStripOuterArray();
    boolean that_present_strip_outer_array = true && that.isSetStripOuterArray();
    if (this_present_strip_outer_array || that_present_strip_outer_array) {
      if (!(this_present_strip_outer_array && that_present_strip_outer_array))
        return false;
      if (this.strip_outer_array != that.strip_outer_array)
        return false;
    }

    boolean this_present_jsonpaths = true && this.isSetJsonpaths();
    boolean that_present_jsonpaths = true && that.isSetJsonpaths();
    if (this_present_jsonpaths || that_present_jsonpaths) {
      if (!(this_present_jsonpaths && that_present_jsonpaths))
        return false;
      if (!this.jsonpaths.equals(that.jsonpaths))
        return false;
    }

    boolean this_present_json_root = true && this.isSetJsonRoot();
    boolean that_present_json_root = true && that.isSetJsonRoot();
    if (this_present_json_root || that_present_json_root) {
      if (!(this_present_json_root && that_present_json_root))
        return false;
      if (!this.json_root.equals(that.json_root))
        return false;
    }

    boolean this_present_num_as_string = true && this.isSetNumAsString();
    boolean that_present_num_as_string = true && that.isSetNumAsString();
    if (this_present_num_as_string || that_present_num_as_string) {
      if (!(this_present_num_as_string && that_present_num_as_string))
        return false;
      if (this.num_as_string != that.num_as_string)
        return false;
    }

    boolean this_present_fuzzy_parse = true && this.isSetFuzzyParse();
    boolean that_present_fuzzy_parse = true && that.isSetFuzzyParse();
    if (this_present_fuzzy_parse || that_present_fuzzy_parse) {
      if (!(this_present_fuzzy_parse && that_present_fuzzy_parse))
        return false;
      if (this.fuzzy_parse != that.fuzzy_parse)
        return false;
    }

    boolean this_present_read_json_by_line = true && this.isSetReadJsonByLine();
    boolean that_present_read_json_by_line = true && that.isSetReadJsonByLine();
    if (this_present_read_json_by_line || that_present_read_json_by_line) {
      if (!(this_present_read_json_by_line && that_present_read_json_by_line))
        return false;
      if (this.read_json_by_line != that.read_json_by_line)
        return false;
    }

    boolean this_present_read_by_column_def = true && this.isSetReadByColumnDef();
    boolean that_present_read_by_column_def = true && that.isSetReadByColumnDef();
    if (this_present_read_by_column_def || that_present_read_by_column_def) {
      if (!(this_present_read_by_column_def && that_present_read_by_column_def))
        return false;
      if (this.read_by_column_def != that.read_by_column_def)
        return false;
    }

    boolean this_present_header_type = true && this.isSetHeaderType();
    boolean that_present_header_type = true && that.isSetHeaderType();
    if (this_present_header_type || that_present_header_type) {
      if (!(this_present_header_type && that_present_header_type))
        return false;
      if (!this.header_type.equals(that.header_type))
        return false;
    }

    boolean this_present_trim_double_quotes = true && this.isSetTrimDoubleQuotes();
    boolean that_present_trim_double_quotes = true && that.isSetTrimDoubleQuotes();
    if (this_present_trim_double_quotes || that_present_trim_double_quotes) {
      if (!(this_present_trim_double_quotes && that_present_trim_double_quotes))
        return false;
      if (this.trim_double_quotes != that.trim_double_quotes)
        return false;
    }

    boolean this_present_skip_lines = true && this.isSetSkipLines();
    boolean that_present_skip_lines = true && that.isSetSkipLines();
    if (this_present_skip_lines || that_present_skip_lines) {
      if (!(this_present_skip_lines && that_present_skip_lines))
        return false;
      if (this.skip_lines != that.skip_lines)
        return false;
    }

    boolean this_present_enable_text_validate_utf8 = true && this.isSetEnableTextValidateUtf8();
    boolean that_present_enable_text_validate_utf8 = true && that.isSetEnableTextValidateUtf8();
    if (this_present_enable_text_validate_utf8 || that_present_enable_text_validate_utf8) {
      if (!(this_present_enable_text_validate_utf8 && that_present_enable_text_validate_utf8))
        return false;
      if (this.enable_text_validate_utf8 != that.enable_text_validate_utf8)
        return false;
    }

    boolean this_present_openx_json_ignore_malformed = true && this.isSetOpenxJsonIgnoreMalformed();
    boolean that_present_openx_json_ignore_malformed = true && that.isSetOpenxJsonIgnoreMalformed();
    if (this_present_openx_json_ignore_malformed || that_present_openx_json_ignore_malformed) {
      if (!(this_present_openx_json_ignore_malformed && that_present_openx_json_ignore_malformed))
        return false;
      if (this.openx_json_ignore_malformed != that.openx_json_ignore_malformed)
        return false;
    }

    boolean this_present_ignore_csv_redundant_col = true && this.isSetIgnoreCsvRedundantCol();
    boolean that_present_ignore_csv_redundant_col = true && that.isSetIgnoreCsvRedundantCol();
    if (this_present_ignore_csv_redundant_col || that_present_ignore_csv_redundant_col) {
      if (!(this_present_ignore_csv_redundant_col && that_present_ignore_csv_redundant_col))
        return false;
      if (this.ignore_csv_redundant_col != that.ignore_csv_redundant_col)
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetTextParams()) ? 131071 : 524287);
    if (isSetTextParams())
      hashCode = hashCode * 8191 + text_params.hashCode();

    hashCode = hashCode * 8191 + ((isSetStripOuterArray()) ? 131071 : 524287);
    if (isSetStripOuterArray())
      hashCode = hashCode * 8191 + ((strip_outer_array) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetJsonpaths()) ? 131071 : 524287);
    if (isSetJsonpaths())
      hashCode = hashCode * 8191 + jsonpaths.hashCode();

    hashCode = hashCode * 8191 + ((isSetJsonRoot()) ? 131071 : 524287);
    if (isSetJsonRoot())
      hashCode = hashCode * 8191 + json_root.hashCode();

    hashCode = hashCode * 8191 + ((isSetNumAsString()) ? 131071 : 524287);
    if (isSetNumAsString())
      hashCode = hashCode * 8191 + ((num_as_string) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetFuzzyParse()) ? 131071 : 524287);
    if (isSetFuzzyParse())
      hashCode = hashCode * 8191 + ((fuzzy_parse) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetReadJsonByLine()) ? 131071 : 524287);
    if (isSetReadJsonByLine())
      hashCode = hashCode * 8191 + ((read_json_by_line) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetReadByColumnDef()) ? 131071 : 524287);
    if (isSetReadByColumnDef())
      hashCode = hashCode * 8191 + ((read_by_column_def) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetHeaderType()) ? 131071 : 524287);
    if (isSetHeaderType())
      hashCode = hashCode * 8191 + header_type.hashCode();

    hashCode = hashCode * 8191 + ((isSetTrimDoubleQuotes()) ? 131071 : 524287);
    if (isSetTrimDoubleQuotes())
      hashCode = hashCode * 8191 + ((trim_double_quotes) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetSkipLines()) ? 131071 : 524287);
    if (isSetSkipLines())
      hashCode = hashCode * 8191 + skip_lines;

    hashCode = hashCode * 8191 + ((isSetEnableTextValidateUtf8()) ? 131071 : 524287);
    if (isSetEnableTextValidateUtf8())
      hashCode = hashCode * 8191 + ((enable_text_validate_utf8) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetOpenxJsonIgnoreMalformed()) ? 131071 : 524287);
    if (isSetOpenxJsonIgnoreMalformed())
      hashCode = hashCode * 8191 + ((openx_json_ignore_malformed) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetIgnoreCsvRedundantCol()) ? 131071 : 524287);
    if (isSetIgnoreCsvRedundantCol())
      hashCode = hashCode * 8191 + ((ignore_csv_redundant_col) ? 131071 : 524287);

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetTextParams(), other.isSetTextParams());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTextParams()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.text_params, other.text_params);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetStripOuterArray(), other.isSetStripOuterArray());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStripOuterArray()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.strip_outer_array, other.strip_outer_array);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetJsonpaths(), other.isSetJsonpaths());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetJsonpaths()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jsonpaths, other.jsonpaths);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetJsonRoot(), other.isSetJsonRoot());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetJsonRoot()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.json_root, other.json_root);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetNumAsString(), other.isSetNumAsString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNumAsString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_as_string, other.num_as_string);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFuzzyParse(), other.isSetFuzzyParse());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFuzzyParse()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fuzzy_parse, other.fuzzy_parse);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReadJsonByLine(), other.isSetReadJsonByLine());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReadJsonByLine()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.read_json_by_line, other.read_json_by_line);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReadByColumnDef(), other.isSetReadByColumnDef());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReadByColumnDef()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.read_by_column_def, other.read_by_column_def);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetHeaderType(), other.isSetHeaderType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHeaderType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.header_type, other.header_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTrimDoubleQuotes(), other.isSetTrimDoubleQuotes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTrimDoubleQuotes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trim_double_quotes, other.trim_double_quotes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSkipLines(), other.isSetSkipLines());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSkipLines()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.skip_lines, other.skip_lines);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetEnableTextValidateUtf8(), other.isSetEnableTextValidateUtf8());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEnableTextValidateUtf8()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enable_text_validate_utf8, other.enable_text_validate_utf8);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetOpenxJsonIgnoreMalformed(), other.isSetOpenxJsonIgnoreMalformed());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOpenxJsonIgnoreMalformed()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.openx_json_ignore_malformed, other.openx_json_ignore_malformed);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIgnoreCsvRedundantCol(), other.isSetIgnoreCsvRedundantCol());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIgnoreCsvRedundantCol()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ignore_csv_redundant_col, other.ignore_csv_redundant_col);
      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("TFileAttributes(");
    boolean first = true;

    if (isSetTextParams()) {
      sb.append("text_params:");
      if (this.text_params == null) {
        sb.append("null");
      } else {
        sb.append(this.text_params);
      }
      first = false;
    }
    if (isSetStripOuterArray()) {
      if (!first) sb.append(", ");
      sb.append("strip_outer_array:");
      sb.append(this.strip_outer_array);
      first = false;
    }
    if (isSetJsonpaths()) {
      if (!first) sb.append(", ");
      sb.append("jsonpaths:");
      if (this.jsonpaths == null) {
        sb.append("null");
      } else {
        sb.append(this.jsonpaths);
      }
      first = false;
    }
    if (isSetJsonRoot()) {
      if (!first) sb.append(", ");
      sb.append("json_root:");
      if (this.json_root == null) {
        sb.append("null");
      } else {
        sb.append(this.json_root);
      }
      first = false;
    }
    if (isSetNumAsString()) {
      if (!first) sb.append(", ");
      sb.append("num_as_string:");
      sb.append(this.num_as_string);
      first = false;
    }
    if (isSetFuzzyParse()) {
      if (!first) sb.append(", ");
      sb.append("fuzzy_parse:");
      sb.append(this.fuzzy_parse);
      first = false;
    }
    if (isSetReadJsonByLine()) {
      if (!first) sb.append(", ");
      sb.append("read_json_by_line:");
      sb.append(this.read_json_by_line);
      first = false;
    }
    if (isSetReadByColumnDef()) {
      if (!first) sb.append(", ");
      sb.append("read_by_column_def:");
      sb.append(this.read_by_column_def);
      first = false;
    }
    if (isSetHeaderType()) {
      if (!first) sb.append(", ");
      sb.append("header_type:");
      if (this.header_type == null) {
        sb.append("null");
      } else {
        sb.append(this.header_type);
      }
      first = false;
    }
    if (isSetTrimDoubleQuotes()) {
      if (!first) sb.append(", ");
      sb.append("trim_double_quotes:");
      sb.append(this.trim_double_quotes);
      first = false;
    }
    if (isSetSkipLines()) {
      if (!first) sb.append(", ");
      sb.append("skip_lines:");
      sb.append(this.skip_lines);
      first = false;
    }
    if (isSetEnableTextValidateUtf8()) {
      if (!first) sb.append(", ");
      sb.append("enable_text_validate_utf8:");
      sb.append(this.enable_text_validate_utf8);
      first = false;
    }
    if (isSetOpenxJsonIgnoreMalformed()) {
      if (!first) sb.append(", ");
      sb.append("openx_json_ignore_malformed:");
      sb.append(this.openx_json_ignore_malformed);
      first = false;
    }
    if (isSetIgnoreCsvRedundantCol()) {
      if (!first) sb.append(", ");
      sb.append("ignore_csv_redundant_col:");
      sb.append(this.ignore_csv_redundant_col);
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
    if (text_params != null) {
      text_params.validate();
    }
  }

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

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

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

  private static class TFileAttributesStandardScheme extends org.apache.thrift.scheme.StandardScheme<TFileAttributes> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TFileAttributes 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: // TEXT_PARAMS
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.text_params = new TFileTextScanRangeParams();
              struct.text_params.read(iprot);
              struct.setTextParamsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // STRIP_OUTER_ARRAY
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.strip_outer_array = iprot.readBool();
              struct.setStripOuterArrayIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // JSONPATHS
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.jsonpaths = iprot.readString();
              struct.setJsonpathsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // JSON_ROOT
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.json_root = iprot.readString();
              struct.setJsonRootIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // NUM_AS_STRING
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.num_as_string = iprot.readBool();
              struct.setNumAsStringIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // FUZZY_PARSE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.fuzzy_parse = iprot.readBool();
              struct.setFuzzyParseIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // READ_JSON_BY_LINE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.read_json_by_line = iprot.readBool();
              struct.setReadJsonByLineIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // READ_BY_COLUMN_DEF
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.read_by_column_def = iprot.readBool();
              struct.setReadByColumnDefIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // HEADER_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.header_type = iprot.readString();
              struct.setHeaderTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // TRIM_DOUBLE_QUOTES
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.trim_double_quotes = iprot.readBool();
              struct.setTrimDoubleQuotesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // SKIP_LINES
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.skip_lines = iprot.readI32();
              struct.setSkipLinesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // ENABLE_TEXT_VALIDATE_UTF8
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.enable_text_validate_utf8 = iprot.readBool();
              struct.setEnableTextValidateUtf8IsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // OPENX_JSON_IGNORE_MALFORMED
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.openx_json_ignore_malformed = iprot.readBool();
              struct.setOpenxJsonIgnoreMalformedIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 1001: // IGNORE_CSV_REDUNDANT_COL
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.ignore_csv_redundant_col = iprot.readBool();
              struct.setIgnoreCsvRedundantColIsSet(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, TFileAttributes struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.text_params != null) {
        if (struct.isSetTextParams()) {
          oprot.writeFieldBegin(TEXT_PARAMS_FIELD_DESC);
          struct.text_params.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetStripOuterArray()) {
        oprot.writeFieldBegin(STRIP_OUTER_ARRAY_FIELD_DESC);
        oprot.writeBool(struct.strip_outer_array);
        oprot.writeFieldEnd();
      }
      if (struct.jsonpaths != null) {
        if (struct.isSetJsonpaths()) {
          oprot.writeFieldBegin(JSONPATHS_FIELD_DESC);
          oprot.writeString(struct.jsonpaths);
          oprot.writeFieldEnd();
        }
      }
      if (struct.json_root != null) {
        if (struct.isSetJsonRoot()) {
          oprot.writeFieldBegin(JSON_ROOT_FIELD_DESC);
          oprot.writeString(struct.json_root);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetNumAsString()) {
        oprot.writeFieldBegin(NUM_AS_STRING_FIELD_DESC);
        oprot.writeBool(struct.num_as_string);
        oprot.writeFieldEnd();
      }
      if (struct.isSetFuzzyParse()) {
        oprot.writeFieldBegin(FUZZY_PARSE_FIELD_DESC);
        oprot.writeBool(struct.fuzzy_parse);
        oprot.writeFieldEnd();
      }
      if (struct.isSetReadJsonByLine()) {
        oprot.writeFieldBegin(READ_JSON_BY_LINE_FIELD_DESC);
        oprot.writeBool(struct.read_json_by_line);
        oprot.writeFieldEnd();
      }
      if (struct.isSetReadByColumnDef()) {
        oprot.writeFieldBegin(READ_BY_COLUMN_DEF_FIELD_DESC);
        oprot.writeBool(struct.read_by_column_def);
        oprot.writeFieldEnd();
      }
      if (struct.header_type != null) {
        if (struct.isSetHeaderType()) {
          oprot.writeFieldBegin(HEADER_TYPE_FIELD_DESC);
          oprot.writeString(struct.header_type);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetTrimDoubleQuotes()) {
        oprot.writeFieldBegin(TRIM_DOUBLE_QUOTES_FIELD_DESC);
        oprot.writeBool(struct.trim_double_quotes);
        oprot.writeFieldEnd();
      }
      if (struct.isSetSkipLines()) {
        oprot.writeFieldBegin(SKIP_LINES_FIELD_DESC);
        oprot.writeI32(struct.skip_lines);
        oprot.writeFieldEnd();
      }
      if (struct.isSetEnableTextValidateUtf8()) {
        oprot.writeFieldBegin(ENABLE_TEXT_VALIDATE_UTF8_FIELD_DESC);
        oprot.writeBool(struct.enable_text_validate_utf8);
        oprot.writeFieldEnd();
      }
      if (struct.isSetOpenxJsonIgnoreMalformed()) {
        oprot.writeFieldBegin(OPENX_JSON_IGNORE_MALFORMED_FIELD_DESC);
        oprot.writeBool(struct.openx_json_ignore_malformed);
        oprot.writeFieldEnd();
      }
      if (struct.isSetIgnoreCsvRedundantCol()) {
        oprot.writeFieldBegin(IGNORE_CSV_REDUNDANT_COL_FIELD_DESC);
        oprot.writeBool(struct.ignore_csv_redundant_col);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TFileAttributesTupleScheme extends org.apache.thrift.scheme.TupleScheme<TFileAttributes> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TFileAttributes struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetTextParams()) {
        optionals.set(0);
      }
      if (struct.isSetStripOuterArray()) {
        optionals.set(1);
      }
      if (struct.isSetJsonpaths()) {
        optionals.set(2);
      }
      if (struct.isSetJsonRoot()) {
        optionals.set(3);
      }
      if (struct.isSetNumAsString()) {
        optionals.set(4);
      }
      if (struct.isSetFuzzyParse()) {
        optionals.set(5);
      }
      if (struct.isSetReadJsonByLine()) {
        optionals.set(6);
      }
      if (struct.isSetReadByColumnDef()) {
        optionals.set(7);
      }
      if (struct.isSetHeaderType()) {
        optionals.set(8);
      }
      if (struct.isSetTrimDoubleQuotes()) {
        optionals.set(9);
      }
      if (struct.isSetSkipLines()) {
        optionals.set(10);
      }
      if (struct.isSetEnableTextValidateUtf8()) {
        optionals.set(11);
      }
      if (struct.isSetOpenxJsonIgnoreMalformed()) {
        optionals.set(12);
      }
      if (struct.isSetIgnoreCsvRedundantCol()) {
        optionals.set(13);
      }
      oprot.writeBitSet(optionals, 14);
      if (struct.isSetTextParams()) {
        struct.text_params.write(oprot);
      }
      if (struct.isSetStripOuterArray()) {
        oprot.writeBool(struct.strip_outer_array);
      }
      if (struct.isSetJsonpaths()) {
        oprot.writeString(struct.jsonpaths);
      }
      if (struct.isSetJsonRoot()) {
        oprot.writeString(struct.json_root);
      }
      if (struct.isSetNumAsString()) {
        oprot.writeBool(struct.num_as_string);
      }
      if (struct.isSetFuzzyParse()) {
        oprot.writeBool(struct.fuzzy_parse);
      }
      if (struct.isSetReadJsonByLine()) {
        oprot.writeBool(struct.read_json_by_line);
      }
      if (struct.isSetReadByColumnDef()) {
        oprot.writeBool(struct.read_by_column_def);
      }
      if (struct.isSetHeaderType()) {
        oprot.writeString(struct.header_type);
      }
      if (struct.isSetTrimDoubleQuotes()) {
        oprot.writeBool(struct.trim_double_quotes);
      }
      if (struct.isSetSkipLines()) {
        oprot.writeI32(struct.skip_lines);
      }
      if (struct.isSetEnableTextValidateUtf8()) {
        oprot.writeBool(struct.enable_text_validate_utf8);
      }
      if (struct.isSetOpenxJsonIgnoreMalformed()) {
        oprot.writeBool(struct.openx_json_ignore_malformed);
      }
      if (struct.isSetIgnoreCsvRedundantCol()) {
        oprot.writeBool(struct.ignore_csv_redundant_col);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TFileAttributes struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(14);
      if (incoming.get(0)) {
        struct.text_params = new TFileTextScanRangeParams();
        struct.text_params.read(iprot);
        struct.setTextParamsIsSet(true);
      }
      if (incoming.get(1)) {
        struct.strip_outer_array = iprot.readBool();
        struct.setStripOuterArrayIsSet(true);
      }
      if (incoming.get(2)) {
        struct.jsonpaths = iprot.readString();
        struct.setJsonpathsIsSet(true);
      }
      if (incoming.get(3)) {
        struct.json_root = iprot.readString();
        struct.setJsonRootIsSet(true);
      }
      if (incoming.get(4)) {
        struct.num_as_string = iprot.readBool();
        struct.setNumAsStringIsSet(true);
      }
      if (incoming.get(5)) {
        struct.fuzzy_parse = iprot.readBool();
        struct.setFuzzyParseIsSet(true);
      }
      if (incoming.get(6)) {
        struct.read_json_by_line = iprot.readBool();
        struct.setReadJsonByLineIsSet(true);
      }
      if (incoming.get(7)) {
        struct.read_by_column_def = iprot.readBool();
        struct.setReadByColumnDefIsSet(true);
      }
      if (incoming.get(8)) {
        struct.header_type = iprot.readString();
        struct.setHeaderTypeIsSet(true);
      }
      if (incoming.get(9)) {
        struct.trim_double_quotes = iprot.readBool();
        struct.setTrimDoubleQuotesIsSet(true);
      }
      if (incoming.get(10)) {
        struct.skip_lines = iprot.readI32();
        struct.setSkipLinesIsSet(true);
      }
      if (incoming.get(11)) {
        struct.enable_text_validate_utf8 = iprot.readBool();
        struct.setEnableTextValidateUtf8IsSet(true);
      }
      if (incoming.get(12)) {
        struct.openx_json_ignore_malformed = iprot.readBool();
        struct.setOpenxJsonIgnoreMalformedIsSet(true);
      }
      if (incoming.get(13)) {
        struct.ignore_csv_redundant_col = iprot.readBool();
        struct.setIgnoreCsvRedundantColIsSet(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();
  }
}