in library/src/main/java/com/theguardian/bridget/thrift/Metrics.java [580:618]
public void read(org.apache.thrift.protocol.TProtocol iprot, sendMetrics_args 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: // METRICS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list76 = iprot.readListBegin();
struct.metrics = new java.util.ArrayList<Metric>(_list76.size);
@org.apache.thrift.annotation.Nullable Metric _elem77;
for (int _i78 = 0; _i78 < _list76.size; ++_i78)
{
_elem77 = new Metric();
_elem77.read(iprot);
struct.metrics.add(_elem77);
}
iprot.readListEnd();
}
struct.setMetricsIsSet(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();
}