@Override public void read(org.apache.thrift.protocol.TProtocol prot, CardStatistics struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.iTotalPaymentsLastMonth = iprot.readDouble(); struct.setITotalPaymentsLastMonthIsSet(true); struct.iTotalPaymentsLastThreeMonths = iprot.readDouble(); struct.setITotalPaymentsLastThreeMonthsIsSet(true); }
public void read(org.apache.thrift.protocol.TProtocol iprot, CardStatistics 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: // I_TOTAL_PAYMENTS_LAST_MONTH if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.iTotalPaymentsLastMonth = iprot.readDouble(); struct.setITotalPaymentsLastMonthIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // I_TOTAL_PAYMENTS_LAST_THREE_MONTHS if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.iTotalPaymentsLastThreeMonths = iprot.readDouble(); struct.setITotalPaymentsLastThreeMonthsIsSet(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 if (!struct.isSetITotalPaymentsLastMonth()) { throw new org.apache.thrift.protocol.TProtocolException( "Required field 'iTotalPaymentsLastMonth' was not found in serialized data! Struct: " + toString()); } if (!struct.isSetITotalPaymentsLastThreeMonths()) { throw new org.apache.thrift.protocol.TProtocolException( "Required field 'iTotalPaymentsLastThreeMonths' was not found in serialized data! Struct: " + toString()); } struct.validate(); }