in library/src/main/java/com/theguardian/bridget/thrift/VideoEvent.java [422:457]
public void read(org.apache.thrift.protocol.TProtocol iprot, VideoEvent 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: // VIDEO_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.videoId = iprot.readString();
struct.setVideoIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // EVENT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.event = com.theguardian.bridget.thrift.MediaEvent.findByValue(iprot.readI32());
struct.setEventIsSet(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();
}