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

  private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField IS_DIR_FIELD_DESC = new org.apache.thrift.protocol.TField("isDir", org.apache.thrift.protocol.TType.BOOL, (short)2);
  private static final org.apache.thrift.protocol.TField SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("size", org.apache.thrift.protocol.TType.I64, (short)3);
  private static final org.apache.thrift.protocol.TField IS_SPLITABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("isSplitable", org.apache.thrift.protocol.TType.BOOL, (short)4);
  private static final org.apache.thrift.protocol.TField BLOCK_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("blockSize", org.apache.thrift.protocol.TType.I64, (short)5);
  private static final org.apache.thrift.protocol.TField MODIFICATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("modificationTime", org.apache.thrift.protocol.TType.I64, (short)6);

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

  public @org.apache.thrift.annotation.Nullable java.lang.String path; // required
  public boolean isDir; // required
  public long size; // required
  public boolean isSplitable; // required
  public long blockSize; // optional
  public long modificationTime; // 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 {
    PATH((short)1, "path"),
    IS_DIR((short)2, "isDir"),
    SIZE((short)3, "size"),
    IS_SPLITABLE((short)4, "isSplitable"),
    BLOCK_SIZE((short)5, "blockSize"),
    MODIFICATION_TIME((short)6, "modificationTime");

    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: // PATH
          return PATH;
        case 2: // IS_DIR
          return IS_DIR;
        case 3: // SIZE
          return SIZE;
        case 4: // IS_SPLITABLE
          return IS_SPLITABLE;
        case 5: // BLOCK_SIZE
          return BLOCK_SIZE;
        case 6: // MODIFICATION_TIME
          return MODIFICATION_TIME;
        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 __ISDIR_ISSET_ID = 0;
  private static final int __SIZE_ISSET_ID = 1;
  private static final int __ISSPLITABLE_ISSET_ID = 2;
  private static final int __BLOCKSIZE_ISSET_ID = 3;
  private static final int __MODIFICATIONTIME_ISSET_ID = 4;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.BLOCK_SIZE,_Fields.MODIFICATION_TIME};
  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.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.IS_DIR, new org.apache.thrift.meta_data.FieldMetaData("isDir", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.SIZE, new org.apache.thrift.meta_data.FieldMetaData("size", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.IS_SPLITABLE, new org.apache.thrift.meta_data.FieldMetaData("isSplitable", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.BLOCK_SIZE, new org.apache.thrift.meta_data.FieldMetaData("blockSize", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.MODIFICATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("modificationTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TBrokerFileStatus.class, metaDataMap);
  }

  public TBrokerFileStatus() {
    this.modificationTime = 0L;

  }

  public TBrokerFileStatus(
    java.lang.String path,
    boolean isDir,
    long size,
    boolean isSplitable)
  {
    this();
    this.path = path;
    this.isDir = isDir;
    setIsDirIsSet(true);
    this.size = size;
    setSizeIsSet(true);
    this.isSplitable = isSplitable;
    setIsSplitableIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TBrokerFileStatus(TBrokerFileStatus other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetPath()) {
      this.path = other.path;
    }
    this.isDir = other.isDir;
    this.size = other.size;
    this.isSplitable = other.isSplitable;
    this.blockSize = other.blockSize;
    this.modificationTime = other.modificationTime;
  }

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

  @Override
  public void clear() {
    this.path = null;
    setIsDirIsSet(false);
    this.isDir = false;
    setSizeIsSet(false);
    this.size = 0;
    setIsSplitableIsSet(false);
    this.isSplitable = false;
    setBlockSizeIsSet(false);
    this.blockSize = 0;
    this.modificationTime = 0L;

  }

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

  public TBrokerFileStatus setPath(@org.apache.thrift.annotation.Nullable java.lang.String path) {
    this.path = path;
    return this;
  }

  public void unsetPath() {
    this.path = null;
  }

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

  public void setPathIsSet(boolean value) {
    if (!value) {
      this.path = null;
    }
  }

  public boolean isIsDir() {
    return this.isDir;
  }

  public TBrokerFileStatus setIsDir(boolean isDir) {
    this.isDir = isDir;
    setIsDirIsSet(true);
    return this;
  }

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

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

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

  public long getSize() {
    return this.size;
  }

  public TBrokerFileStatus setSize(long size) {
    this.size = size;
    setSizeIsSet(true);
    return this;
  }

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

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

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

  public boolean isIsSplitable() {
    return this.isSplitable;
  }

  public TBrokerFileStatus setIsSplitable(boolean isSplitable) {
    this.isSplitable = isSplitable;
    setIsSplitableIsSet(true);
    return this;
  }

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

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

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

  public long getBlockSize() {
    return this.blockSize;
  }

  public TBrokerFileStatus setBlockSize(long blockSize) {
    this.blockSize = blockSize;
    setBlockSizeIsSet(true);
    return this;
  }

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

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

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

  public long getModificationTime() {
    return this.modificationTime;
  }

  public TBrokerFileStatus setModificationTime(long modificationTime) {
    this.modificationTime = modificationTime;
    setModificationTimeIsSet(true);
    return this;
  }

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

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

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

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

    case IS_DIR:
      if (value == null) {
        unsetIsDir();
      } else {
        setIsDir((java.lang.Boolean)value);
      }
      break;

    case SIZE:
      if (value == null) {
        unsetSize();
      } else {
        setSize((java.lang.Long)value);
      }
      break;

    case IS_SPLITABLE:
      if (value == null) {
        unsetIsSplitable();
      } else {
        setIsSplitable((java.lang.Boolean)value);
      }
      break;

    case BLOCK_SIZE:
      if (value == null) {
        unsetBlockSize();
      } else {
        setBlockSize((java.lang.Long)value);
      }
      break;

    case MODIFICATION_TIME:
      if (value == null) {
        unsetModificationTime();
      } else {
        setModificationTime((java.lang.Long)value);
      }
      break;

    }
  }

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

    case IS_DIR:
      return isIsDir();

    case SIZE:
      return getSize();

    case IS_SPLITABLE:
      return isIsSplitable();

    case BLOCK_SIZE:
      return getBlockSize();

    case MODIFICATION_TIME:
      return getModificationTime();

    }
    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 PATH:
      return isSetPath();
    case IS_DIR:
      return isSetIsDir();
    case SIZE:
      return isSetSize();
    case IS_SPLITABLE:
      return isSetIsSplitable();
    case BLOCK_SIZE:
      return isSetBlockSize();
    case MODIFICATION_TIME:
      return isSetModificationTime();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_path = true && this.isSetPath();
    boolean that_present_path = true && that.isSetPath();
    if (this_present_path || that_present_path) {
      if (!(this_present_path && that_present_path))
        return false;
      if (!this.path.equals(that.path))
        return false;
    }

    boolean this_present_isDir = true;
    boolean that_present_isDir = true;
    if (this_present_isDir || that_present_isDir) {
      if (!(this_present_isDir && that_present_isDir))
        return false;
      if (this.isDir != that.isDir)
        return false;
    }

    boolean this_present_size = true;
    boolean that_present_size = true;
    if (this_present_size || that_present_size) {
      if (!(this_present_size && that_present_size))
        return false;
      if (this.size != that.size)
        return false;
    }

    boolean this_present_isSplitable = true;
    boolean that_present_isSplitable = true;
    if (this_present_isSplitable || that_present_isSplitable) {
      if (!(this_present_isSplitable && that_present_isSplitable))
        return false;
      if (this.isSplitable != that.isSplitable)
        return false;
    }

    boolean this_present_blockSize = true && this.isSetBlockSize();
    boolean that_present_blockSize = true && that.isSetBlockSize();
    if (this_present_blockSize || that_present_blockSize) {
      if (!(this_present_blockSize && that_present_blockSize))
        return false;
      if (this.blockSize != that.blockSize)
        return false;
    }

    boolean this_present_modificationTime = true && this.isSetModificationTime();
    boolean that_present_modificationTime = true && that.isSetModificationTime();
    if (this_present_modificationTime || that_present_modificationTime) {
      if (!(this_present_modificationTime && that_present_modificationTime))
        return false;
      if (this.modificationTime != that.modificationTime)
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetPath()) ? 131071 : 524287);
    if (isSetPath())
      hashCode = hashCode * 8191 + path.hashCode();

    hashCode = hashCode * 8191 + ((isDir) ? 131071 : 524287);

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

    hashCode = hashCode * 8191 + ((isSplitable) ? 131071 : 524287);

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

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

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetPath(), other.isSetPath());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPath()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsDir(), other.isSetIsDir());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsDir()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDir, other.isDir);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSize(), other.isSetSize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSize()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.size, other.size);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIsSplitable(), other.isSetIsSplitable());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsSplitable()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isSplitable, other.isSplitable);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBlockSize(), other.isSetBlockSize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBlockSize()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockSize, other.blockSize);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetModificationTime(), other.isSetModificationTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetModificationTime()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modificationTime, other.modificationTime);
      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("TBrokerFileStatus(");
    boolean first = true;

    sb.append("path:");
    if (this.path == null) {
      sb.append("null");
    } else {
      sb.append(this.path);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("isDir:");
    sb.append(this.isDir);
    first = false;
    if (!first) sb.append(", ");
    sb.append("size:");
    sb.append(this.size);
    first = false;
    if (!first) sb.append(", ");
    sb.append("isSplitable:");
    sb.append(this.isSplitable);
    first = false;
    if (isSetBlockSize()) {
      if (!first) sb.append(", ");
      sb.append("blockSize:");
      sb.append(this.blockSize);
      first = false;
    }
    if (isSetModificationTime()) {
      if (!first) sb.append(", ");
      sb.append("modificationTime:");
      sb.append(this.modificationTime);
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

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

  private static class TBrokerFileStatusStandardScheme extends org.apache.thrift.scheme.StandardScheme<TBrokerFileStatus> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TBrokerFileStatus 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: // PATH
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.path = iprot.readString();
              struct.setPathIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // IS_DIR
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isDir = iprot.readBool();
              struct.setIsDirIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // SIZE
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.size = iprot.readI64();
              struct.setSizeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // IS_SPLITABLE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isSplitable = iprot.readBool();
              struct.setIsSplitableIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // BLOCK_SIZE
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.blockSize = iprot.readI64();
              struct.setBlockSizeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // MODIFICATION_TIME
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.modificationTime = iprot.readI64();
              struct.setModificationTimeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      if (!struct.isSetIsDir()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'isDir' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetSize()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'size' was not found in serialized data! Struct: " + toString());
      }
      if (!struct.isSetIsSplitable()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'isSplitable' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.path != null) {
        oprot.writeFieldBegin(PATH_FIELD_DESC);
        oprot.writeString(struct.path);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(IS_DIR_FIELD_DESC);
      oprot.writeBool(struct.isDir);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SIZE_FIELD_DESC);
      oprot.writeI64(struct.size);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IS_SPLITABLE_FIELD_DESC);
      oprot.writeBool(struct.isSplitable);
      oprot.writeFieldEnd();
      if (struct.isSetBlockSize()) {
        oprot.writeFieldBegin(BLOCK_SIZE_FIELD_DESC);
        oprot.writeI64(struct.blockSize);
        oprot.writeFieldEnd();
      }
      if (struct.isSetModificationTime()) {
        oprot.writeFieldBegin(MODIFICATION_TIME_FIELD_DESC);
        oprot.writeI64(struct.modificationTime);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TBrokerFileStatusTupleScheme extends org.apache.thrift.scheme.TupleScheme<TBrokerFileStatus> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TBrokerFileStatus struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeString(struct.path);
      oprot.writeBool(struct.isDir);
      oprot.writeI64(struct.size);
      oprot.writeBool(struct.isSplitable);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetBlockSize()) {
        optionals.set(0);
      }
      if (struct.isSetModificationTime()) {
        optionals.set(1);
      }
      oprot.writeBitSet(optionals, 2);
      if (struct.isSetBlockSize()) {
        oprot.writeI64(struct.blockSize);
      }
      if (struct.isSetModificationTime()) {
        oprot.writeI64(struct.modificationTime);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TBrokerFileStatus struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.path = iprot.readString();
      struct.setPathIsSet(true);
      struct.isDir = iprot.readBool();
      struct.setIsDirIsSet(true);
      struct.size = iprot.readI64();
      struct.setSizeIsSet(true);
      struct.isSplitable = iprot.readBool();
      struct.setIsSplitableIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(2);
      if (incoming.get(0)) {
        struct.blockSize = iprot.readI64();
        struct.setBlockSizeIsSet(true);
      }
      if (incoming.get(1)) {
        struct.modificationTime = iprot.readI64();
        struct.setModificationTimeIsSet(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();
  }
}