@Override public void read(org.apache.thrift.protocol.TProtocol prot, ODSRateOfChangeKeyInfo struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } if (incoming.get(1)) { struct.unixTime = iprot.readI64(); struct.setUnixTimeIsSet(true); } if (incoming.get(2)) { struct.allowable_time_diff = iprot.readI64(); struct.setAllowable_time_diffIsSet(true); } if (incoming.get(3)) { struct.value = iprot.readI64(); struct.setValueIsSet(true); } if (incoming.get(4)) { struct.min_rate = iprot.readI64(); struct.setMin_rateIsSet(true); } if (incoming.get(5)) { struct.max_rate = iprot.readI64(); struct.setMax_rateIsSet(true); } }
public void read(org.apache.thrift.protocol.TProtocol iprot, ODSRateOfChangeKeyInfo 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: // KEY if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.key = iprot.readString(); struct.setKeyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // UNIX_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.unixTime = iprot.readI64(); struct.setUnixTimeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ALLOWABLE_TIME_DIFF if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.allowable_time_diff = iprot.readI64(); struct.setAllowable_time_diffIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // VALUE if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.value = iprot.readI64(); struct.setValueIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // MIN_RATE if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.min_rate = iprot.readI64(); struct.setMin_rateIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // MAX_RATE if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.max_rate = iprot.readI64(); struct.setMax_rateIsSet(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(); }