private static class EndpointTupleScheme extends TupleScheme<Endpoint> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Endpoint struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetIpv4()) {
optionals.set(0);
}
if (struct.isSetPort()) {
optionals.set(1);
}
if (struct.isSetService_name()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetIpv4()) {
oprot.writeI32(struct.ipv4);
}
if (struct.isSetPort()) {
oprot.writeI16(struct.port);
}
if (struct.isSetService_name()) {
oprot.writeString(struct.service_name);
}
}