in src-gen/com/facebook/buck/artifact_cache/thrift/ArtifactMetadata.java [1222:1360]
public void read(org.apache.thrift.protocol.TProtocol iprot, ArtifactMetadata 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: // RULE_KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.ruleKeys = new java.util.ArrayList<RuleKey>(_list0.size);
@org.apache.thrift.annotation.Nullable RuleKey _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = new RuleKey();
_elem1.read(iprot);
struct.ruleKeys.add(_elem1);
}
iprot.readListEnd();
}
struct.setRuleKeysIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // METADATA
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map3 = iprot.readMapBegin();
struct.metadata = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map3.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key4;
@org.apache.thrift.annotation.Nullable java.lang.String _val5;
for (int _i6 = 0; _i6 < _map3.size; ++_i6)
{
_key4 = iprot.readString();
_val5 = iprot.readString();
struct.metadata.put(_key4, _val5);
}
iprot.readMapEnd();
}
struct.setMetadataIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // BUILD_TARGET
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.buildTarget = iprot.readString();
struct.setBuildTargetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // REPOSITORY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.repository = iprot.readString();
struct.setRepositoryIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // ARTIFACT_PAYLOAD_CRC32
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.artifactPayloadCrc32 = iprot.readString();
struct.setArtifactPayloadCrc32IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // SCHEDULE_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.scheduleType = iprot.readString();
struct.setScheduleTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // ARTIFACT_PAYLOAD_MD5
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.artifactPayloadMd5 = iprot.readString();
struct.setArtifactPayloadMd5IsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // PRODUCER_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.producerId = iprot.readString();
struct.setProducerIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // BUILD_TIME_MS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.buildTimeMs = iprot.readI64();
struct.setBuildTimeMsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // PRODUCER_HOSTNAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.producerHostname = iprot.readString();
struct.setProducerHostnameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // SIZE_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.sizeBytes = iprot.readI64();
struct.setSizeBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // CONFIGURATION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.configuration = iprot.readString();
struct.setConfigurationIsSet(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();
}