@Override public void read(org.apache.thrift.protocol.TProtocol prot, ErrorModel struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.errorId = iprot.readString(); struct.setErrorIdIsSet(true); BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.creationTime = iprot.readI64(); struct.setCreationTimeIsSet(true); } if (incoming.get(1)) { struct.actualErrorMessage = iprot.readString(); struct.setActualErrorMessageIsSet(true); } if (incoming.get(2)) { struct.userFriendlyMessage = iprot.readString(); struct.setUserFriendlyMessageIsSet(true); } if (incoming.get(3)) { struct.transientOrPersistent = iprot.readBool(); struct.setTransientOrPersistentIsSet(true); } if (incoming.get(4)) { { org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.rootCauseErrorIdList = new ArrayList<String>(_list5.size); String _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { _elem6 = iprot.readString(); struct.rootCauseErrorIdList.add(_elem6); } } struct.setRootCauseErrorIdListIsSet(true); } }
public void read(org.apache.thrift.protocol.TProtocol iprot, ErrorModel 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: // ERROR_ID if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.errorId = iprot.readString(); struct.setErrorIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // CREATION_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.creationTime = iprot.readI64(); struct.setCreationTimeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // ACTUAL_ERROR_MESSAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.actualErrorMessage = iprot.readString(); struct.setActualErrorMessageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // USER_FRIENDLY_MESSAGE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.userFriendlyMessage = iprot.readString(); struct.setUserFriendlyMessageIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // TRANSIENT_OR_PERSISTENT if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.transientOrPersistent = iprot.readBool(); struct.setTransientOrPersistentIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // ROOT_CAUSE_ERROR_ID_LIST if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); struct.rootCauseErrorIdList = new ArrayList<String>(_list0.size); String _elem1; for (int _i2 = 0; _i2 < _list0.size; ++_i2) { _elem1 = iprot.readString(); struct.rootCauseErrorIdList.add(_elem1); } iprot.readListEnd(); } struct.setRootCauseErrorIdListIsSet(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(); }