in src-gen/com/facebook/buck/artifact_cache/thrift/BuckCacheRequest.java [1262:1397]
public void read(org.apache.thrift.protocol.TProtocol iprot, BuckCacheRequest 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: // TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.type = com.facebook.buck.artifact_cache.thrift.BuckCacheRequestType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // BUCK_BUILD_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.buckBuildId = iprot.readString();
struct.setBuckBuildIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 100: // PAYLOADS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list106 = iprot.readListBegin();
struct.payloads = new java.util.ArrayList<PayloadInfo>(_list106.size);
@org.apache.thrift.annotation.Nullable PayloadInfo _elem107;
for (int _i108 = 0; _i108 < _list106.size; ++_i108)
{
_elem107 = new PayloadInfo();
_elem107.read(iprot);
struct.payloads.add(_elem107);
}
iprot.readListEnd();
}
struct.setPayloadsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 101: // FETCH_REQUEST
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.fetchRequest = new BuckCacheFetchRequest();
struct.fetchRequest.read(iprot);
struct.setFetchRequestIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 102: // STORE_REQUEST
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.storeRequest = new BuckCacheStoreRequest();
struct.storeRequest.read(iprot);
struct.setStoreRequestIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 103: // MULTI_FETCH_REQUEST
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.multiFetchRequest = new BuckCacheMultiFetchRequest();
struct.multiFetchRequest.read(iprot);
struct.setMultiFetchRequestIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 105: // DELETE_REQUEST
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.deleteRequest = new BuckCacheDeleteRequest();
struct.deleteRequest.read(iprot);
struct.setDeleteRequestIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 107: // MULTI_CONTAINS_REQUEST
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.multiContainsRequest = new BuckCacheMultiContainsRequest();
struct.multiContainsRequest.read(iprot);
struct.setMultiContainsRequestIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 108: // MANIFEST_APPEND_REQUEST
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.manifestAppendRequest = new ManifestAppendRequest();
struct.manifestAppendRequest.read(iprot);
struct.setManifestAppendRequestIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 109: // MANIFEST_FETCH_REQUEST
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.manifestFetchRequest = new ManifestFetchRequest();
struct.manifestFetchRequest.read(iprot);
struct.setManifestFetchRequestIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 110: // MANIFEST_DELETE_REQUEST
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.manifestDeleteRequest = new ManifestDeleteRequest();
struct.manifestDeleteRequest.read(iprot);
struct.setManifestDeleteRequestIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 111: // MANIFEST_SET_REQUEST
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.manifestSetRequest = new ManifestSetRequest();
struct.manifestSetRequest.read(iprot);
struct.setManifestSetRequestIsSet(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();
}