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

org.apache.iotdb.mpp.rpc.thrift.TPipeHeartbeatResp 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 TPipeHeartbeatResp 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("TPipeHeartbeatResp");

  private static final org.apache.thrift.protocol.TField PIPE_META_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("pipeMetaList", org.apache.thrift.protocol.TType.LIST, (short)1);
  private static final org.apache.thrift.protocol.TField PIPE_COMPLETED_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("pipeCompletedList", org.apache.thrift.protocol.TType.LIST, (short)2);
  private static final org.apache.thrift.protocol.TField PIPE_REMAINING_EVENT_COUNT_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("pipeRemainingEventCountList", org.apache.thrift.protocol.TType.LIST, (short)3);
  private static final org.apache.thrift.protocol.TField PIPE_REMAINING_TIME_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("pipeRemainingTimeList", org.apache.thrift.protocol.TType.LIST, (short)4);

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

  public @org.apache.thrift.annotation.Nullable java.util.List pipeMetaList; // required
  public @org.apache.thrift.annotation.Nullable java.util.List pipeCompletedList; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List pipeRemainingEventCountList; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List pipeRemainingTimeList; // 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 {
    PIPE_META_LIST((short)1, "pipeMetaList"),
    PIPE_COMPLETED_LIST((short)2, "pipeCompletedList"),
    PIPE_REMAINING_EVENT_COUNT_LIST((short)3, "pipeRemainingEventCountList"),
    PIPE_REMAINING_TIME_LIST((short)4, "pipeRemainingTimeList");

    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: // PIPE_META_LIST
          return PIPE_META_LIST;
        case 2: // PIPE_COMPLETED_LIST
          return PIPE_COMPLETED_LIST;
        case 3: // PIPE_REMAINING_EVENT_COUNT_LIST
          return PIPE_REMAINING_EVENT_COUNT_LIST;
        case 4: // PIPE_REMAINING_TIME_LIST
          return PIPE_REMAINING_TIME_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 _Fields optionals[] = {_Fields.PIPE_COMPLETED_LIST,_Fields.PIPE_REMAINING_EVENT_COUNT_LIST,_Fields.PIPE_REMAINING_TIME_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.PIPE_META_LIST, new org.apache.thrift.meta_data.FieldMetaData("pipeMetaList", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        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))));
    tmpMap.put(_Fields.PIPE_COMPLETED_LIST, new org.apache.thrift.meta_data.FieldMetaData("pipeCompletedList", 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.BOOL))));
    tmpMap.put(_Fields.PIPE_REMAINING_EVENT_COUNT_LIST, new org.apache.thrift.meta_data.FieldMetaData("pipeRemainingEventCountList", 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.I64))));
    tmpMap.put(_Fields.PIPE_REMAINING_TIME_LIST, new org.apache.thrift.meta_data.FieldMetaData("pipeRemainingTimeList", 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.DOUBLE))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPipeHeartbeatResp.class, metaDataMap);
  }

  public TPipeHeartbeatResp() {
  }

  public TPipeHeartbeatResp(
    java.util.List pipeMetaList)
  {
    this();
    this.pipeMetaList = pipeMetaList;
  }

  /**
   * Performs a deep copy on other.
   */
  public TPipeHeartbeatResp(TPipeHeartbeatResp other) {
    if (other.isSetPipeMetaList()) {
      java.util.List __this__pipeMetaList = new java.util.ArrayList(other.pipeMetaList);
      this.pipeMetaList = __this__pipeMetaList;
    }
    if (other.isSetPipeCompletedList()) {
      java.util.List __this__pipeCompletedList = new java.util.ArrayList(other.pipeCompletedList);
      this.pipeCompletedList = __this__pipeCompletedList;
    }
    if (other.isSetPipeRemainingEventCountList()) {
      java.util.List __this__pipeRemainingEventCountList = new java.util.ArrayList(other.pipeRemainingEventCountList);
      this.pipeRemainingEventCountList = __this__pipeRemainingEventCountList;
    }
    if (other.isSetPipeRemainingTimeList()) {
      java.util.List __this__pipeRemainingTimeList = new java.util.ArrayList(other.pipeRemainingTimeList);
      this.pipeRemainingTimeList = __this__pipeRemainingTimeList;
    }
  }

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

  @Override
  public void clear() {
    this.pipeMetaList = null;
    this.pipeCompletedList = null;
    this.pipeRemainingEventCountList = null;
    this.pipeRemainingTimeList = null;
  }

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

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

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

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

  public TPipeHeartbeatResp setPipeMetaList(@org.apache.thrift.annotation.Nullable java.util.List pipeMetaList) {
    this.pipeMetaList = pipeMetaList;
    return this;
  }

  public void unsetPipeMetaList() {
    this.pipeMetaList = null;
  }

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

  public void setPipeMetaListIsSet(boolean value) {
    if (!value) {
      this.pipeMetaList = null;
    }
  }

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

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

  public void addToPipeCompletedList(boolean elem) {
    if (this.pipeCompletedList == null) {
      this.pipeCompletedList = new java.util.ArrayList();
    }
    this.pipeCompletedList.add(elem);
  }

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

  public TPipeHeartbeatResp setPipeCompletedList(@org.apache.thrift.annotation.Nullable java.util.List pipeCompletedList) {
    this.pipeCompletedList = pipeCompletedList;
    return this;
  }

  public void unsetPipeCompletedList() {
    this.pipeCompletedList = null;
  }

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

  public void setPipeCompletedListIsSet(boolean value) {
    if (!value) {
      this.pipeCompletedList = null;
    }
  }

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

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

  public void addToPipeRemainingEventCountList(long elem) {
    if (this.pipeRemainingEventCountList == null) {
      this.pipeRemainingEventCountList = new java.util.ArrayList();
    }
    this.pipeRemainingEventCountList.add(elem);
  }

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

  public TPipeHeartbeatResp setPipeRemainingEventCountList(@org.apache.thrift.annotation.Nullable java.util.List pipeRemainingEventCountList) {
    this.pipeRemainingEventCountList = pipeRemainingEventCountList;
    return this;
  }

  public void unsetPipeRemainingEventCountList() {
    this.pipeRemainingEventCountList = null;
  }

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

  public void setPipeRemainingEventCountListIsSet(boolean value) {
    if (!value) {
      this.pipeRemainingEventCountList = null;
    }
  }

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

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

  public void addToPipeRemainingTimeList(double elem) {
    if (this.pipeRemainingTimeList == null) {
      this.pipeRemainingTimeList = new java.util.ArrayList();
    }
    this.pipeRemainingTimeList.add(elem);
  }

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

  public TPipeHeartbeatResp setPipeRemainingTimeList(@org.apache.thrift.annotation.Nullable java.util.List pipeRemainingTimeList) {
    this.pipeRemainingTimeList = pipeRemainingTimeList;
    return this;
  }

  public void unsetPipeRemainingTimeList() {
    this.pipeRemainingTimeList = null;
  }

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

  public void setPipeRemainingTimeListIsSet(boolean value) {
    if (!value) {
      this.pipeRemainingTimeList = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case PIPE_META_LIST:
      if (value == null) {
        unsetPipeMetaList();
      } else {
        setPipeMetaList((java.util.List)value);
      }
      break;

    case PIPE_COMPLETED_LIST:
      if (value == null) {
        unsetPipeCompletedList();
      } else {
        setPipeCompletedList((java.util.List)value);
      }
      break;

    case PIPE_REMAINING_EVENT_COUNT_LIST:
      if (value == null) {
        unsetPipeRemainingEventCountList();
      } else {
        setPipeRemainingEventCountList((java.util.List)value);
      }
      break;

    case PIPE_REMAINING_TIME_LIST:
      if (value == null) {
        unsetPipeRemainingTimeList();
      } else {
        setPipeRemainingTimeList((java.util.List)value);
      }
      break;

    }
  }

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

    case PIPE_COMPLETED_LIST:
      return getPipeCompletedList();

    case PIPE_REMAINING_EVENT_COUNT_LIST:
      return getPipeRemainingEventCountList();

    case PIPE_REMAINING_TIME_LIST:
      return getPipeRemainingTimeList();

    }
    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 PIPE_META_LIST:
      return isSetPipeMetaList();
    case PIPE_COMPLETED_LIST:
      return isSetPipeCompletedList();
    case PIPE_REMAINING_EVENT_COUNT_LIST:
      return isSetPipeRemainingEventCountList();
    case PIPE_REMAINING_TIME_LIST:
      return isSetPipeRemainingTimeList();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_pipeMetaList = true && this.isSetPipeMetaList();
    boolean that_present_pipeMetaList = true && that.isSetPipeMetaList();
    if (this_present_pipeMetaList || that_present_pipeMetaList) {
      if (!(this_present_pipeMetaList && that_present_pipeMetaList))
        return false;
      if (!this.pipeMetaList.equals(that.pipeMetaList))
        return false;
    }

    boolean this_present_pipeCompletedList = true && this.isSetPipeCompletedList();
    boolean that_present_pipeCompletedList = true && that.isSetPipeCompletedList();
    if (this_present_pipeCompletedList || that_present_pipeCompletedList) {
      if (!(this_present_pipeCompletedList && that_present_pipeCompletedList))
        return false;
      if (!this.pipeCompletedList.equals(that.pipeCompletedList))
        return false;
    }

    boolean this_present_pipeRemainingEventCountList = true && this.isSetPipeRemainingEventCountList();
    boolean that_present_pipeRemainingEventCountList = true && that.isSetPipeRemainingEventCountList();
    if (this_present_pipeRemainingEventCountList || that_present_pipeRemainingEventCountList) {
      if (!(this_present_pipeRemainingEventCountList && that_present_pipeRemainingEventCountList))
        return false;
      if (!this.pipeRemainingEventCountList.equals(that.pipeRemainingEventCountList))
        return false;
    }

    boolean this_present_pipeRemainingTimeList = true && this.isSetPipeRemainingTimeList();
    boolean that_present_pipeRemainingTimeList = true && that.isSetPipeRemainingTimeList();
    if (this_present_pipeRemainingTimeList || that_present_pipeRemainingTimeList) {
      if (!(this_present_pipeRemainingTimeList && that_present_pipeRemainingTimeList))
        return false;
      if (!this.pipeRemainingTimeList.equals(that.pipeRemainingTimeList))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetPipeMetaList()) ? 131071 : 524287);
    if (isSetPipeMetaList())
      hashCode = hashCode * 8191 + pipeMetaList.hashCode();

    hashCode = hashCode * 8191 + ((isSetPipeCompletedList()) ? 131071 : 524287);
    if (isSetPipeCompletedList())
      hashCode = hashCode * 8191 + pipeCompletedList.hashCode();

    hashCode = hashCode * 8191 + ((isSetPipeRemainingEventCountList()) ? 131071 : 524287);
    if (isSetPipeRemainingEventCountList())
      hashCode = hashCode * 8191 + pipeRemainingEventCountList.hashCode();

    hashCode = hashCode * 8191 + ((isSetPipeRemainingTimeList()) ? 131071 : 524287);
    if (isSetPipeRemainingTimeList())
      hashCode = hashCode * 8191 + pipeRemainingTimeList.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetPipeMetaList(), other.isSetPipeMetaList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPipeMetaList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pipeMetaList, other.pipeMetaList);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPipeCompletedList(), other.isSetPipeCompletedList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPipeCompletedList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pipeCompletedList, other.pipeCompletedList);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPipeRemainingEventCountList(), other.isSetPipeRemainingEventCountList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPipeRemainingEventCountList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pipeRemainingEventCountList, other.pipeRemainingEventCountList);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPipeRemainingTimeList(), other.isSetPipeRemainingTimeList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPipeRemainingTimeList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pipeRemainingTimeList, other.pipeRemainingTimeList);
      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("TPipeHeartbeatResp(");
    boolean first = true;

    sb.append("pipeMetaList:");
    if (this.pipeMetaList == null) {
      sb.append("null");
    } else {
      org.apache.thrift.TBaseHelper.toString(this.pipeMetaList, sb);
    }
    first = false;
    if (isSetPipeCompletedList()) {
      if (!first) sb.append(", ");
      sb.append("pipeCompletedList:");
      if (this.pipeCompletedList == null) {
        sb.append("null");
      } else {
        sb.append(this.pipeCompletedList);
      }
      first = false;
    }
    if (isSetPipeRemainingEventCountList()) {
      if (!first) sb.append(", ");
      sb.append("pipeRemainingEventCountList:");
      if (this.pipeRemainingEventCountList == null) {
        sb.append("null");
      } else {
        sb.append(this.pipeRemainingEventCountList);
      }
      first = false;
    }
    if (isSetPipeRemainingTimeList()) {
      if (!first) sb.append(", ");
      sb.append("pipeRemainingTimeList:");
      if (this.pipeRemainingTimeList == null) {
        sb.append("null");
      } else {
        sb.append(this.pipeRemainingTimeList);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (pipeMetaList == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'pipeMetaList' 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 {
      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 TPipeHeartbeatRespStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TPipeHeartbeatRespStandardScheme getScheme() {
      return new TPipeHeartbeatRespStandardScheme();
    }
  }

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

    public void read(org.apache.thrift.protocol.TProtocol iprot, TPipeHeartbeatResp 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: // PIPE_META_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list206 = iprot.readListBegin();
                struct.pipeMetaList = new java.util.ArrayList(_list206.size);
                @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem207;
                for (int _i208 = 0; _i208 < _list206.size; ++_i208)
                {
                  _elem207 = iprot.readBinary();
                  struct.pipeMetaList.add(_elem207);
                }
                iprot.readListEnd();
              }
              struct.setPipeMetaListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // PIPE_COMPLETED_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list209 = iprot.readListBegin();
                struct.pipeCompletedList = new java.util.ArrayList(_list209.size);
                boolean _elem210;
                for (int _i211 = 0; _i211 < _list209.size; ++_i211)
                {
                  _elem210 = iprot.readBool();
                  struct.pipeCompletedList.add(_elem210);
                }
                iprot.readListEnd();
              }
              struct.setPipeCompletedListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // PIPE_REMAINING_EVENT_COUNT_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list212 = iprot.readListBegin();
                struct.pipeRemainingEventCountList = new java.util.ArrayList(_list212.size);
                long _elem213;
                for (int _i214 = 0; _i214 < _list212.size; ++_i214)
                {
                  _elem213 = iprot.readI64();
                  struct.pipeRemainingEventCountList.add(_elem213);
                }
                iprot.readListEnd();
              }
              struct.setPipeRemainingEventCountListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // PIPE_REMAINING_TIME_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list215 = iprot.readListBegin();
                struct.pipeRemainingTimeList = new java.util.ArrayList(_list215.size);
                double _elem216;
                for (int _i217 = 0; _i217 < _list215.size; ++_i217)
                {
                  _elem216 = iprot.readDouble();
                  struct.pipeRemainingTimeList.add(_elem216);
                }
                iprot.readListEnd();
              }
              struct.setPipeRemainingTimeListIsSet(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, TPipeHeartbeatResp struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.pipeMetaList != null) {
        oprot.writeFieldBegin(PIPE_META_LIST_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.pipeMetaList.size()));
          for (java.nio.ByteBuffer _iter218 : struct.pipeMetaList)
          {
            oprot.writeBinary(_iter218);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.pipeCompletedList != null) {
        if (struct.isSetPipeCompletedList()) {
          oprot.writeFieldBegin(PIPE_COMPLETED_LIST_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, struct.pipeCompletedList.size()));
            for (boolean _iter219 : struct.pipeCompletedList)
            {
              oprot.writeBool(_iter219);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.pipeRemainingEventCountList != null) {
        if (struct.isSetPipeRemainingEventCountList()) {
          oprot.writeFieldBegin(PIPE_REMAINING_EVENT_COUNT_LIST_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.pipeRemainingEventCountList.size()));
            for (long _iter220 : struct.pipeRemainingEventCountList)
            {
              oprot.writeI64(_iter220);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.pipeRemainingTimeList != null) {
        if (struct.isSetPipeRemainingTimeList()) {
          oprot.writeFieldBegin(PIPE_REMAINING_TIME_LIST_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, struct.pipeRemainingTimeList.size()));
            for (double _iter221 : struct.pipeRemainingTimeList)
            {
              oprot.writeDouble(_iter221);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

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

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TPipeHeartbeatResp struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      {
        oprot.writeI32(struct.pipeMetaList.size());
        for (java.nio.ByteBuffer _iter222 : struct.pipeMetaList)
        {
          oprot.writeBinary(_iter222);
        }
      }
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetPipeCompletedList()) {
        optionals.set(0);
      }
      if (struct.isSetPipeRemainingEventCountList()) {
        optionals.set(1);
      }
      if (struct.isSetPipeRemainingTimeList()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetPipeCompletedList()) {
        {
          oprot.writeI32(struct.pipeCompletedList.size());
          for (boolean _iter223 : struct.pipeCompletedList)
          {
            oprot.writeBool(_iter223);
          }
        }
      }
      if (struct.isSetPipeRemainingEventCountList()) {
        {
          oprot.writeI32(struct.pipeRemainingEventCountList.size());
          for (long _iter224 : struct.pipeRemainingEventCountList)
          {
            oprot.writeI64(_iter224);
          }
        }
      }
      if (struct.isSetPipeRemainingTimeList()) {
        {
          oprot.writeI32(struct.pipeRemainingTimeList.size());
          for (double _iter225 : struct.pipeRemainingTimeList)
          {
            oprot.writeDouble(_iter225);
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TPipeHeartbeatResp struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      {
        org.apache.thrift.protocol.TList _list226 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
        struct.pipeMetaList = new java.util.ArrayList(_list226.size);
        @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem227;
        for (int _i228 = 0; _i228 < _list226.size; ++_i228)
        {
          _elem227 = iprot.readBinary();
          struct.pipeMetaList.add(_elem227);
        }
      }
      struct.setPipeMetaListIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        {
          org.apache.thrift.protocol.TList _list229 = iprot.readListBegin(org.apache.thrift.protocol.TType.BOOL);
          struct.pipeCompletedList = new java.util.ArrayList(_list229.size);
          boolean _elem230;
          for (int _i231 = 0; _i231 < _list229.size; ++_i231)
          {
            _elem230 = iprot.readBool();
            struct.pipeCompletedList.add(_elem230);
          }
        }
        struct.setPipeCompletedListIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.thrift.protocol.TList _list232 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
          struct.pipeRemainingEventCountList = new java.util.ArrayList(_list232.size);
          long _elem233;
          for (int _i234 = 0; _i234 < _list232.size; ++_i234)
          {
            _elem233 = iprot.readI64();
            struct.pipeRemainingEventCountList.add(_elem233);
          }
        }
        struct.setPipeRemainingEventCountListIsSet(true);
      }
      if (incoming.get(2)) {
        {
          org.apache.thrift.protocol.TList _list235 = iprot.readListBegin(org.apache.thrift.protocol.TType.DOUBLE);
          struct.pipeRemainingTimeList = new java.util.ArrayList(_list235.size);
          double _elem236;
          for (int _i237 = 0; _i237 < _list235.size; ++_i237)
          {
            _elem236 = iprot.readDouble();
            struct.pipeRemainingTimeList.add(_elem236);
          }
        }
        struct.setPipeRemainingTimeListIsSet(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