private static class TypeTupleScheme extends TupleScheme<Type> {
@Override
public void write(com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TProtocol prot, Type struct) throws com.facebook.presto.hive.shaded.org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetName()) {
optionals.set(0);
}
if (struct.isSetType1()) {
optionals.set(1);
}
if (struct.isSetType2()) {
optionals.set(2);
}
if (struct.isSetFields()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetName()) {
oprot.writeString(struct.name);
}
if (struct.isSetType1()) {
oprot.writeString(struct.type1);
}
if (struct.isSetType2()) {
oprot.writeString(struct.type2);
}
if (struct.isSetFields()) {
{
oprot.writeI32(struct.fields.size());
for (FieldSchema _iter4 : struct.fields)
{
_iter4.write(oprot);
}
}