public void read(org.apache.thrift.protocol.TProtocol iprot, NimbusSummary 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: // HOST if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.host = iprot.readString(); struct.set_host_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // PORT if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.port = iprot.readI32(); struct.set_port_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // UPTIME_SECS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.uptime_secs = iprot.readI32(); struct.set_uptime_secs_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // IS_LEADER if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isLeader = iprot.readBool(); struct.set_isLeader_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // VERSION if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.version = iprot.readString(); struct.set_version_isSet(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(); struct.validate(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, NimbusSummary struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.host = iprot.readString(); struct.set_host_isSet(true); struct.port = iprot.readI32(); struct.set_port_isSet(true); struct.uptime_secs = iprot.readI32(); struct.set_uptime_secs_isSet(true); struct.isLeader = iprot.readBool(); struct.set_isLeader_isSet(true); struct.version = iprot.readString(); struct.set_version_isSet(true); }