All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceInfoResp Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Thrift Compiler (0.14.1)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.iotdb.mpp.rpc.thrift;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.14.1)", date = "2024-09-12")
public class TFragmentInstanceInfoResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TFragmentInstanceInfoResp");

  private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField END_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("endTime", org.apache.thrift.protocol.TType.I64, (short)2);
  private static final org.apache.thrift.protocol.TField FAILED_MESSAGES_FIELD_DESC = new org.apache.thrift.protocol.TField("failedMessages", org.apache.thrift.protocol.TType.LIST, (short)3);
  private static final org.apache.thrift.protocol.TField FAILURE_INFO_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("failureInfoList", org.apache.thrift.protocol.TType.LIST, (short)4);

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

  public @org.apache.thrift.annotation.Nullable java.lang.String state; // required
  public long endTime; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List failedMessages; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List failureInfoList; // 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 {
    STATE((short)1, "state"),
    END_TIME((short)2, "endTime"),
    FAILED_MESSAGES((short)3, "failedMessages"),
    FAILURE_INFO_LIST((short)4, "failureInfoList");

    private static final java.util.Map byName = new java.util.HashMap();

    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: // STATE
          return STATE;
        case 2: // END_TIME
          return END_TIME;
        case 3: // FAILED_MESSAGES
          return FAILED_MESSAGES;
        case 4: // FAILURE_INFO_LIST
          return FAILURE_INFO_LIST;
        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 __ENDTIME_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.END_TIME,_Fields.FAILED_MESSAGES,_Fields.FAILURE_INFO_LIST};
  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.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.END_TIME, new org.apache.thrift.meta_data.FieldMetaData("endTime", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.FAILED_MESSAGES, new org.apache.thrift.meta_data.FieldMetaData("failedMessages", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.FAILURE_INFO_LIST, new org.apache.thrift.meta_data.FieldMetaData("failureInfoList", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING            , true))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TFragmentInstanceInfoResp.class, metaDataMap);
  }

  public TFragmentInstanceInfoResp() {
  }

  public TFragmentInstanceInfoResp(
    java.lang.String state)
  {
    this();
    this.state = state;
  }

  /**
   * Performs a deep copy on other.
   */
  public TFragmentInstanceInfoResp(TFragmentInstanceInfoResp other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetState()) {
      this.state = other.state;
    }
    this.endTime = other.endTime;
    if (other.isSetFailedMessages()) {
      java.util.List __this__failedMessages = new java.util.ArrayList(other.failedMessages);
      this.failedMessages = __this__failedMessages;
    }
    if (other.isSetFailureInfoList()) {
      java.util.List __this__failureInfoList = new java.util.ArrayList(other.failureInfoList);
      this.failureInfoList = __this__failureInfoList;
    }
  }

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

  @Override
  public void clear() {
    this.state = null;
    setEndTimeIsSet(false);
    this.endTime = 0;
    this.failedMessages = null;
    this.failureInfoList = null;
  }

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

  public TFragmentInstanceInfoResp setState(@org.apache.thrift.annotation.Nullable java.lang.String state) {
    this.state = state;
    return this;
  }

  public void unsetState() {
    this.state = null;
  }

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

  public void setStateIsSet(boolean value) {
    if (!value) {
      this.state = null;
    }
  }

  public long getEndTime() {
    return this.endTime;
  }

  public TFragmentInstanceInfoResp setEndTime(long endTime) {
    this.endTime = endTime;
    setEndTimeIsSet(true);
    return this;
  }

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

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

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

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator getFailedMessagesIterator() {
    return (this.failedMessages == null) ? null : this.failedMessages.iterator();
  }

  public void addToFailedMessages(java.lang.String elem) {
    if (this.failedMessages == null) {
      this.failedMessages = new java.util.ArrayList();
    }
    this.failedMessages.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List getFailedMessages() {
    return this.failedMessages;
  }

  public TFragmentInstanceInfoResp setFailedMessages(@org.apache.thrift.annotation.Nullable java.util.List failedMessages) {
    this.failedMessages = failedMessages;
    return this;
  }

  public void unsetFailedMessages() {
    this.failedMessages = null;
  }

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

  public void setFailedMessagesIsSet(boolean value) {
    if (!value) {
      this.failedMessages = null;
    }
  }

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator getFailureInfoListIterator() {
    return (this.failureInfoList == null) ? null : this.failureInfoList.iterator();
  }

  public void addToFailureInfoList(java.nio.ByteBuffer elem) {
    if (this.failureInfoList == null) {
      this.failureInfoList = new java.util.ArrayList();
    }
    this.failureInfoList.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List getFailureInfoList() {
    return this.failureInfoList;
  }

  public TFragmentInstanceInfoResp setFailureInfoList(@org.apache.thrift.annotation.Nullable java.util.List failureInfoList) {
    this.failureInfoList = failureInfoList;
    return this;
  }

  public void unsetFailureInfoList() {
    this.failureInfoList = null;
  }

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

  public void setFailureInfoListIsSet(boolean value) {
    if (!value) {
      this.failureInfoList = null;
    }
  }

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

    case END_TIME:
      if (value == null) {
        unsetEndTime();
      } else {
        setEndTime((java.lang.Long)value);
      }
      break;

    case FAILED_MESSAGES:
      if (value == null) {
        unsetFailedMessages();
      } else {
        setFailedMessages((java.util.List)value);
      }
      break;

    case FAILURE_INFO_LIST:
      if (value == null) {
        unsetFailureInfoList();
      } else {
        setFailureInfoList((java.util.List)value);
      }
      break;

    }
  }

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

    case END_TIME:
      return getEndTime();

    case FAILED_MESSAGES:
      return getFailedMessages();

    case FAILURE_INFO_LIST:
      return getFailureInfoList();

    }
    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 STATE:
      return isSetState();
    case END_TIME:
      return isSetEndTime();
    case FAILED_MESSAGES:
      return isSetFailedMessages();
    case FAILURE_INFO_LIST:
      return isSetFailureInfoList();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_state = true && this.isSetState();
    boolean that_present_state = true && that.isSetState();
    if (this_present_state || that_present_state) {
      if (!(this_present_state && that_present_state))
        return false;
      if (!this.state.equals(that.state))
        return false;
    }

    boolean this_present_endTime = true && this.isSetEndTime();
    boolean that_present_endTime = true && that.isSetEndTime();
    if (this_present_endTime || that_present_endTime) {
      if (!(this_present_endTime && that_present_endTime))
        return false;
      if (this.endTime != that.endTime)
        return false;
    }

    boolean this_present_failedMessages = true && this.isSetFailedMessages();
    boolean that_present_failedMessages = true && that.isSetFailedMessages();
    if (this_present_failedMessages || that_present_failedMessages) {
      if (!(this_present_failedMessages && that_present_failedMessages))
        return false;
      if (!this.failedMessages.equals(that.failedMessages))
        return false;
    }

    boolean this_present_failureInfoList = true && this.isSetFailureInfoList();
    boolean that_present_failureInfoList = true && that.isSetFailureInfoList();
    if (this_present_failureInfoList || that_present_failureInfoList) {
      if (!(this_present_failureInfoList && that_present_failureInfoList))
        return false;
      if (!this.failureInfoList.equals(that.failureInfoList))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetState()) ? 131071 : 524287);
    if (isSetState())
      hashCode = hashCode * 8191 + state.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetFailedMessages()) ? 131071 : 524287);
    if (isSetFailedMessages())
      hashCode = hashCode * 8191 + failedMessages.hashCode();

    hashCode = hashCode * 8191 + ((isSetFailureInfoList()) ? 131071 : 524287);
    if (isSetFailureInfoList())
      hashCode = hashCode * 8191 + failureInfoList.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetState(), other.isSetState());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetState()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEndTime()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endTime, other.endTime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFailedMessages(), other.isSetFailedMessages());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFailedMessages()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failedMessages, other.failedMessages);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetFailureInfoList(), other.isSetFailureInfoList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFailureInfoList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failureInfoList, other.failureInfoList);
      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("TFragmentInstanceInfoResp(");
    boolean first = true;

    sb.append("state:");
    if (this.state == null) {
      sb.append("null");
    } else {
      sb.append(this.state);
    }
    first = false;
    if (isSetEndTime()) {
      if (!first) sb.append(", ");
      sb.append("endTime:");
      sb.append(this.endTime);
      first = false;
    }
    if (isSetFailedMessages()) {
      if (!first) sb.append(", ");
      sb.append("failedMessages:");
      if (this.failedMessages == null) {
        sb.append("null");
      } else {
        sb.append(this.failedMessages);
      }
      first = false;
    }
    if (isSetFailureInfoList()) {
      if (!first) sb.append(", ");
      sb.append("failureInfoList:");
      if (this.failureInfoList == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.failureInfoList, sb);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (state == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'state' was not present! Struct: " + toString());
    }
    // check for sub-struct validity
  }

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

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

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

  private static class TFragmentInstanceInfoRespStandardScheme extends org.apache.thrift.scheme.StandardScheme {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TFragmentInstanceInfoResp 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: // STATE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.state = iprot.readString();
              struct.setStateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // END_TIME
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.endTime = iprot.readI64();
              struct.setEndTimeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // FAILED_MESSAGES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list58 = iprot.readListBegin();
                struct.failedMessages = new java.util.ArrayList(_list58.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem59;
                for (int _i60 = 0; _i60 < _list58.size; ++_i60)
                {
                  _elem59 = iprot.readString();
                  struct.failedMessages.add(_elem59);
                }
                iprot.readListEnd();
              }
              struct.setFailedMessagesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // FAILURE_INFO_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list61 = iprot.readListBegin();
                struct.failureInfoList = new java.util.ArrayList(_list61.size);
                @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem62;
                for (int _i63 = 0; _i63 < _list61.size; ++_i63)
                {
                  _elem62 = iprot.readBinary();
                  struct.failureInfoList.add(_elem62);
                }
                iprot.readListEnd();
              }
              struct.setFailureInfoListIsSet(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, TFragmentInstanceInfoResp struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.state != null) {
        oprot.writeFieldBegin(STATE_FIELD_DESC);
        oprot.writeString(struct.state);
        oprot.writeFieldEnd();
      }
      if (struct.isSetEndTime()) {
        oprot.writeFieldBegin(END_TIME_FIELD_DESC);
        oprot.writeI64(struct.endTime);
        oprot.writeFieldEnd();
      }
      if (struct.failedMessages != null) {
        if (struct.isSetFailedMessages()) {
          oprot.writeFieldBegin(FAILED_MESSAGES_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.failedMessages.size()));
            for (java.lang.String _iter64 : struct.failedMessages)
            {
              oprot.writeString(_iter64);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.failureInfoList != null) {
        if (struct.isSetFailureInfoList()) {
          oprot.writeFieldBegin(FAILURE_INFO_LIST_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.failureInfoList.size()));
            for (java.nio.ByteBuffer _iter65 : struct.failureInfoList)
            {
              oprot.writeBinary(_iter65);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TFragmentInstanceInfoRespTupleScheme extends org.apache.thrift.scheme.TupleScheme {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TFragmentInstanceInfoResp struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeString(struct.state);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetEndTime()) {
        optionals.set(0);
      }
      if (struct.isSetFailedMessages()) {
        optionals.set(1);
      }
      if (struct.isSetFailureInfoList()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetEndTime()) {
        oprot.writeI64(struct.endTime);
      }
      if (struct.isSetFailedMessages()) {
        {
          oprot.writeI32(struct.failedMessages.size());
          for (java.lang.String _iter66 : struct.failedMessages)
          {
            oprot.writeString(_iter66);
          }
        }
      }
      if (struct.isSetFailureInfoList()) {
        {
          oprot.writeI32(struct.failureInfoList.size());
          for (java.nio.ByteBuffer _iter67 : struct.failureInfoList)
          {
            oprot.writeBinary(_iter67);
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TFragmentInstanceInfoResp struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.state = iprot.readString();
      struct.setStateIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        struct.endTime = iprot.readI64();
        struct.setEndTimeIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.thrift.protocol.TList _list68 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.failedMessages = new java.util.ArrayList(_list68.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem69;
          for (int _i70 = 0; _i70 < _list68.size; ++_i70)
          {
            _elem69 = iprot.readString();
            struct.failedMessages.add(_elem69);
          }
        }
        struct.setFailedMessagesIsSet(true);
      }
      if (incoming.get(2)) {
        {
          org.apache.thrift.protocol.TList _list71 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
          struct.failureInfoList = new java.util.ArrayList(_list71.size);
          @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem72;
          for (int _i73 = 0; _i73 < _list71.size; ++_i73)
          {
            _elem72 = iprot.readBinary();
            struct.failureInfoList.add(_elem72);
          }
        }
        struct.setFailureInfoListIsSet(true);
      }
    }
  }

  private static  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();
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy