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

  private static final org.apache.thrift.protocol.TField PARTITION_SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("partition_spec", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("session_id", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField TABLE_BATCH_READ_SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("table_batch_read_session", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField CONNECT_TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("connect_timeout", org.apache.thrift.protocol.TType.I32, (short)4);
  private static final org.apache.thrift.protocol.TField READ_TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("read_timeout", org.apache.thrift.protocol.TType.I32, (short)5);
  private static final org.apache.thrift.protocol.TField RETRY_TIMES_FIELD_DESC = new org.apache.thrift.protocol.TField("retry_times", org.apache.thrift.protocol.TType.I32, (short)6);

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

  public @org.apache.thrift.annotation.Nullable java.lang.String partition_spec; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String session_id; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String table_batch_read_session; // optional
  public int connect_timeout; // optional
  public int read_timeout; // optional
  public int retry_times; // 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 {
    PARTITION_SPEC((short)1, "partition_spec"),
    SESSION_ID((short)2, "session_id"),
    TABLE_BATCH_READ_SESSION((short)3, "table_batch_read_session"),
    CONNECT_TIMEOUT((short)4, "connect_timeout"),
    READ_TIMEOUT((short)5, "read_timeout"),
    RETRY_TIMES((short)6, "retry_times");

    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: // PARTITION_SPEC
          return PARTITION_SPEC;
        case 2: // SESSION_ID
          return SESSION_ID;
        case 3: // TABLE_BATCH_READ_SESSION
          return TABLE_BATCH_READ_SESSION;
        case 4: // CONNECT_TIMEOUT
          return CONNECT_TIMEOUT;
        case 5: // READ_TIMEOUT
          return READ_TIMEOUT;
        case 6: // RETRY_TIMES
          return RETRY_TIMES;
        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 __CONNECT_TIMEOUT_ISSET_ID = 0;
  private static final int __READ_TIMEOUT_ISSET_ID = 1;
  private static final int __RETRY_TIMES_ISSET_ID = 2;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.PARTITION_SPEC,_Fields.SESSION_ID,_Fields.TABLE_BATCH_READ_SESSION,_Fields.CONNECT_TIMEOUT,_Fields.READ_TIMEOUT,_Fields.RETRY_TIMES};
  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.PARTITION_SPEC, new org.apache.thrift.meta_data.FieldMetaData("partition_spec", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("session_id", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TABLE_BATCH_READ_SESSION, new org.apache.thrift.meta_data.FieldMetaData("table_batch_read_session", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CONNECT_TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("connect_timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.READ_TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("read_timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.RETRY_TIMES, new org.apache.thrift.meta_data.FieldMetaData("retry_times", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TMaxComputeFileDesc.class, metaDataMap);
  }

  public TMaxComputeFileDesc() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TMaxComputeFileDesc(TMaxComputeFileDesc other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetPartitionSpec()) {
      this.partition_spec = other.partition_spec;
    }
    if (other.isSetSessionId()) {
      this.session_id = other.session_id;
    }
    if (other.isSetTableBatchReadSession()) {
      this.table_batch_read_session = other.table_batch_read_session;
    }
    this.connect_timeout = other.connect_timeout;
    this.read_timeout = other.read_timeout;
    this.retry_times = other.retry_times;
  }

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

  @Override
  public void clear() {
    this.partition_spec = null;
    this.session_id = null;
    this.table_batch_read_session = null;
    setConnectTimeoutIsSet(false);
    this.connect_timeout = 0;
    setReadTimeoutIsSet(false);
    this.read_timeout = 0;
    setRetryTimesIsSet(false);
    this.retry_times = 0;
  }

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

  public TMaxComputeFileDesc setPartitionSpec(@org.apache.thrift.annotation.Nullable java.lang.String partition_spec) {
    this.partition_spec = partition_spec;
    return this;
  }

  public void unsetPartitionSpec() {
    this.partition_spec = null;
  }

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

  public void setPartitionSpecIsSet(boolean value) {
    if (!value) {
      this.partition_spec = null;
    }
  }

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

  public TMaxComputeFileDesc setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String session_id) {
    this.session_id = session_id;
    return this;
  }

  public void unsetSessionId() {
    this.session_id = null;
  }

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

  public void setSessionIdIsSet(boolean value) {
    if (!value) {
      this.session_id = null;
    }
  }

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

  public TMaxComputeFileDesc setTableBatchReadSession(@org.apache.thrift.annotation.Nullable java.lang.String table_batch_read_session) {
    this.table_batch_read_session = table_batch_read_session;
    return this;
  }

  public void unsetTableBatchReadSession() {
    this.table_batch_read_session = null;
  }

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

  public void setTableBatchReadSessionIsSet(boolean value) {
    if (!value) {
      this.table_batch_read_session = null;
    }
  }

  public int getConnectTimeout() {
    return this.connect_timeout;
  }

  public TMaxComputeFileDesc setConnectTimeout(int connect_timeout) {
    this.connect_timeout = connect_timeout;
    setConnectTimeoutIsSet(true);
    return this;
  }

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

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

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

  public int getReadTimeout() {
    return this.read_timeout;
  }

  public TMaxComputeFileDesc setReadTimeout(int read_timeout) {
    this.read_timeout = read_timeout;
    setReadTimeoutIsSet(true);
    return this;
  }

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

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

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

  public int getRetryTimes() {
    return this.retry_times;
  }

  public TMaxComputeFileDesc setRetryTimes(int retry_times) {
    this.retry_times = retry_times;
    setRetryTimesIsSet(true);
    return this;
  }

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

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

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

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

    case SESSION_ID:
      if (value == null) {
        unsetSessionId();
      } else {
        setSessionId((java.lang.String)value);
      }
      break;

    case TABLE_BATCH_READ_SESSION:
      if (value == null) {
        unsetTableBatchReadSession();
      } else {
        setTableBatchReadSession((java.lang.String)value);
      }
      break;

    case CONNECT_TIMEOUT:
      if (value == null) {
        unsetConnectTimeout();
      } else {
        setConnectTimeout((java.lang.Integer)value);
      }
      break;

    case READ_TIMEOUT:
      if (value == null) {
        unsetReadTimeout();
      } else {
        setReadTimeout((java.lang.Integer)value);
      }
      break;

    case RETRY_TIMES:
      if (value == null) {
        unsetRetryTimes();
      } else {
        setRetryTimes((java.lang.Integer)value);
      }
      break;

    }
  }

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

    case SESSION_ID:
      return getSessionId();

    case TABLE_BATCH_READ_SESSION:
      return getTableBatchReadSession();

    case CONNECT_TIMEOUT:
      return getConnectTimeout();

    case READ_TIMEOUT:
      return getReadTimeout();

    case RETRY_TIMES:
      return getRetryTimes();

    }
    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 PARTITION_SPEC:
      return isSetPartitionSpec();
    case SESSION_ID:
      return isSetSessionId();
    case TABLE_BATCH_READ_SESSION:
      return isSetTableBatchReadSession();
    case CONNECT_TIMEOUT:
      return isSetConnectTimeout();
    case READ_TIMEOUT:
      return isSetReadTimeout();
    case RETRY_TIMES:
      return isSetRetryTimes();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_partition_spec = true && this.isSetPartitionSpec();
    boolean that_present_partition_spec = true && that.isSetPartitionSpec();
    if (this_present_partition_spec || that_present_partition_spec) {
      if (!(this_present_partition_spec && that_present_partition_spec))
        return false;
      if (!this.partition_spec.equals(that.partition_spec))
        return false;
    }

    boolean this_present_session_id = true && this.isSetSessionId();
    boolean that_present_session_id = true && that.isSetSessionId();
    if (this_present_session_id || that_present_session_id) {
      if (!(this_present_session_id && that_present_session_id))
        return false;
      if (!this.session_id.equals(that.session_id))
        return false;
    }

    boolean this_present_table_batch_read_session = true && this.isSetTableBatchReadSession();
    boolean that_present_table_batch_read_session = true && that.isSetTableBatchReadSession();
    if (this_present_table_batch_read_session || that_present_table_batch_read_session) {
      if (!(this_present_table_batch_read_session && that_present_table_batch_read_session))
        return false;
      if (!this.table_batch_read_session.equals(that.table_batch_read_session))
        return false;
    }

    boolean this_present_connect_timeout = true && this.isSetConnectTimeout();
    boolean that_present_connect_timeout = true && that.isSetConnectTimeout();
    if (this_present_connect_timeout || that_present_connect_timeout) {
      if (!(this_present_connect_timeout && that_present_connect_timeout))
        return false;
      if (this.connect_timeout != that.connect_timeout)
        return false;
    }

    boolean this_present_read_timeout = true && this.isSetReadTimeout();
    boolean that_present_read_timeout = true && that.isSetReadTimeout();
    if (this_present_read_timeout || that_present_read_timeout) {
      if (!(this_present_read_timeout && that_present_read_timeout))
        return false;
      if (this.read_timeout != that.read_timeout)
        return false;
    }

    boolean this_present_retry_times = true && this.isSetRetryTimes();
    boolean that_present_retry_times = true && that.isSetRetryTimes();
    if (this_present_retry_times || that_present_retry_times) {
      if (!(this_present_retry_times && that_present_retry_times))
        return false;
      if (this.retry_times != that.retry_times)
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetPartitionSpec()) ? 131071 : 524287);
    if (isSetPartitionSpec())
      hashCode = hashCode * 8191 + partition_spec.hashCode();

    hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287);
    if (isSetSessionId())
      hashCode = hashCode * 8191 + session_id.hashCode();

    hashCode = hashCode * 8191 + ((isSetTableBatchReadSession()) ? 131071 : 524287);
    if (isSetTableBatchReadSession())
      hashCode = hashCode * 8191 + table_batch_read_session.hashCode();

    hashCode = hashCode * 8191 + ((isSetConnectTimeout()) ? 131071 : 524287);
    if (isSetConnectTimeout())
      hashCode = hashCode * 8191 + connect_timeout;

    hashCode = hashCode * 8191 + ((isSetReadTimeout()) ? 131071 : 524287);
    if (isSetReadTimeout())
      hashCode = hashCode * 8191 + read_timeout;

    hashCode = hashCode * 8191 + ((isSetRetryTimes()) ? 131071 : 524287);
    if (isSetRetryTimes())
      hashCode = hashCode * 8191 + retry_times;

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetPartitionSpec(), other.isSetPartitionSpec());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPartitionSpec()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition_spec, other.partition_spec);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSessionId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session_id, other.session_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTableBatchReadSession(), other.isSetTableBatchReadSession());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableBatchReadSession()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_batch_read_session, other.table_batch_read_session);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetConnectTimeout(), other.isSetConnectTimeout());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetConnectTimeout()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.connect_timeout, other.connect_timeout);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetReadTimeout(), other.isSetReadTimeout());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReadTimeout()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.read_timeout, other.read_timeout);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetRetryTimes(), other.isSetRetryTimes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRetryTimes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.retry_times, other.retry_times);
      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("TMaxComputeFileDesc(");
    boolean first = true;

    if (isSetPartitionSpec()) {
      sb.append("partition_spec:");
      if (this.partition_spec == null) {
        sb.append("null");
      } else {
        sb.append(this.partition_spec);
      }
      first = false;
    }
    if (isSetSessionId()) {
      if (!first) sb.append(", ");
      sb.append("session_id:");
      if (this.session_id == null) {
        sb.append("null");
      } else {
        sb.append(this.session_id);
      }
      first = false;
    }
    if (isSetTableBatchReadSession()) {
      if (!first) sb.append(", ");
      sb.append("table_batch_read_session:");
      if (this.table_batch_read_session == null) {
        sb.append("null");
      } else {
        sb.append(this.table_batch_read_session);
      }
      first = false;
    }
    if (isSetConnectTimeout()) {
      if (!first) sb.append(", ");
      sb.append("connect_timeout:");
      sb.append(this.connect_timeout);
      first = false;
    }
    if (isSetReadTimeout()) {
      if (!first) sb.append(", ");
      sb.append("read_timeout:");
      sb.append(this.read_timeout);
      first = false;
    }
    if (isSetRetryTimes()) {
      if (!first) sb.append(", ");
      sb.append("retry_times:");
      sb.append(this.retry_times);
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

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

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

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

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

  private static class TMaxComputeFileDescStandardScheme extends org.apache.thrift.scheme.StandardScheme<TMaxComputeFileDesc> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TMaxComputeFileDesc 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: // PARTITION_SPEC
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.partition_spec = iprot.readString();
              struct.setPartitionSpecIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // SESSION_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.session_id = iprot.readString();
              struct.setSessionIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // TABLE_BATCH_READ_SESSION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.table_batch_read_session = iprot.readString();
              struct.setTableBatchReadSessionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // CONNECT_TIMEOUT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.connect_timeout = iprot.readI32();
              struct.setConnectTimeoutIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // READ_TIMEOUT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.read_timeout = iprot.readI32();
              struct.setReadTimeoutIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // RETRY_TIMES
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.retry_times = iprot.readI32();
              struct.setRetryTimesIsSet(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, TMaxComputeFileDesc struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.partition_spec != null) {
        if (struct.isSetPartitionSpec()) {
          oprot.writeFieldBegin(PARTITION_SPEC_FIELD_DESC);
          oprot.writeString(struct.partition_spec);
          oprot.writeFieldEnd();
        }
      }
      if (struct.session_id != null) {
        if (struct.isSetSessionId()) {
          oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
          oprot.writeString(struct.session_id);
          oprot.writeFieldEnd();
        }
      }
      if (struct.table_batch_read_session != null) {
        if (struct.isSetTableBatchReadSession()) {
          oprot.writeFieldBegin(TABLE_BATCH_READ_SESSION_FIELD_DESC);
          oprot.writeString(struct.table_batch_read_session);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetConnectTimeout()) {
        oprot.writeFieldBegin(CONNECT_TIMEOUT_FIELD_DESC);
        oprot.writeI32(struct.connect_timeout);
        oprot.writeFieldEnd();
      }
      if (struct.isSetReadTimeout()) {
        oprot.writeFieldBegin(READ_TIMEOUT_FIELD_DESC);
        oprot.writeI32(struct.read_timeout);
        oprot.writeFieldEnd();
      }
      if (struct.isSetRetryTimes()) {
        oprot.writeFieldBegin(RETRY_TIMES_FIELD_DESC);
        oprot.writeI32(struct.retry_times);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TMaxComputeFileDescTupleScheme extends org.apache.thrift.scheme.TupleScheme<TMaxComputeFileDesc> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TMaxComputeFileDesc 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.isSetPartitionSpec()) {
        optionals.set(0);
      }
      if (struct.isSetSessionId()) {
        optionals.set(1);
      }
      if (struct.isSetTableBatchReadSession()) {
        optionals.set(2);
      }
      if (struct.isSetConnectTimeout()) {
        optionals.set(3);
      }
      if (struct.isSetReadTimeout()) {
        optionals.set(4);
      }
      if (struct.isSetRetryTimes()) {
        optionals.set(5);
      }
      oprot.writeBitSet(optionals, 6);
      if (struct.isSetPartitionSpec()) {
        oprot.writeString(struct.partition_spec);
      }
      if (struct.isSetSessionId()) {
        oprot.writeString(struct.session_id);
      }
      if (struct.isSetTableBatchReadSession()) {
        oprot.writeString(struct.table_batch_read_session);
      }
      if (struct.isSetConnectTimeout()) {
        oprot.writeI32(struct.connect_timeout);
      }
      if (struct.isSetReadTimeout()) {
        oprot.writeI32(struct.read_timeout);
      }
      if (struct.isSetRetryTimes()) {
        oprot.writeI32(struct.retry_times);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TMaxComputeFileDesc struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(6);
      if (incoming.get(0)) {
        struct.partition_spec = iprot.readString();
        struct.setPartitionSpecIsSet(true);
      }
      if (incoming.get(1)) {
        struct.session_id = iprot.readString();
        struct.setSessionIdIsSet(true);
      }
      if (incoming.get(2)) {
        struct.table_batch_read_session = iprot.readString();
        struct.setTableBatchReadSessionIsSet(true);
      }
      if (incoming.get(3)) {
        struct.connect_timeout = iprot.readI32();
        struct.setConnectTimeoutIsSet(true);
      }
      if (incoming.get(4)) {
        struct.read_timeout = iprot.readI32();
        struct.setReadTimeoutIsSet(true);
      }
      if (incoming.get(5)) {
        struct.retry_times = iprot.readI32();
        struct.setRetryTimesIsSet(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();
  }
}