in AsynchronousRatchetingTree/src/main/java/com/facebook/research/asynchronousratchetingtree/art/message/thrift/SetupMessageStruct.java [659:741]
public void read(org.apache.thrift.protocol.TProtocol iprot, SetupMessageStruct 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: // LEAF_NUM
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.leafNum = iprot.readI32();
struct.setLeafNumIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // IDENTITIES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.identities = new java.util.ArrayList<java.lang.String>(_list0.size);
java.lang.String _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = iprot.readString();
struct.identities.add(_elem1);
}
iprot.readListEnd();
}
struct.setIdentitiesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // EPHEMERAL_KEYS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map3 = iprot.readMapBegin();
struct.ephemeralKeys = new java.util.HashMap<java.lang.Integer,java.lang.String>(2*_map3.size);
int _key4;
java.lang.String _val5;
for (int _i6 = 0; _i6 < _map3.size; ++_i6)
{
_key4 = iprot.readI32();
_val5 = iprot.readString();
struct.ephemeralKeys.put(_key4, _val5);
}
iprot.readMapEnd();
}
struct.setEphemeralKeysIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // KEY_EXCHANGE_KEY
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.keyExchangeKey = iprot.readBinary();
struct.setKeyExchangeKeyIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // TREE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tree = new NodeStruct();
struct.tree.read(iprot);
struct.setTreeIsSet(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();
}