in library/src/main/java/com/theguardian/bridget/thrift/VideoSlot.java [563:615]
public void read(org.apache.thrift.protocol.TProtocol iprot, VideoSlot 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: // RECT
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.rect = new Rect();
struct.rect.read(iprot);
struct.setRectIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // 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 3: // POSTER_URL
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.posterUrl = iprot.readString();
struct.setPosterUrlIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // DURATION
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.duration = iprot.readI32();
struct.setDurationIsSet(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();
}