public void write(org.apache.thrift.protocol.TProtocol oprot, MsgIdList struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.msgIdList != null) { oprot.writeFieldBegin(MSG_ID_LIST_FIELD_DESC); { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.I64, struct.msgIdList.size())); for (long _iter11 : struct.msgIdList) { oprot.writeI64(_iter11); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void read(org.apache.thrift.protocol.TProtocol iprot, MsgIdList 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: // MSG_ID_LIST if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); struct.msgIdList = new ArrayList<Long>(_list8.size); for (int _i9 = 0; _i9 < _list8.size; ++_i9) { long _elem10; _elem10 = iprot.readI64(); struct.msgIdList.add(_elem10); } iprot.readListEnd(); } struct.setMsgIdListIsSet(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(); }