/**
 * Autogenerated by Thrift Compiler (0.9.1)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.curator.generated;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CuratorService {

  public interface Iface {

    public OptionalLockProjection acquireLock(CuratorProjection projection, String path, int maxWaitMs) throws CuratorException, org.apache.thrift.TException;

    public List<LeaseProjection> acquireSemaphore(CuratorProjection projection, String path, int acquireQty, int maxWaitMs, int maxLeases) throws CuratorException, org.apache.thrift.TException;

    public void closeCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException;

    public boolean closeGenericProjection(CuratorProjection projection, String id) throws CuratorException, org.apache.thrift.TException;

    public OptionalPath createNode(CuratorProjection projection, CreateSpec spec) throws CuratorException, org.apache.thrift.TException;

    public void deleteNode(CuratorProjection projection, DeleteSpec spec) throws CuratorException, org.apache.thrift.TException;

    public OptionalStat exists(CuratorProjection projection, ExistsSpec spec) throws CuratorException, org.apache.thrift.TException;

    public OptionalChildrenList getChildren(CuratorProjection projection, GetChildrenSpec spec) throws CuratorException, org.apache.thrift.TException;

    public OptionalData getData(CuratorProjection projection, GetDataSpec spec) throws CuratorException, org.apache.thrift.TException;

    public List<Participant> getLeaderParticipants(CuratorProjection projection, LeaderProjection leaderProjection) throws CuratorException, org.apache.thrift.TException;

    public ChildData getNodeCacheData(CuratorProjection projection, NodeCacheProjection cacheProjection) throws CuratorException, org.apache.thrift.TException;

    public List<ChildData> getPathChildrenCacheData(CuratorProjection projection, PathChildrenCacheProjection cacheProjection) throws CuratorException, org.apache.thrift.TException;

    public ChildData getPathChildrenCacheDataForPath(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path) throws CuratorException, org.apache.thrift.TException;

    public boolean isLeader(CuratorProjection projection, LeaderProjection leaderProjection) throws CuratorException, org.apache.thrift.TException;

    public CuratorProjection newCuratorProjection(String connectionName) throws CuratorException, org.apache.thrift.TException;

    public void pingCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException;

    public OptionalStat setData(CuratorProjection projection, SetDataSpec spec) throws CuratorException, org.apache.thrift.TException;

    public LeaderResult startLeaderSelector(CuratorProjection projection, String path, String participantId, int waitForLeadershipMs) throws CuratorException, org.apache.thrift.TException;

    public NodeCacheProjection startNodeCache(CuratorProjection projection, String path, boolean dataIsCompressed, boolean buildInitial) throws CuratorException, org.apache.thrift.TException;

    public PathChildrenCacheProjection startPathChildrenCache(CuratorProjection projection, String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode) throws CuratorException, org.apache.thrift.TException;

    public PersistentEphemeralNodeProjection startPersistentEphemeralNode(CuratorProjection projection, String path, ByteBuffer data, PersistentEphemeralNodeMode mode) throws CuratorException, org.apache.thrift.TException;

    public void sync(CuratorProjection projection, String path, String asyncContext) throws CuratorException, org.apache.thrift.TException;

  }

  public interface AsyncIface {

    public void acquireLock(CuratorProjection projection, String path, int maxWaitMs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void acquireSemaphore(CuratorProjection projection, String path, int acquireQty, int maxWaitMs, int maxLeases, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void closeCuratorProjection(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void closeGenericProjection(CuratorProjection projection, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void createNode(CuratorProjection projection, CreateSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void deleteNode(CuratorProjection projection, DeleteSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void exists(CuratorProjection projection, ExistsSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getChildren(CuratorProjection projection, GetChildrenSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getData(CuratorProjection projection, GetDataSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getLeaderParticipants(CuratorProjection projection, LeaderProjection leaderProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getNodeCacheData(CuratorProjection projection, NodeCacheProjection cacheProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getPathChildrenCacheData(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getPathChildrenCacheDataForPath(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void isLeader(CuratorProjection projection, LeaderProjection leaderProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void newCuratorProjection(String connectionName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void pingCuratorProjection(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void setData(CuratorProjection projection, SetDataSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void startLeaderSelector(CuratorProjection projection, String path, String participantId, int waitForLeadershipMs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void startNodeCache(CuratorProjection projection, String path, boolean dataIsCompressed, boolean buildInitial, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void startPathChildrenCache(CuratorProjection projection, String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void startPersistentEphemeralNode(CuratorProjection projection, String path, ByteBuffer data, PersistentEphemeralNodeMode mode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void sync(CuratorProjection projection, String path, String asyncContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

  }

  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
      public Factory() {}
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
        return new Client(prot);
      }
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
        return new Client(iprot, oprot);
      }
    }

    public Client(org.apache.thrift.protocol.TProtocol prot)
    {
      super(prot, prot);
    }

    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
      super(iprot, oprot);
    }

    public OptionalLockProjection acquireLock(CuratorProjection projection, String path, int maxWaitMs) throws CuratorException, org.apache.thrift.TException
    {
      send_acquireLock(projection, path, maxWaitMs);
      return recv_acquireLock();
    }

    public void send_acquireLock(CuratorProjection projection, String path, int maxWaitMs) throws org.apache.thrift.TException
    {
      acquireLock_args args = new acquireLock_args();
      args.setProjection(projection);
      args.setPath(path);
      args.setMaxWaitMs(maxWaitMs);
      sendBase("acquireLock", args);
    }

    public OptionalLockProjection recv_acquireLock() throws CuratorException, org.apache.thrift.TException
    {
      acquireLock_result result = new acquireLock_result();
      receiveBase(result, "acquireLock");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "acquireLock failed: unknown result");
    }

    public List<LeaseProjection> acquireSemaphore(CuratorProjection projection, String path, int acquireQty, int maxWaitMs, int maxLeases) throws CuratorException, org.apache.thrift.TException
    {
      send_acquireSemaphore(projection, path, acquireQty, maxWaitMs, maxLeases);
      return recv_acquireSemaphore();
    }

    public void send_acquireSemaphore(CuratorProjection projection, String path, int acquireQty, int maxWaitMs, int maxLeases) throws org.apache.thrift.TException
    {
      acquireSemaphore_args args = new acquireSemaphore_args();
      args.setProjection(projection);
      args.setPath(path);
      args.setAcquireQty(acquireQty);
      args.setMaxWaitMs(maxWaitMs);
      args.setMaxLeases(maxLeases);
      sendBase("acquireSemaphore", args);
    }

    public List<LeaseProjection> recv_acquireSemaphore() throws CuratorException, org.apache.thrift.TException
    {
      acquireSemaphore_result result = new acquireSemaphore_result();
      receiveBase(result, "acquireSemaphore");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "acquireSemaphore failed: unknown result");
    }

    public void closeCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException
    {
      send_closeCuratorProjection(projection);
      recv_closeCuratorProjection();
    }

    public void send_closeCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException
    {
      closeCuratorProjection_args args = new closeCuratorProjection_args();
      args.setProjection(projection);
      sendBase("closeCuratorProjection", args);
    }

    public void recv_closeCuratorProjection() throws org.apache.thrift.TException
    {
      closeCuratorProjection_result result = new closeCuratorProjection_result();
      receiveBase(result, "closeCuratorProjection");
      return;
    }

    public boolean closeGenericProjection(CuratorProjection projection, String id) throws CuratorException, org.apache.thrift.TException
    {
      send_closeGenericProjection(projection, id);
      return recv_closeGenericProjection();
    }

    public void send_closeGenericProjection(CuratorProjection projection, String id) throws org.apache.thrift.TException
    {
      closeGenericProjection_args args = new closeGenericProjection_args();
      args.setProjection(projection);
      args.setId(id);
      sendBase("closeGenericProjection", args);
    }

    public boolean recv_closeGenericProjection() throws CuratorException, org.apache.thrift.TException
    {
      closeGenericProjection_result result = new closeGenericProjection_result();
      receiveBase(result, "closeGenericProjection");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closeGenericProjection failed: unknown result");
    }

    public OptionalPath createNode(CuratorProjection projection, CreateSpec spec) throws CuratorException, org.apache.thrift.TException
    {
      send_createNode(projection, spec);
      return recv_createNode();
    }

    public void send_createNode(CuratorProjection projection, CreateSpec spec) throws org.apache.thrift.TException
    {
      createNode_args args = new createNode_args();
      args.setProjection(projection);
      args.setSpec(spec);
      sendBase("createNode", args);
    }

    public OptionalPath recv_createNode() throws CuratorException, org.apache.thrift.TException
    {
      createNode_result result = new createNode_result();
      receiveBase(result, "createNode");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createNode failed: unknown result");
    }

    public void deleteNode(CuratorProjection projection, DeleteSpec spec) throws CuratorException, org.apache.thrift.TException
    {
      send_deleteNode(projection, spec);
      recv_deleteNode();
    }

    public void send_deleteNode(CuratorProjection projection, DeleteSpec spec) throws org.apache.thrift.TException
    {
      deleteNode_args args = new deleteNode_args();
      args.setProjection(projection);
      args.setSpec(spec);
      sendBase("deleteNode", args);
    }

    public void recv_deleteNode() throws CuratorException, org.apache.thrift.TException
    {
      deleteNode_result result = new deleteNode_result();
      receiveBase(result, "deleteNode");
      if (result.ex1 != null) {
        throw result.ex1;
      }
      return;
    }

    public OptionalStat exists(CuratorProjection projection, ExistsSpec spec) throws CuratorException, org.apache.thrift.TException
    {
      send_exists(projection, spec);
      return recv_exists();
    }

    public void send_exists(CuratorProjection projection, ExistsSpec spec) throws org.apache.thrift.TException
    {
      exists_args args = new exists_args();
      args.setProjection(projection);
      args.setSpec(spec);
      sendBase("exists", args);
    }

    public OptionalStat recv_exists() throws CuratorException, org.apache.thrift.TException
    {
      exists_result result = new exists_result();
      receiveBase(result, "exists");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "exists failed: unknown result");
    }

    public OptionalChildrenList getChildren(CuratorProjection projection, GetChildrenSpec spec) throws CuratorException, org.apache.thrift.TException
    {
      send_getChildren(projection, spec);
      return recv_getChildren();
    }

    public void send_getChildren(CuratorProjection projection, GetChildrenSpec spec) throws org.apache.thrift.TException
    {
      getChildren_args args = new getChildren_args();
      args.setProjection(projection);
      args.setSpec(spec);
      sendBase("getChildren", args);
    }

    public OptionalChildrenList recv_getChildren() throws CuratorException, org.apache.thrift.TException
    {
      getChildren_result result = new getChildren_result();
      receiveBase(result, "getChildren");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getChildren failed: unknown result");
    }

    public OptionalData getData(CuratorProjection projection, GetDataSpec spec) throws CuratorException, org.apache.thrift.TException
    {
      send_getData(projection, spec);
      return recv_getData();
    }

    public void send_getData(CuratorProjection projection, GetDataSpec spec) throws org.apache.thrift.TException
    {
      getData_args args = new getData_args();
      args.setProjection(projection);
      args.setSpec(spec);
      sendBase("getData", args);
    }

    public OptionalData recv_getData() throws CuratorException, org.apache.thrift.TException
    {
      getData_result result = new getData_result();
      receiveBase(result, "getData");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getData failed: unknown result");
    }

    public List<Participant> getLeaderParticipants(CuratorProjection projection, LeaderProjection leaderProjection) throws CuratorException, org.apache.thrift.TException
    {
      send_getLeaderParticipants(projection, leaderProjection);
      return recv_getLeaderParticipants();
    }

    public void send_getLeaderParticipants(CuratorProjection projection, LeaderProjection leaderProjection) throws org.apache.thrift.TException
    {
      getLeaderParticipants_args args = new getLeaderParticipants_args();
      args.setProjection(projection);
      args.setLeaderProjection(leaderProjection);
      sendBase("getLeaderParticipants", args);
    }

    public List<Participant> recv_getLeaderParticipants() throws CuratorException, org.apache.thrift.TException
    {
      getLeaderParticipants_result result = new getLeaderParticipants_result();
      receiveBase(result, "getLeaderParticipants");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLeaderParticipants failed: unknown result");
    }

    public ChildData getNodeCacheData(CuratorProjection projection, NodeCacheProjection cacheProjection) throws CuratorException, org.apache.thrift.TException
    {
      send_getNodeCacheData(projection, cacheProjection);
      return recv_getNodeCacheData();
    }

    public void send_getNodeCacheData(CuratorProjection projection, NodeCacheProjection cacheProjection) throws org.apache.thrift.TException
    {
      getNodeCacheData_args args = new getNodeCacheData_args();
      args.setProjection(projection);
      args.setCacheProjection(cacheProjection);
      sendBase("getNodeCacheData", args);
    }

    public ChildData recv_getNodeCacheData() throws CuratorException, org.apache.thrift.TException
    {
      getNodeCacheData_result result = new getNodeCacheData_result();
      receiveBase(result, "getNodeCacheData");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNodeCacheData failed: unknown result");
    }

    public List<ChildData> getPathChildrenCacheData(CuratorProjection projection, PathChildrenCacheProjection cacheProjection) throws CuratorException, org.apache.thrift.TException
    {
      send_getPathChildrenCacheData(projection, cacheProjection);
      return recv_getPathChildrenCacheData();
    }

    public void send_getPathChildrenCacheData(CuratorProjection projection, PathChildrenCacheProjection cacheProjection) throws org.apache.thrift.TException
    {
      getPathChildrenCacheData_args args = new getPathChildrenCacheData_args();
      args.setProjection(projection);
      args.setCacheProjection(cacheProjection);
      sendBase("getPathChildrenCacheData", args);
    }

    public List<ChildData> recv_getPathChildrenCacheData() throws CuratorException, org.apache.thrift.TException
    {
      getPathChildrenCacheData_result result = new getPathChildrenCacheData_result();
      receiveBase(result, "getPathChildrenCacheData");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPathChildrenCacheData failed: unknown result");
    }

    public ChildData getPathChildrenCacheDataForPath(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path) throws CuratorException, org.apache.thrift.TException
    {
      send_getPathChildrenCacheDataForPath(projection, cacheProjection, path);
      return recv_getPathChildrenCacheDataForPath();
    }

    public void send_getPathChildrenCacheDataForPath(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path) throws org.apache.thrift.TException
    {
      getPathChildrenCacheDataForPath_args args = new getPathChildrenCacheDataForPath_args();
      args.setProjection(projection);
      args.setCacheProjection(cacheProjection);
      args.setPath(path);
      sendBase("getPathChildrenCacheDataForPath", args);
    }

    public ChildData recv_getPathChildrenCacheDataForPath() throws CuratorException, org.apache.thrift.TException
    {
      getPathChildrenCacheDataForPath_result result = new getPathChildrenCacheDataForPath_result();
      receiveBase(result, "getPathChildrenCacheDataForPath");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPathChildrenCacheDataForPath failed: unknown result");
    }

    public boolean isLeader(CuratorProjection projection, LeaderProjection leaderProjection) throws CuratorException, org.apache.thrift.TException
    {
      send_isLeader(projection, leaderProjection);
      return recv_isLeader();
    }

    public void send_isLeader(CuratorProjection projection, LeaderProjection leaderProjection) throws org.apache.thrift.TException
    {
      isLeader_args args = new isLeader_args();
      args.setProjection(projection);
      args.setLeaderProjection(leaderProjection);
      sendBase("isLeader", args);
    }

    public boolean recv_isLeader() throws CuratorException, org.apache.thrift.TException
    {
      isLeader_result result = new isLeader_result();
      receiveBase(result, "isLeader");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isLeader failed: unknown result");
    }

    public CuratorProjection newCuratorProjection(String connectionName) throws CuratorException, org.apache.thrift.TException
    {
      send_newCuratorProjection(connectionName);
      return recv_newCuratorProjection();
    }

    public void send_newCuratorProjection(String connectionName) throws org.apache.thrift.TException
    {
      newCuratorProjection_args args = new newCuratorProjection_args();
      args.setConnectionName(connectionName);
      sendBase("newCuratorProjection", args);
    }

    public CuratorProjection recv_newCuratorProjection() throws CuratorException, org.apache.thrift.TException
    {
      newCuratorProjection_result result = new newCuratorProjection_result();
      receiveBase(result, "newCuratorProjection");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "newCuratorProjection failed: unknown result");
    }

    public void pingCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException
    {
      send_pingCuratorProjection(projection);
    }

    public void send_pingCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException
    {
      pingCuratorProjection_args args = new pingCuratorProjection_args();
      args.setProjection(projection);
      sendBase("pingCuratorProjection", args);
    }

    public OptionalStat setData(CuratorProjection projection, SetDataSpec spec) throws CuratorException, org.apache.thrift.TException
    {
      send_setData(projection, spec);
      return recv_setData();
    }

    public void send_setData(CuratorProjection projection, SetDataSpec spec) throws org.apache.thrift.TException
    {
      setData_args args = new setData_args();
      args.setProjection(projection);
      args.setSpec(spec);
      sendBase("setData", args);
    }

    public OptionalStat recv_setData() throws CuratorException, org.apache.thrift.TException
    {
      setData_result result = new setData_result();
      receiveBase(result, "setData");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setData failed: unknown result");
    }

    public LeaderResult startLeaderSelector(CuratorProjection projection, String path, String participantId, int waitForLeadershipMs) throws CuratorException, org.apache.thrift.TException
    {
      send_startLeaderSelector(projection, path, participantId, waitForLeadershipMs);
      return recv_startLeaderSelector();
    }

    public void send_startLeaderSelector(CuratorProjection projection, String path, String participantId, int waitForLeadershipMs) throws org.apache.thrift.TException
    {
      startLeaderSelector_args args = new startLeaderSelector_args();
      args.setProjection(projection);
      args.setPath(path);
      args.setParticipantId(participantId);
      args.setWaitForLeadershipMs(waitForLeadershipMs);
      sendBase("startLeaderSelector", args);
    }

    public LeaderResult recv_startLeaderSelector() throws CuratorException, org.apache.thrift.TException
    {
      startLeaderSelector_result result = new startLeaderSelector_result();
      receiveBase(result, "startLeaderSelector");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startLeaderSelector failed: unknown result");
    }

    public NodeCacheProjection startNodeCache(CuratorProjection projection, String path, boolean dataIsCompressed, boolean buildInitial) throws CuratorException, org.apache.thrift.TException
    {
      send_startNodeCache(projection, path, dataIsCompressed, buildInitial);
      return recv_startNodeCache();
    }

    public void send_startNodeCache(CuratorProjection projection, String path, boolean dataIsCompressed, boolean buildInitial) throws org.apache.thrift.TException
    {
      startNodeCache_args args = new startNodeCache_args();
      args.setProjection(projection);
      args.setPath(path);
      args.setDataIsCompressed(dataIsCompressed);
      args.setBuildInitial(buildInitial);
      sendBase("startNodeCache", args);
    }

    public NodeCacheProjection recv_startNodeCache() throws CuratorException, org.apache.thrift.TException
    {
      startNodeCache_result result = new startNodeCache_result();
      receiveBase(result, "startNodeCache");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startNodeCache failed: unknown result");
    }

    public PathChildrenCacheProjection startPathChildrenCache(CuratorProjection projection, String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode) throws CuratorException, org.apache.thrift.TException
    {
      send_startPathChildrenCache(projection, path, cacheData, dataIsCompressed, startMode);
      return recv_startPathChildrenCache();
    }

    public void send_startPathChildrenCache(CuratorProjection projection, String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode) throws org.apache.thrift.TException
    {
      startPathChildrenCache_args args = new startPathChildrenCache_args();
      args.setProjection(projection);
      args.setPath(path);
      args.setCacheData(cacheData);
      args.setDataIsCompressed(dataIsCompressed);
      args.setStartMode(startMode);
      sendBase("startPathChildrenCache", args);
    }

    public PathChildrenCacheProjection recv_startPathChildrenCache() throws CuratorException, org.apache.thrift.TException
    {
      startPathChildrenCache_result result = new startPathChildrenCache_result();
      receiveBase(result, "startPathChildrenCache");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPathChildrenCache failed: unknown result");
    }

    public PersistentEphemeralNodeProjection startPersistentEphemeralNode(CuratorProjection projection, String path, ByteBuffer data, PersistentEphemeralNodeMode mode) throws CuratorException, org.apache.thrift.TException
    {
      send_startPersistentEphemeralNode(projection, path, data, mode);
      return recv_startPersistentEphemeralNode();
    }

    public void send_startPersistentEphemeralNode(CuratorProjection projection, String path, ByteBuffer data, PersistentEphemeralNodeMode mode) throws org.apache.thrift.TException
    {
      startPersistentEphemeralNode_args args = new startPersistentEphemeralNode_args();
      args.setProjection(projection);
      args.setPath(path);
      args.setData(data);
      args.setMode(mode);
      sendBase("startPersistentEphemeralNode", args);
    }

    public PersistentEphemeralNodeProjection recv_startPersistentEphemeralNode() throws CuratorException, org.apache.thrift.TException
    {
      startPersistentEphemeralNode_result result = new startPersistentEphemeralNode_result();
      receiveBase(result, "startPersistentEphemeralNode");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPersistentEphemeralNode failed: unknown result");
    }

    public void sync(CuratorProjection projection, String path, String asyncContext) throws CuratorException, org.apache.thrift.TException
    {
      send_sync(projection, path, asyncContext);
      recv_sync();
    }

    public void send_sync(CuratorProjection projection, String path, String asyncContext) throws org.apache.thrift.TException
    {
      sync_args args = new sync_args();
      args.setProjection(projection);
      args.setPath(path);
      args.setAsyncContext(asyncContext);
      sendBase("sync", args);
    }

    public void recv_sync() throws CuratorException, org.apache.thrift.TException
    {
      sync_result result = new sync_result();
      receiveBase(result, "sync");
      if (result.ex1 != null) {
        throw result.ex1;
      }
      return;
    }

  }
  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
      private org.apache.thrift.async.TAsyncClientManager clientManager;
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
        this.clientManager = clientManager;
        this.protocolFactory = protocolFactory;
      }
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
        return new AsyncClient(protocolFactory, clientManager, transport);
      }
    }

    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
      super(protocolFactory, clientManager, transport);
    }

    public void acquireLock(CuratorProjection projection, String path, int maxWaitMs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      acquireLock_call method_call = new acquireLock_call(projection, path, maxWaitMs, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class acquireLock_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private String path;
      private int maxWaitMs;
      public acquireLock_call(CuratorProjection projection, String path, int maxWaitMs, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.path = path;
        this.maxWaitMs = maxWaitMs;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("acquireLock", org.apache.thrift.protocol.TMessageType.CALL, 0));
        acquireLock_args args = new acquireLock_args();
        args.setProjection(projection);
        args.setPath(path);
        args.setMaxWaitMs(maxWaitMs);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public OptionalLockProjection getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_acquireLock();
      }
    }

    public void acquireSemaphore(CuratorProjection projection, String path, int acquireQty, int maxWaitMs, int maxLeases, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      acquireSemaphore_call method_call = new acquireSemaphore_call(projection, path, acquireQty, maxWaitMs, maxLeases, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class acquireSemaphore_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private String path;
      private int acquireQty;
      private int maxWaitMs;
      private int maxLeases;
      public acquireSemaphore_call(CuratorProjection projection, String path, int acquireQty, int maxWaitMs, int maxLeases, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.path = path;
        this.acquireQty = acquireQty;
        this.maxWaitMs = maxWaitMs;
        this.maxLeases = maxLeases;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("acquireSemaphore", org.apache.thrift.protocol.TMessageType.CALL, 0));
        acquireSemaphore_args args = new acquireSemaphore_args();
        args.setProjection(projection);
        args.setPath(path);
        args.setAcquireQty(acquireQty);
        args.setMaxWaitMs(maxWaitMs);
        args.setMaxLeases(maxLeases);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<LeaseProjection> getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_acquireSemaphore();
      }
    }

    public void closeCuratorProjection(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      closeCuratorProjection_call method_call = new closeCuratorProjection_call(projection, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class closeCuratorProjection_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      public closeCuratorProjection_call(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeCuratorProjection", org.apache.thrift.protocol.TMessageType.CALL, 0));
        closeCuratorProjection_args args = new closeCuratorProjection_args();
        args.setProjection(projection);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_closeCuratorProjection();
      }
    }

    public void closeGenericProjection(CuratorProjection projection, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      closeGenericProjection_call method_call = new closeGenericProjection_call(projection, id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class closeGenericProjection_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private String id;
      public closeGenericProjection_call(CuratorProjection projection, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.id = id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeGenericProjection", org.apache.thrift.protocol.TMessageType.CALL, 0));
        closeGenericProjection_args args = new closeGenericProjection_args();
        args.setProjection(projection);
        args.setId(id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_closeGenericProjection();
      }
    }

    public void createNode(CuratorProjection projection, CreateSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      createNode_call method_call = new createNode_call(projection, spec, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createNode_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private CreateSpec spec;
      public createNode_call(CuratorProjection projection, CreateSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.spec = spec;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createNode", org.apache.thrift.protocol.TMessageType.CALL, 0));
        createNode_args args = new createNode_args();
        args.setProjection(projection);
        args.setSpec(spec);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public OptionalPath getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_createNode();
      }
    }

    public void deleteNode(CuratorProjection projection, DeleteSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      deleteNode_call method_call = new deleteNode_call(projection, spec, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteNode_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private DeleteSpec spec;
      public deleteNode_call(CuratorProjection projection, DeleteSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.spec = spec;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteNode", org.apache.thrift.protocol.TMessageType.CALL, 0));
        deleteNode_args args = new deleteNode_args();
        args.setProjection(projection);
        args.setSpec(spec);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_deleteNode();
      }
    }

    public void exists(CuratorProjection projection, ExistsSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      exists_call method_call = new exists_call(projection, spec, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class exists_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private ExistsSpec spec;
      public exists_call(CuratorProjection projection, ExistsSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.spec = spec;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("exists", org.apache.thrift.protocol.TMessageType.CALL, 0));
        exists_args args = new exists_args();
        args.setProjection(projection);
        args.setSpec(spec);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public OptionalStat getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_exists();
      }
    }

    public void getChildren(CuratorProjection projection, GetChildrenSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getChildren_call method_call = new getChildren_call(projection, spec, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getChildren_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private GetChildrenSpec spec;
      public getChildren_call(CuratorProjection projection, GetChildrenSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.spec = spec;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getChildren", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getChildren_args args = new getChildren_args();
        args.setProjection(projection);
        args.setSpec(spec);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public OptionalChildrenList getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getChildren();
      }
    }

    public void getData(CuratorProjection projection, GetDataSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getData_call method_call = new getData_call(projection, spec, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getData_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private GetDataSpec spec;
      public getData_call(CuratorProjection projection, GetDataSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.spec = spec;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getData", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getData_args args = new getData_args();
        args.setProjection(projection);
        args.setSpec(spec);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public OptionalData getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getData();
      }
    }

    public void getLeaderParticipants(CuratorProjection projection, LeaderProjection leaderProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getLeaderParticipants_call method_call = new getLeaderParticipants_call(projection, leaderProjection, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getLeaderParticipants_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private LeaderProjection leaderProjection;
      public getLeaderParticipants_call(CuratorProjection projection, LeaderProjection leaderProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.leaderProjection = leaderProjection;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLeaderParticipants", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getLeaderParticipants_args args = new getLeaderParticipants_args();
        args.setProjection(projection);
        args.setLeaderProjection(leaderProjection);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Participant> getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getLeaderParticipants();
      }
    }

    public void getNodeCacheData(CuratorProjection projection, NodeCacheProjection cacheProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getNodeCacheData_call method_call = new getNodeCacheData_call(projection, cacheProjection, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getNodeCacheData_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private NodeCacheProjection cacheProjection;
      public getNodeCacheData_call(CuratorProjection projection, NodeCacheProjection cacheProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.cacheProjection = cacheProjection;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNodeCacheData", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getNodeCacheData_args args = new getNodeCacheData_args();
        args.setProjection(projection);
        args.setCacheProjection(cacheProjection);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ChildData getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getNodeCacheData();
      }
    }

    public void getPathChildrenCacheData(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getPathChildrenCacheData_call method_call = new getPathChildrenCacheData_call(projection, cacheProjection, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getPathChildrenCacheData_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private PathChildrenCacheProjection cacheProjection;
      public getPathChildrenCacheData_call(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.cacheProjection = cacheProjection;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPathChildrenCacheData", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getPathChildrenCacheData_args args = new getPathChildrenCacheData_args();
        args.setProjection(projection);
        args.setCacheProjection(cacheProjection);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<ChildData> getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getPathChildrenCacheData();
      }
    }

    public void getPathChildrenCacheDataForPath(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getPathChildrenCacheDataForPath_call method_call = new getPathChildrenCacheDataForPath_call(projection, cacheProjection, path, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getPathChildrenCacheDataForPath_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private PathChildrenCacheProjection cacheProjection;
      private String path;
      public getPathChildrenCacheDataForPath_call(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.cacheProjection = cacheProjection;
        this.path = path;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPathChildrenCacheDataForPath", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getPathChildrenCacheDataForPath_args args = new getPathChildrenCacheDataForPath_args();
        args.setProjection(projection);
        args.setCacheProjection(cacheProjection);
        args.setPath(path);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ChildData getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getPathChildrenCacheDataForPath();
      }
    }

    public void isLeader(CuratorProjection projection, LeaderProjection leaderProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      isLeader_call method_call = new isLeader_call(projection, leaderProjection, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class isLeader_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private LeaderProjection leaderProjection;
      public isLeader_call(CuratorProjection projection, LeaderProjection leaderProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.leaderProjection = leaderProjection;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isLeader", org.apache.thrift.protocol.TMessageType.CALL, 0));
        isLeader_args args = new isLeader_args();
        args.setProjection(projection);
        args.setLeaderProjection(leaderProjection);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_isLeader();
      }
    }

    public void newCuratorProjection(String connectionName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      newCuratorProjection_call method_call = new newCuratorProjection_call(connectionName, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class newCuratorProjection_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String connectionName;
      public newCuratorProjection_call(String connectionName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.connectionName = connectionName;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("newCuratorProjection", org.apache.thrift.protocol.TMessageType.CALL, 0));
        newCuratorProjection_args args = new newCuratorProjection_args();
        args.setConnectionName(connectionName);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public CuratorProjection getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_newCuratorProjection();
      }
    }

    public void pingCuratorProjection(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      pingCuratorProjection_call method_call = new pingCuratorProjection_call(projection, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class pingCuratorProjection_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      public pingCuratorProjection_call(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, true);
        this.projection = projection;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pingCuratorProjection", org.apache.thrift.protocol.TMessageType.CALL, 0));
        pingCuratorProjection_args args = new pingCuratorProjection_args();
        args.setProjection(projection);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
      }
    }

    public void setData(CuratorProjection projection, SetDataSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      setData_call method_call = new setData_call(projection, spec, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setData_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private SetDataSpec spec;
      public setData_call(CuratorProjection projection, SetDataSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.spec = spec;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setData", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setData_args args = new setData_args();
        args.setProjection(projection);
        args.setSpec(spec);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public OptionalStat getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_setData();
      }
    }

    public void startLeaderSelector(CuratorProjection projection, String path, String participantId, int waitForLeadershipMs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      startLeaderSelector_call method_call = new startLeaderSelector_call(projection, path, participantId, waitForLeadershipMs, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class startLeaderSelector_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private String path;
      private String participantId;
      private int waitForLeadershipMs;
      public startLeaderSelector_call(CuratorProjection projection, String path, String participantId, int waitForLeadershipMs, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.path = path;
        this.participantId = participantId;
        this.waitForLeadershipMs = waitForLeadershipMs;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startLeaderSelector", org.apache.thrift.protocol.TMessageType.CALL, 0));
        startLeaderSelector_args args = new startLeaderSelector_args();
        args.setProjection(projection);
        args.setPath(path);
        args.setParticipantId(participantId);
        args.setWaitForLeadershipMs(waitForLeadershipMs);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public LeaderResult getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_startLeaderSelector();
      }
    }

    public void startNodeCache(CuratorProjection projection, String path, boolean dataIsCompressed, boolean buildInitial, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      startNodeCache_call method_call = new startNodeCache_call(projection, path, dataIsCompressed, buildInitial, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class startNodeCache_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private String path;
      private boolean dataIsCompressed;
      private boolean buildInitial;
      public startNodeCache_call(CuratorProjection projection, String path, boolean dataIsCompressed, boolean buildInitial, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.path = path;
        this.dataIsCompressed = dataIsCompressed;
        this.buildInitial = buildInitial;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startNodeCache", org.apache.thrift.protocol.TMessageType.CALL, 0));
        startNodeCache_args args = new startNodeCache_args();
        args.setProjection(projection);
        args.setPath(path);
        args.setDataIsCompressed(dataIsCompressed);
        args.setBuildInitial(buildInitial);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public NodeCacheProjection getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_startNodeCache();
      }
    }

    public void startPathChildrenCache(CuratorProjection projection, String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      startPathChildrenCache_call method_call = new startPathChildrenCache_call(projection, path, cacheData, dataIsCompressed, startMode, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class startPathChildrenCache_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private String path;
      private boolean cacheData;
      private boolean dataIsCompressed;
      private PathChildrenCacheStartMode startMode;
      public startPathChildrenCache_call(CuratorProjection projection, String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.path = path;
        this.cacheData = cacheData;
        this.dataIsCompressed = dataIsCompressed;
        this.startMode = startMode;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPathChildrenCache", org.apache.thrift.protocol.TMessageType.CALL, 0));
        startPathChildrenCache_args args = new startPathChildrenCache_args();
        args.setProjection(projection);
        args.setPath(path);
        args.setCacheData(cacheData);
        args.setDataIsCompressed(dataIsCompressed);
        args.setStartMode(startMode);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public PathChildrenCacheProjection getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_startPathChildrenCache();
      }
    }

    public void startPersistentEphemeralNode(CuratorProjection projection, String path, ByteBuffer data, PersistentEphemeralNodeMode mode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      startPersistentEphemeralNode_call method_call = new startPersistentEphemeralNode_call(projection, path, data, mode, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class startPersistentEphemeralNode_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private String path;
      private ByteBuffer data;
      private PersistentEphemeralNodeMode mode;
      public startPersistentEphemeralNode_call(CuratorProjection projection, String path, ByteBuffer data, PersistentEphemeralNodeMode mode, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.path = path;
        this.data = data;
        this.mode = mode;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPersistentEphemeralNode", org.apache.thrift.protocol.TMessageType.CALL, 0));
        startPersistentEphemeralNode_args args = new startPersistentEphemeralNode_args();
        args.setProjection(projection);
        args.setPath(path);
        args.setData(data);
        args.setMode(mode);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public PersistentEphemeralNodeProjection getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_startPersistentEphemeralNode();
      }
    }

    public void sync(CuratorProjection projection, String path, String asyncContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      sync_call method_call = new sync_call(projection, path, asyncContext, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class sync_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CuratorProjection projection;
      private String path;
      private String asyncContext;
      public sync_call(CuratorProjection projection, String path, String asyncContext, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.projection = projection;
        this.path = path;
        this.asyncContext = asyncContext;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sync", org.apache.thrift.protocol.TMessageType.CALL, 0));
        sync_args args = new sync_args();
        args.setProjection(projection);
        args.setPath(path);
        args.setAsyncContext(asyncContext);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws CuratorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_sync();
      }
    }

  }

  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
    public Processor(I iface) {
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
    }

    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      processMap.put("acquireLock", new acquireLock());
      processMap.put("acquireSemaphore", new acquireSemaphore());
      processMap.put("closeCuratorProjection", new closeCuratorProjection());
      processMap.put("closeGenericProjection", new closeGenericProjection());
      processMap.put("createNode", new createNode());
      processMap.put("deleteNode", new deleteNode());
      processMap.put("exists", new exists());
      processMap.put("getChildren", new getChildren());
      processMap.put("getData", new getData());
      processMap.put("getLeaderParticipants", new getLeaderParticipants());
      processMap.put("getNodeCacheData", new getNodeCacheData());
      processMap.put("getPathChildrenCacheData", new getPathChildrenCacheData());
      processMap.put("getPathChildrenCacheDataForPath", new getPathChildrenCacheDataForPath());
      processMap.put("isLeader", new isLeader());
      processMap.put("newCuratorProjection", new newCuratorProjection());
      processMap.put("pingCuratorProjection", new pingCuratorProjection());
      processMap.put("setData", new setData());
      processMap.put("startLeaderSelector", new startLeaderSelector());
      processMap.put("startNodeCache", new startNodeCache());
      processMap.put("startPathChildrenCache", new startPathChildrenCache());
      processMap.put("startPersistentEphemeralNode", new startPersistentEphemeralNode());
      processMap.put("sync", new sync());
      return processMap;
    }

    public static class acquireLock<I extends Iface> extends org.apache.thrift.ProcessFunction<I, acquireLock_args> {
      public acquireLock() {
        super("acquireLock");
      }

      public acquireLock_args getEmptyArgsInstance() {
        return new acquireLock_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public acquireLock_result getResult(I iface, acquireLock_args args) throws org.apache.thrift.TException {
        acquireLock_result result = new acquireLock_result();
        try {
          result.success = iface.acquireLock(args.projection, args.path, args.maxWaitMs);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class acquireSemaphore<I extends Iface> extends org.apache.thrift.ProcessFunction<I, acquireSemaphore_args> {
      public acquireSemaphore() {
        super("acquireSemaphore");
      }

      public acquireSemaphore_args getEmptyArgsInstance() {
        return new acquireSemaphore_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public acquireSemaphore_result getResult(I iface, acquireSemaphore_args args) throws org.apache.thrift.TException {
        acquireSemaphore_result result = new acquireSemaphore_result();
        try {
          result.success = iface.acquireSemaphore(args.projection, args.path, args.acquireQty, args.maxWaitMs, args.maxLeases);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class closeCuratorProjection<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closeCuratorProjection_args> {
      public closeCuratorProjection() {
        super("closeCuratorProjection");
      }

      public closeCuratorProjection_args getEmptyArgsInstance() {
        return new closeCuratorProjection_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public closeCuratorProjection_result getResult(I iface, closeCuratorProjection_args args) throws org.apache.thrift.TException {
        closeCuratorProjection_result result = new closeCuratorProjection_result();
        iface.closeCuratorProjection(args.projection);
        return result;
      }
    }

    public static class closeGenericProjection<I extends Iface> extends org.apache.thrift.ProcessFunction<I, closeGenericProjection_args> {
      public closeGenericProjection() {
        super("closeGenericProjection");
      }

      public closeGenericProjection_args getEmptyArgsInstance() {
        return new closeGenericProjection_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public closeGenericProjection_result getResult(I iface, closeGenericProjection_args args) throws org.apache.thrift.TException {
        closeGenericProjection_result result = new closeGenericProjection_result();
        try {
          result.success = iface.closeGenericProjection(args.projection, args.id);
          result.setSuccessIsSet(true);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class createNode<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createNode_args> {
      public createNode() {
        super("createNode");
      }

      public createNode_args getEmptyArgsInstance() {
        return new createNode_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public createNode_result getResult(I iface, createNode_args args) throws org.apache.thrift.TException {
        createNode_result result = new createNode_result();
        try {
          result.success = iface.createNode(args.projection, args.spec);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class deleteNode<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteNode_args> {
      public deleteNode() {
        super("deleteNode");
      }

      public deleteNode_args getEmptyArgsInstance() {
        return new deleteNode_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public deleteNode_result getResult(I iface, deleteNode_args args) throws org.apache.thrift.TException {
        deleteNode_result result = new deleteNode_result();
        try {
          iface.deleteNode(args.projection, args.spec);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class exists<I extends Iface> extends org.apache.thrift.ProcessFunction<I, exists_args> {
      public exists() {
        super("exists");
      }

      public exists_args getEmptyArgsInstance() {
        return new exists_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public exists_result getResult(I iface, exists_args args) throws org.apache.thrift.TException {
        exists_result result = new exists_result();
        try {
          result.success = iface.exists(args.projection, args.spec);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class getChildren<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getChildren_args> {
      public getChildren() {
        super("getChildren");
      }

      public getChildren_args getEmptyArgsInstance() {
        return new getChildren_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getChildren_result getResult(I iface, getChildren_args args) throws org.apache.thrift.TException {
        getChildren_result result = new getChildren_result();
        try {
          result.success = iface.getChildren(args.projection, args.spec);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class getData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getData_args> {
      public getData() {
        super("getData");
      }

      public getData_args getEmptyArgsInstance() {
        return new getData_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getData_result getResult(I iface, getData_args args) throws org.apache.thrift.TException {
        getData_result result = new getData_result();
        try {
          result.success = iface.getData(args.projection, args.spec);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class getLeaderParticipants<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLeaderParticipants_args> {
      public getLeaderParticipants() {
        super("getLeaderParticipants");
      }

      public getLeaderParticipants_args getEmptyArgsInstance() {
        return new getLeaderParticipants_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getLeaderParticipants_result getResult(I iface, getLeaderParticipants_args args) throws org.apache.thrift.TException {
        getLeaderParticipants_result result = new getLeaderParticipants_result();
        try {
          result.success = iface.getLeaderParticipants(args.projection, args.leaderProjection);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class getNodeCacheData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNodeCacheData_args> {
      public getNodeCacheData() {
        super("getNodeCacheData");
      }

      public getNodeCacheData_args getEmptyArgsInstance() {
        return new getNodeCacheData_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getNodeCacheData_result getResult(I iface, getNodeCacheData_args args) throws org.apache.thrift.TException {
        getNodeCacheData_result result = new getNodeCacheData_result();
        try {
          result.success = iface.getNodeCacheData(args.projection, args.cacheProjection);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class getPathChildrenCacheData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPathChildrenCacheData_args> {
      public getPathChildrenCacheData() {
        super("getPathChildrenCacheData");
      }

      public getPathChildrenCacheData_args getEmptyArgsInstance() {
        return new getPathChildrenCacheData_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getPathChildrenCacheData_result getResult(I iface, getPathChildrenCacheData_args args) throws org.apache.thrift.TException {
        getPathChildrenCacheData_result result = new getPathChildrenCacheData_result();
        try {
          result.success = iface.getPathChildrenCacheData(args.projection, args.cacheProjection);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class getPathChildrenCacheDataForPath<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPathChildrenCacheDataForPath_args> {
      public getPathChildrenCacheDataForPath() {
        super("getPathChildrenCacheDataForPath");
      }

      public getPathChildrenCacheDataForPath_args getEmptyArgsInstance() {
        return new getPathChildrenCacheDataForPath_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public getPathChildrenCacheDataForPath_result getResult(I iface, getPathChildrenCacheDataForPath_args args) throws org.apache.thrift.TException {
        getPathChildrenCacheDataForPath_result result = new getPathChildrenCacheDataForPath_result();
        try {
          result.success = iface.getPathChildrenCacheDataForPath(args.projection, args.cacheProjection, args.path);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class isLeader<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isLeader_args> {
      public isLeader() {
        super("isLeader");
      }

      public isLeader_args getEmptyArgsInstance() {
        return new isLeader_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public isLeader_result getResult(I iface, isLeader_args args) throws org.apache.thrift.TException {
        isLeader_result result = new isLeader_result();
        try {
          result.success = iface.isLeader(args.projection, args.leaderProjection);
          result.setSuccessIsSet(true);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class newCuratorProjection<I extends Iface> extends org.apache.thrift.ProcessFunction<I, newCuratorProjection_args> {
      public newCuratorProjection() {
        super("newCuratorProjection");
      }

      public newCuratorProjection_args getEmptyArgsInstance() {
        return new newCuratorProjection_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public newCuratorProjection_result getResult(I iface, newCuratorProjection_args args) throws org.apache.thrift.TException {
        newCuratorProjection_result result = new newCuratorProjection_result();
        try {
          result.success = iface.newCuratorProjection(args.connectionName);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class pingCuratorProjection<I extends Iface> extends org.apache.thrift.ProcessFunction<I, pingCuratorProjection_args> {
      public pingCuratorProjection() {
        super("pingCuratorProjection");
      }

      public pingCuratorProjection_args getEmptyArgsInstance() {
        return new pingCuratorProjection_args();
      }

      protected boolean isOneway() {
        return true;
      }

      public org.apache.thrift.TBase getResult(I iface, pingCuratorProjection_args args) throws org.apache.thrift.TException {
        iface.pingCuratorProjection(args.projection);
        return null;
      }
    }

    public static class setData<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setData_args> {
      public setData() {
        super("setData");
      }

      public setData_args getEmptyArgsInstance() {
        return new setData_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public setData_result getResult(I iface, setData_args args) throws org.apache.thrift.TException {
        setData_result result = new setData_result();
        try {
          result.success = iface.setData(args.projection, args.spec);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class startLeaderSelector<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startLeaderSelector_args> {
      public startLeaderSelector() {
        super("startLeaderSelector");
      }

      public startLeaderSelector_args getEmptyArgsInstance() {
        return new startLeaderSelector_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public startLeaderSelector_result getResult(I iface, startLeaderSelector_args args) throws org.apache.thrift.TException {
        startLeaderSelector_result result = new startLeaderSelector_result();
        try {
          result.success = iface.startLeaderSelector(args.projection, args.path, args.participantId, args.waitForLeadershipMs);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class startNodeCache<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startNodeCache_args> {
      public startNodeCache() {
        super("startNodeCache");
      }

      public startNodeCache_args getEmptyArgsInstance() {
        return new startNodeCache_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public startNodeCache_result getResult(I iface, startNodeCache_args args) throws org.apache.thrift.TException {
        startNodeCache_result result = new startNodeCache_result();
        try {
          result.success = iface.startNodeCache(args.projection, args.path, args.dataIsCompressed, args.buildInitial);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class startPathChildrenCache<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPathChildrenCache_args> {
      public startPathChildrenCache() {
        super("startPathChildrenCache");
      }

      public startPathChildrenCache_args getEmptyArgsInstance() {
        return new startPathChildrenCache_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public startPathChildrenCache_result getResult(I iface, startPathChildrenCache_args args) throws org.apache.thrift.TException {
        startPathChildrenCache_result result = new startPathChildrenCache_result();
        try {
          result.success = iface.startPathChildrenCache(args.projection, args.path, args.cacheData, args.dataIsCompressed, args.startMode);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class startPersistentEphemeralNode<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startPersistentEphemeralNode_args> {
      public startPersistentEphemeralNode() {
        super("startPersistentEphemeralNode");
      }

      public startPersistentEphemeralNode_args getEmptyArgsInstance() {
        return new startPersistentEphemeralNode_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public startPersistentEphemeralNode_result getResult(I iface, startPersistentEphemeralNode_args args) throws org.apache.thrift.TException {
        startPersistentEphemeralNode_result result = new startPersistentEphemeralNode_result();
        try {
          result.success = iface.startPersistentEphemeralNode(args.projection, args.path, args.data, args.mode);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

    public static class sync<I extends Iface> extends org.apache.thrift.ProcessFunction<I, sync_args> {
      public sync() {
        super("sync");
      }

      public sync_args getEmptyArgsInstance() {
        return new sync_args();
      }

      protected boolean isOneway() {
        return false;
      }

      public sync_result getResult(I iface, sync_args args) throws org.apache.thrift.TException {
        sync_result result = new sync_result();
        try {
          iface.sync(args.projection, args.path, args.asyncContext);
        } catch (CuratorException ex1) {
          result.ex1 = ex1;
        }
        return result;
      }
    }

  }

  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
    public AsyncProcessor(I iface) {
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
    }

    protected AsyncProcessor(I iface, Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static <I extends AsyncIface> Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
      processMap.put("acquireLock", new acquireLock());
      processMap.put("acquireSemaphore", new acquireSemaphore());
      processMap.put("closeCuratorProjection", new closeCuratorProjection());
      processMap.put("closeGenericProjection", new closeGenericProjection());
      processMap.put("createNode", new createNode());
      processMap.put("deleteNode", new deleteNode());
      processMap.put("exists", new exists());
      processMap.put("getChildren", new getChildren());
      processMap.put("getData", new getData());
      processMap.put("getLeaderParticipants", new getLeaderParticipants());
      processMap.put("getNodeCacheData", new getNodeCacheData());
      processMap.put("getPathChildrenCacheData", new getPathChildrenCacheData());
      processMap.put("getPathChildrenCacheDataForPath", new getPathChildrenCacheDataForPath());
      processMap.put("isLeader", new isLeader());
      processMap.put("newCuratorProjection", new newCuratorProjection());
      processMap.put("pingCuratorProjection", new pingCuratorProjection());
      processMap.put("setData", new setData());
      processMap.put("startLeaderSelector", new startLeaderSelector());
      processMap.put("startNodeCache", new startNodeCache());
      processMap.put("startPathChildrenCache", new startPathChildrenCache());
      processMap.put("startPersistentEphemeralNode", new startPersistentEphemeralNode());
      processMap.put("sync", new sync());
      return processMap;
    }

    public static class acquireLock<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, acquireLock_args, OptionalLockProjection> {
      public acquireLock() {
        super("acquireLock");
      }

      public acquireLock_args getEmptyArgsInstance() {
        return new acquireLock_args();
      }

      public AsyncMethodCallback<OptionalLockProjection> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<OptionalLockProjection>() { 
          public void onComplete(OptionalLockProjection o) {
            acquireLock_result result = new acquireLock_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            acquireLock_result result = new acquireLock_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, acquireLock_args args, org.apache.thrift.async.AsyncMethodCallback<OptionalLockProjection> resultHandler) throws TException {
        iface.acquireLock(args.projection, args.path, args.maxWaitMs,resultHandler);
      }
    }

    public static class acquireSemaphore<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, acquireSemaphore_args, List<LeaseProjection>> {
      public acquireSemaphore() {
        super("acquireSemaphore");
      }

      public acquireSemaphore_args getEmptyArgsInstance() {
        return new acquireSemaphore_args();
      }

      public AsyncMethodCallback<List<LeaseProjection>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<LeaseProjection>>() { 
          public void onComplete(List<LeaseProjection> o) {
            acquireSemaphore_result result = new acquireSemaphore_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            acquireSemaphore_result result = new acquireSemaphore_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, acquireSemaphore_args args, org.apache.thrift.async.AsyncMethodCallback<List<LeaseProjection>> resultHandler) throws TException {
        iface.acquireSemaphore(args.projection, args.path, args.acquireQty, args.maxWaitMs, args.maxLeases,resultHandler);
      }
    }

    public static class closeCuratorProjection<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, closeCuratorProjection_args, Void> {
      public closeCuratorProjection() {
        super("closeCuratorProjection");
      }

      public closeCuratorProjection_args getEmptyArgsInstance() {
        return new closeCuratorProjection_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            closeCuratorProjection_result result = new closeCuratorProjection_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            closeCuratorProjection_result result = new closeCuratorProjection_result();
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, closeCuratorProjection_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.closeCuratorProjection(args.projection,resultHandler);
      }
    }

    public static class closeGenericProjection<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, closeGenericProjection_args, Boolean> {
      public closeGenericProjection() {
        super("closeGenericProjection");
      }

      public closeGenericProjection_args getEmptyArgsInstance() {
        return new closeGenericProjection_args();
      }

      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Boolean>() { 
          public void onComplete(Boolean o) {
            closeGenericProjection_result result = new closeGenericProjection_result();
            result.success = o;
            result.setSuccessIsSet(true);
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            closeGenericProjection_result result = new closeGenericProjection_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, closeGenericProjection_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
        iface.closeGenericProjection(args.projection, args.id,resultHandler);
      }
    }

    public static class createNode<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createNode_args, OptionalPath> {
      public createNode() {
        super("createNode");
      }

      public createNode_args getEmptyArgsInstance() {
        return new createNode_args();
      }

      public AsyncMethodCallback<OptionalPath> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<OptionalPath>() { 
          public void onComplete(OptionalPath o) {
            createNode_result result = new createNode_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            createNode_result result = new createNode_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, createNode_args args, org.apache.thrift.async.AsyncMethodCallback<OptionalPath> resultHandler) throws TException {
        iface.createNode(args.projection, args.spec,resultHandler);
      }
    }

    public static class deleteNode<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteNode_args, Void> {
      public deleteNode() {
        super("deleteNode");
      }

      public deleteNode_args getEmptyArgsInstance() {
        return new deleteNode_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            deleteNode_result result = new deleteNode_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            deleteNode_result result = new deleteNode_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, deleteNode_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.deleteNode(args.projection, args.spec,resultHandler);
      }
    }

    public static class exists<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, exists_args, OptionalStat> {
      public exists() {
        super("exists");
      }

      public exists_args getEmptyArgsInstance() {
        return new exists_args();
      }

      public AsyncMethodCallback<OptionalStat> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<OptionalStat>() { 
          public void onComplete(OptionalStat o) {
            exists_result result = new exists_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            exists_result result = new exists_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, exists_args args, org.apache.thrift.async.AsyncMethodCallback<OptionalStat> resultHandler) throws TException {
        iface.exists(args.projection, args.spec,resultHandler);
      }
    }

    public static class getChildren<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getChildren_args, OptionalChildrenList> {
      public getChildren() {
        super("getChildren");
      }

      public getChildren_args getEmptyArgsInstance() {
        return new getChildren_args();
      }

      public AsyncMethodCallback<OptionalChildrenList> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<OptionalChildrenList>() { 
          public void onComplete(OptionalChildrenList o) {
            getChildren_result result = new getChildren_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getChildren_result result = new getChildren_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getChildren_args args, org.apache.thrift.async.AsyncMethodCallback<OptionalChildrenList> resultHandler) throws TException {
        iface.getChildren(args.projection, args.spec,resultHandler);
      }
    }

    public static class getData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getData_args, OptionalData> {
      public getData() {
        super("getData");
      }

      public getData_args getEmptyArgsInstance() {
        return new getData_args();
      }

      public AsyncMethodCallback<OptionalData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<OptionalData>() { 
          public void onComplete(OptionalData o) {
            getData_result result = new getData_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getData_result result = new getData_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getData_args args, org.apache.thrift.async.AsyncMethodCallback<OptionalData> resultHandler) throws TException {
        iface.getData(args.projection, args.spec,resultHandler);
      }
    }

    public static class getLeaderParticipants<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLeaderParticipants_args, List<Participant>> {
      public getLeaderParticipants() {
        super("getLeaderParticipants");
      }

      public getLeaderParticipants_args getEmptyArgsInstance() {
        return new getLeaderParticipants_args();
      }

      public AsyncMethodCallback<List<Participant>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<Participant>>() { 
          public void onComplete(List<Participant> o) {
            getLeaderParticipants_result result = new getLeaderParticipants_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getLeaderParticipants_result result = new getLeaderParticipants_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getLeaderParticipants_args args, org.apache.thrift.async.AsyncMethodCallback<List<Participant>> resultHandler) throws TException {
        iface.getLeaderParticipants(args.projection, args.leaderProjection,resultHandler);
      }
    }

    public static class getNodeCacheData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getNodeCacheData_args, ChildData> {
      public getNodeCacheData() {
        super("getNodeCacheData");
      }

      public getNodeCacheData_args getEmptyArgsInstance() {
        return new getNodeCacheData_args();
      }

      public AsyncMethodCallback<ChildData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<ChildData>() { 
          public void onComplete(ChildData o) {
            getNodeCacheData_result result = new getNodeCacheData_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getNodeCacheData_result result = new getNodeCacheData_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getNodeCacheData_args args, org.apache.thrift.async.AsyncMethodCallback<ChildData> resultHandler) throws TException {
        iface.getNodeCacheData(args.projection, args.cacheProjection,resultHandler);
      }
    }

    public static class getPathChildrenCacheData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPathChildrenCacheData_args, List<ChildData>> {
      public getPathChildrenCacheData() {
        super("getPathChildrenCacheData");
      }

      public getPathChildrenCacheData_args getEmptyArgsInstance() {
        return new getPathChildrenCacheData_args();
      }

      public AsyncMethodCallback<List<ChildData>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<ChildData>>() { 
          public void onComplete(List<ChildData> o) {
            getPathChildrenCacheData_result result = new getPathChildrenCacheData_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getPathChildrenCacheData_result result = new getPathChildrenCacheData_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getPathChildrenCacheData_args args, org.apache.thrift.async.AsyncMethodCallback<List<ChildData>> resultHandler) throws TException {
        iface.getPathChildrenCacheData(args.projection, args.cacheProjection,resultHandler);
      }
    }

    public static class getPathChildrenCacheDataForPath<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPathChildrenCacheDataForPath_args, ChildData> {
      public getPathChildrenCacheDataForPath() {
        super("getPathChildrenCacheDataForPath");
      }

      public getPathChildrenCacheDataForPath_args getEmptyArgsInstance() {
        return new getPathChildrenCacheDataForPath_args();
      }

      public AsyncMethodCallback<ChildData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<ChildData>() { 
          public void onComplete(ChildData o) {
            getPathChildrenCacheDataForPath_result result = new getPathChildrenCacheDataForPath_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getPathChildrenCacheDataForPath_result result = new getPathChildrenCacheDataForPath_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getPathChildrenCacheDataForPath_args args, org.apache.thrift.async.AsyncMethodCallback<ChildData> resultHandler) throws TException {
        iface.getPathChildrenCacheDataForPath(args.projection, args.cacheProjection, args.path,resultHandler);
      }
    }

    public static class isLeader<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isLeader_args, Boolean> {
      public isLeader() {
        super("isLeader");
      }

      public isLeader_args getEmptyArgsInstance() {
        return new isLeader_args();
      }

      public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Boolean>() { 
          public void onComplete(Boolean o) {
            isLeader_result result = new isLeader_result();
            result.success = o;
            result.setSuccessIsSet(true);
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            isLeader_result result = new isLeader_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, isLeader_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
        iface.isLeader(args.projection, args.leaderProjection,resultHandler);
      }
    }

    public static class newCuratorProjection<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, newCuratorProjection_args, CuratorProjection> {
      public newCuratorProjection() {
        super("newCuratorProjection");
      }

      public newCuratorProjection_args getEmptyArgsInstance() {
        return new newCuratorProjection_args();
      }

      public AsyncMethodCallback<CuratorProjection> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<CuratorProjection>() { 
          public void onComplete(CuratorProjection o) {
            newCuratorProjection_result result = new newCuratorProjection_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            newCuratorProjection_result result = new newCuratorProjection_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, newCuratorProjection_args args, org.apache.thrift.async.AsyncMethodCallback<CuratorProjection> resultHandler) throws TException {
        iface.newCuratorProjection(args.connectionName,resultHandler);
      }
    }

    public static class pingCuratorProjection<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, pingCuratorProjection_args, Void> {
      public pingCuratorProjection() {
        super("pingCuratorProjection");
      }

      public pingCuratorProjection_args getEmptyArgsInstance() {
        return new pingCuratorProjection_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
          }
          public void onError(Exception e) {
          }
        };
      }

      protected boolean isOneway() {
        return true;
      }

      public void start(I iface, pingCuratorProjection_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.pingCuratorProjection(args.projection,resultHandler);
      }
    }

    public static class setData<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setData_args, OptionalStat> {
      public setData() {
        super("setData");
      }

      public setData_args getEmptyArgsInstance() {
        return new setData_args();
      }

      public AsyncMethodCallback<OptionalStat> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<OptionalStat>() { 
          public void onComplete(OptionalStat o) {
            setData_result result = new setData_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            setData_result result = new setData_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, setData_args args, org.apache.thrift.async.AsyncMethodCallback<OptionalStat> resultHandler) throws TException {
        iface.setData(args.projection, args.spec,resultHandler);
      }
    }

    public static class startLeaderSelector<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startLeaderSelector_args, LeaderResult> {
      public startLeaderSelector() {
        super("startLeaderSelector");
      }

      public startLeaderSelector_args getEmptyArgsInstance() {
        return new startLeaderSelector_args();
      }

      public AsyncMethodCallback<LeaderResult> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<LeaderResult>() { 
          public void onComplete(LeaderResult o) {
            startLeaderSelector_result result = new startLeaderSelector_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            startLeaderSelector_result result = new startLeaderSelector_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, startLeaderSelector_args args, org.apache.thrift.async.AsyncMethodCallback<LeaderResult> resultHandler) throws TException {
        iface.startLeaderSelector(args.projection, args.path, args.participantId, args.waitForLeadershipMs,resultHandler);
      }
    }

    public static class startNodeCache<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startNodeCache_args, NodeCacheProjection> {
      public startNodeCache() {
        super("startNodeCache");
      }

      public startNodeCache_args getEmptyArgsInstance() {
        return new startNodeCache_args();
      }

      public AsyncMethodCallback<NodeCacheProjection> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<NodeCacheProjection>() { 
          public void onComplete(NodeCacheProjection o) {
            startNodeCache_result result = new startNodeCache_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            startNodeCache_result result = new startNodeCache_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, startNodeCache_args args, org.apache.thrift.async.AsyncMethodCallback<NodeCacheProjection> resultHandler) throws TException {
        iface.startNodeCache(args.projection, args.path, args.dataIsCompressed, args.buildInitial,resultHandler);
      }
    }

    public static class startPathChildrenCache<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startPathChildrenCache_args, PathChildrenCacheProjection> {
      public startPathChildrenCache() {
        super("startPathChildrenCache");
      }

      public startPathChildrenCache_args getEmptyArgsInstance() {
        return new startPathChildrenCache_args();
      }

      public AsyncMethodCallback<PathChildrenCacheProjection> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<PathChildrenCacheProjection>() { 
          public void onComplete(PathChildrenCacheProjection o) {
            startPathChildrenCache_result result = new startPathChildrenCache_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            startPathChildrenCache_result result = new startPathChildrenCache_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, startPathChildrenCache_args args, org.apache.thrift.async.AsyncMethodCallback<PathChildrenCacheProjection> resultHandler) throws TException {
        iface.startPathChildrenCache(args.projection, args.path, args.cacheData, args.dataIsCompressed, args.startMode,resultHandler);
      }
    }

    public static class startPersistentEphemeralNode<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startPersistentEphemeralNode_args, PersistentEphemeralNodeProjection> {
      public startPersistentEphemeralNode() {
        super("startPersistentEphemeralNode");
      }

      public startPersistentEphemeralNode_args getEmptyArgsInstance() {
        return new startPersistentEphemeralNode_args();
      }

      public AsyncMethodCallback<PersistentEphemeralNodeProjection> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<PersistentEphemeralNodeProjection>() { 
          public void onComplete(PersistentEphemeralNodeProjection o) {
            startPersistentEphemeralNode_result result = new startPersistentEphemeralNode_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            startPersistentEphemeralNode_result result = new startPersistentEphemeralNode_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, startPersistentEphemeralNode_args args, org.apache.thrift.async.AsyncMethodCallback<PersistentEphemeralNodeProjection> resultHandler) throws TException {
        iface.startPersistentEphemeralNode(args.projection, args.path, args.data, args.mode,resultHandler);
      }
    }

    public static class sync<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, sync_args, Void> {
      public sync() {
        super("sync");
      }

      public sync_args getEmptyArgsInstance() {
        return new sync_args();
      }

      public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            sync_result result = new sync_result();
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            sync_result result = new sync_result();
            if (e instanceof CuratorException) {
                        result.ex1 = (CuratorException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, sync_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.sync(args.projection, args.path, args.asyncContext,resultHandler);
      }
    }

  }

  public static class acquireLock_args implements org.apache.thrift.TBase<acquireLock_args, acquireLock_args._Fields>, java.io.Serializable, Cloneable, Comparable<acquireLock_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("acquireLock_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField MAX_WAIT_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxWaitMs", org.apache.thrift.protocol.TType.I32, (short)3);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new acquireLock_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new acquireLock_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public String path; // required
    public int maxWaitMs; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      PATH((short)2, "path"),
      MAX_WAIT_MS((short)3, "maxWaitMs");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // PATH
            return PATH;
          case 3: // MAX_WAIT_MS
            return MAX_WAIT_MS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MAXWAITMS_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.MAX_WAIT_MS, new org.apache.thrift.meta_data.FieldMetaData("maxWaitMs", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(acquireLock_args.class, metaDataMap);
    }

    public acquireLock_args() {
    }

    public acquireLock_args(
      CuratorProjection projection,
      String path,
      int maxWaitMs)
    {
      this();
      this.projection = projection;
      this.path = path;
      this.maxWaitMs = maxWaitMs;
      setMaxWaitMsIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public acquireLock_args(acquireLock_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetPath()) {
        this.path = other.path;
      }
      this.maxWaitMs = other.maxWaitMs;
    }

    public acquireLock_args deepCopy() {
      return new acquireLock_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.path = null;
      setMaxWaitMsIsSet(false);
      this.maxWaitMs = 0;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public acquireLock_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public String getPath() {
      return this.path;
    }

    public acquireLock_args setPath(String path) {
      this.path = path;
      return this;
    }

    public void unsetPath() {
      this.path = null;
    }

    /** Returns true if field path is set (has been assigned a value) and false otherwise */
    public boolean isSetPath() {
      return this.path != null;
    }

    public void setPathIsSet(boolean value) {
      if (!value) {
        this.path = null;
      }
    }

    public int getMaxWaitMs() {
      return this.maxWaitMs;
    }

    public acquireLock_args setMaxWaitMs(int maxWaitMs) {
      this.maxWaitMs = maxWaitMs;
      setMaxWaitMsIsSet(true);
      return this;
    }

    public void unsetMaxWaitMs() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXWAITMS_ISSET_ID);
    }

    /** Returns true if field maxWaitMs is set (has been assigned a value) and false otherwise */
    public boolean isSetMaxWaitMs() {
      return EncodingUtils.testBit(__isset_bitfield, __MAXWAITMS_ISSET_ID);
    }

    public void setMaxWaitMsIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXWAITMS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case PATH:
        if (value == null) {
          unsetPath();
        } else {
          setPath((String)value);
        }
        break;

      case MAX_WAIT_MS:
        if (value == null) {
          unsetMaxWaitMs();
        } else {
          setMaxWaitMs((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case PATH:
        return getPath();

      case MAX_WAIT_MS:
        return Integer.valueOf(getMaxWaitMs());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case PATH:
        return isSetPath();
      case MAX_WAIT_MS:
        return isSetMaxWaitMs();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof acquireLock_args)
        return this.equals((acquireLock_args)that);
      return false;
    }

    public boolean equals(acquireLock_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_path = true && this.isSetPath();
      boolean that_present_path = true && that.isSetPath();
      if (this_present_path || that_present_path) {
        if (!(this_present_path && that_present_path))
          return false;
        if (!this.path.equals(that.path))
          return false;
      }

      boolean this_present_maxWaitMs = true;
      boolean that_present_maxWaitMs = true;
      if (this_present_maxWaitMs || that_present_maxWaitMs) {
        if (!(this_present_maxWaitMs && that_present_maxWaitMs))
          return false;
        if (this.maxWaitMs != that.maxWaitMs)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(acquireLock_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPath()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMaxWaitMs()).compareTo(other.isSetMaxWaitMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMaxWaitMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxWaitMs, other.maxWaitMs);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("acquireLock_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("path:");
      if (this.path == null) {
        sb.append("null");
      } else {
        sb.append(this.path);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("maxWaitMs:");
      sb.append(this.maxWaitMs);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bitfield = 0;
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class acquireLock_argsStandardSchemeFactory implements SchemeFactory {
      public acquireLock_argsStandardScheme getScheme() {
        return new acquireLock_argsStandardScheme();
      }
    }

    private static class acquireLock_argsStandardScheme extends StandardScheme<acquireLock_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, acquireLock_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // PATH
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.path = iprot.readString();
                struct.setPathIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // MAX_WAIT_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.maxWaitMs = iprot.readI32();
                struct.setMaxWaitMsIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, acquireLock_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.path != null) {
          oprot.writeFieldBegin(PATH_FIELD_DESC);
          oprot.writeString(struct.path);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(MAX_WAIT_MS_FIELD_DESC);
        oprot.writeI32(struct.maxWaitMs);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class acquireLock_argsTupleSchemeFactory implements SchemeFactory {
      public acquireLock_argsTupleScheme getScheme() {
        return new acquireLock_argsTupleScheme();
      }
    }

    private static class acquireLock_argsTupleScheme extends TupleScheme<acquireLock_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, acquireLock_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetPath()) {
          optionals.set(1);
        }
        if (struct.isSetMaxWaitMs()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetPath()) {
          oprot.writeString(struct.path);
        }
        if (struct.isSetMaxWaitMs()) {
          oprot.writeI32(struct.maxWaitMs);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, acquireLock_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.path = iprot.readString();
          struct.setPathIsSet(true);
        }
        if (incoming.get(2)) {
          struct.maxWaitMs = iprot.readI32();
          struct.setMaxWaitMsIsSet(true);
        }
      }
    }

  }

  public static class acquireLock_result implements org.apache.thrift.TBase<acquireLock_result, acquireLock_result._Fields>, java.io.Serializable, Cloneable, Comparable<acquireLock_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("acquireLock_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new acquireLock_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new acquireLock_resultTupleSchemeFactory());
    }

    public OptionalLockProjection success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalLockProjection.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(acquireLock_result.class, metaDataMap);
    }

    public acquireLock_result() {
    }

    public acquireLock_result(
      OptionalLockProjection success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public acquireLock_result(acquireLock_result other) {
      if (other.isSetSuccess()) {
        this.success = new OptionalLockProjection(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public acquireLock_result deepCopy() {
      return new acquireLock_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public OptionalLockProjection getSuccess() {
      return this.success;
    }

    public acquireLock_result setSuccess(OptionalLockProjection success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public acquireLock_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((OptionalLockProjection)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof acquireLock_result)
        return this.equals((acquireLock_result)that);
      return false;
    }

    public boolean equals(acquireLock_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(acquireLock_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("acquireLock_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class acquireLock_resultStandardSchemeFactory implements SchemeFactory {
      public acquireLock_resultStandardScheme getScheme() {
        return new acquireLock_resultStandardScheme();
      }
    }

    private static class acquireLock_resultStandardScheme extends StandardScheme<acquireLock_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, acquireLock_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new OptionalLockProjection();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, acquireLock_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class acquireLock_resultTupleSchemeFactory implements SchemeFactory {
      public acquireLock_resultTupleScheme getScheme() {
        return new acquireLock_resultTupleScheme();
      }
    }

    private static class acquireLock_resultTupleScheme extends TupleScheme<acquireLock_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, acquireLock_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, acquireLock_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new OptionalLockProjection();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class acquireSemaphore_args implements org.apache.thrift.TBase<acquireSemaphore_args, acquireSemaphore_args._Fields>, java.io.Serializable, Cloneable, Comparable<acquireSemaphore_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("acquireSemaphore_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField ACQUIRE_QTY_FIELD_DESC = new org.apache.thrift.protocol.TField("acquireQty", org.apache.thrift.protocol.TType.I32, (short)3);
    private static final org.apache.thrift.protocol.TField MAX_WAIT_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxWaitMs", org.apache.thrift.protocol.TType.I32, (short)4);
    private static final org.apache.thrift.protocol.TField MAX_LEASES_FIELD_DESC = new org.apache.thrift.protocol.TField("maxLeases", org.apache.thrift.protocol.TType.I32, (short)5);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new acquireSemaphore_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new acquireSemaphore_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public String path; // required
    public int acquireQty; // required
    public int maxWaitMs; // required
    public int maxLeases; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      PATH((short)2, "path"),
      ACQUIRE_QTY((short)3, "acquireQty"),
      MAX_WAIT_MS((short)4, "maxWaitMs"),
      MAX_LEASES((short)5, "maxLeases");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // PATH
            return PATH;
          case 3: // ACQUIRE_QTY
            return ACQUIRE_QTY;
          case 4: // MAX_WAIT_MS
            return MAX_WAIT_MS;
          case 5: // MAX_LEASES
            return MAX_LEASES;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ACQUIREQTY_ISSET_ID = 0;
    private static final int __MAXWAITMS_ISSET_ID = 1;
    private static final int __MAXLEASES_ISSET_ID = 2;
    private byte __isset_bitfield = 0;
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.ACQUIRE_QTY, new org.apache.thrift.meta_data.FieldMetaData("acquireQty", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.MAX_WAIT_MS, new org.apache.thrift.meta_data.FieldMetaData("maxWaitMs", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.MAX_LEASES, new org.apache.thrift.meta_data.FieldMetaData("maxLeases", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(acquireSemaphore_args.class, metaDataMap);
    }

    public acquireSemaphore_args() {
    }

    public acquireSemaphore_args(
      CuratorProjection projection,
      String path,
      int acquireQty,
      int maxWaitMs,
      int maxLeases)
    {
      this();
      this.projection = projection;
      this.path = path;
      this.acquireQty = acquireQty;
      setAcquireQtyIsSet(true);
      this.maxWaitMs = maxWaitMs;
      setMaxWaitMsIsSet(true);
      this.maxLeases = maxLeases;
      setMaxLeasesIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public acquireSemaphore_args(acquireSemaphore_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetPath()) {
        this.path = other.path;
      }
      this.acquireQty = other.acquireQty;
      this.maxWaitMs = other.maxWaitMs;
      this.maxLeases = other.maxLeases;
    }

    public acquireSemaphore_args deepCopy() {
      return new acquireSemaphore_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.path = null;
      setAcquireQtyIsSet(false);
      this.acquireQty = 0;
      setMaxWaitMsIsSet(false);
      this.maxWaitMs = 0;
      setMaxLeasesIsSet(false);
      this.maxLeases = 0;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public acquireSemaphore_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public String getPath() {
      return this.path;
    }

    public acquireSemaphore_args setPath(String path) {
      this.path = path;
      return this;
    }

    public void unsetPath() {
      this.path = null;
    }

    /** Returns true if field path is set (has been assigned a value) and false otherwise */
    public boolean isSetPath() {
      return this.path != null;
    }

    public void setPathIsSet(boolean value) {
      if (!value) {
        this.path = null;
      }
    }

    public int getAcquireQty() {
      return this.acquireQty;
    }

    public acquireSemaphore_args setAcquireQty(int acquireQty) {
      this.acquireQty = acquireQty;
      setAcquireQtyIsSet(true);
      return this;
    }

    public void unsetAcquireQty() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ACQUIREQTY_ISSET_ID);
    }

    /** Returns true if field acquireQty is set (has been assigned a value) and false otherwise */
    public boolean isSetAcquireQty() {
      return EncodingUtils.testBit(__isset_bitfield, __ACQUIREQTY_ISSET_ID);
    }

    public void setAcquireQtyIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ACQUIREQTY_ISSET_ID, value);
    }

    public int getMaxWaitMs() {
      return this.maxWaitMs;
    }

    public acquireSemaphore_args setMaxWaitMs(int maxWaitMs) {
      this.maxWaitMs = maxWaitMs;
      setMaxWaitMsIsSet(true);
      return this;
    }

    public void unsetMaxWaitMs() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXWAITMS_ISSET_ID);
    }

    /** Returns true if field maxWaitMs is set (has been assigned a value) and false otherwise */
    public boolean isSetMaxWaitMs() {
      return EncodingUtils.testBit(__isset_bitfield, __MAXWAITMS_ISSET_ID);
    }

    public void setMaxWaitMsIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXWAITMS_ISSET_ID, value);
    }

    public int getMaxLeases() {
      return this.maxLeases;
    }

    public acquireSemaphore_args setMaxLeases(int maxLeases) {
      this.maxLeases = maxLeases;
      setMaxLeasesIsSet(true);
      return this;
    }

    public void unsetMaxLeases() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXLEASES_ISSET_ID);
    }

    /** Returns true if field maxLeases is set (has been assigned a value) and false otherwise */
    public boolean isSetMaxLeases() {
      return EncodingUtils.testBit(__isset_bitfield, __MAXLEASES_ISSET_ID);
    }

    public void setMaxLeasesIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXLEASES_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case PATH:
        if (value == null) {
          unsetPath();
        } else {
          setPath((String)value);
        }
        break;

      case ACQUIRE_QTY:
        if (value == null) {
          unsetAcquireQty();
        } else {
          setAcquireQty((Integer)value);
        }
        break;

      case MAX_WAIT_MS:
        if (value == null) {
          unsetMaxWaitMs();
        } else {
          setMaxWaitMs((Integer)value);
        }
        break;

      case MAX_LEASES:
        if (value == null) {
          unsetMaxLeases();
        } else {
          setMaxLeases((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case PATH:
        return getPath();

      case ACQUIRE_QTY:
        return Integer.valueOf(getAcquireQty());

      case MAX_WAIT_MS:
        return Integer.valueOf(getMaxWaitMs());

      case MAX_LEASES:
        return Integer.valueOf(getMaxLeases());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case PATH:
        return isSetPath();
      case ACQUIRE_QTY:
        return isSetAcquireQty();
      case MAX_WAIT_MS:
        return isSetMaxWaitMs();
      case MAX_LEASES:
        return isSetMaxLeases();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof acquireSemaphore_args)
        return this.equals((acquireSemaphore_args)that);
      return false;
    }

    public boolean equals(acquireSemaphore_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_path = true && this.isSetPath();
      boolean that_present_path = true && that.isSetPath();
      if (this_present_path || that_present_path) {
        if (!(this_present_path && that_present_path))
          return false;
        if (!this.path.equals(that.path))
          return false;
      }

      boolean this_present_acquireQty = true;
      boolean that_present_acquireQty = true;
      if (this_present_acquireQty || that_present_acquireQty) {
        if (!(this_present_acquireQty && that_present_acquireQty))
          return false;
        if (this.acquireQty != that.acquireQty)
          return false;
      }

      boolean this_present_maxWaitMs = true;
      boolean that_present_maxWaitMs = true;
      if (this_present_maxWaitMs || that_present_maxWaitMs) {
        if (!(this_present_maxWaitMs && that_present_maxWaitMs))
          return false;
        if (this.maxWaitMs != that.maxWaitMs)
          return false;
      }

      boolean this_present_maxLeases = true;
      boolean that_present_maxLeases = true;
      if (this_present_maxLeases || that_present_maxLeases) {
        if (!(this_present_maxLeases && that_present_maxLeases))
          return false;
        if (this.maxLeases != that.maxLeases)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(acquireSemaphore_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPath()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAcquireQty()).compareTo(other.isSetAcquireQty());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAcquireQty()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acquireQty, other.acquireQty);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMaxWaitMs()).compareTo(other.isSetMaxWaitMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMaxWaitMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxWaitMs, other.maxWaitMs);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMaxLeases()).compareTo(other.isSetMaxLeases());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMaxLeases()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxLeases, other.maxLeases);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("acquireSemaphore_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("path:");
      if (this.path == null) {
        sb.append("null");
      } else {
        sb.append(this.path);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("acquireQty:");
      sb.append(this.acquireQty);
      first = false;
      if (!first) sb.append(", ");
      sb.append("maxWaitMs:");
      sb.append(this.maxWaitMs);
      first = false;
      if (!first) sb.append(", ");
      sb.append("maxLeases:");
      sb.append(this.maxLeases);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bitfield = 0;
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class acquireSemaphore_argsStandardSchemeFactory implements SchemeFactory {
      public acquireSemaphore_argsStandardScheme getScheme() {
        return new acquireSemaphore_argsStandardScheme();
      }
    }

    private static class acquireSemaphore_argsStandardScheme extends StandardScheme<acquireSemaphore_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, acquireSemaphore_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // PATH
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.path = iprot.readString();
                struct.setPathIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ACQUIRE_QTY
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.acquireQty = iprot.readI32();
                struct.setAcquireQtyIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // MAX_WAIT_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.maxWaitMs = iprot.readI32();
                struct.setMaxWaitMsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 5: // MAX_LEASES
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.maxLeases = iprot.readI32();
                struct.setMaxLeasesIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, acquireSemaphore_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.path != null) {
          oprot.writeFieldBegin(PATH_FIELD_DESC);
          oprot.writeString(struct.path);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(ACQUIRE_QTY_FIELD_DESC);
        oprot.writeI32(struct.acquireQty);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(MAX_WAIT_MS_FIELD_DESC);
        oprot.writeI32(struct.maxWaitMs);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(MAX_LEASES_FIELD_DESC);
        oprot.writeI32(struct.maxLeases);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class acquireSemaphore_argsTupleSchemeFactory implements SchemeFactory {
      public acquireSemaphore_argsTupleScheme getScheme() {
        return new acquireSemaphore_argsTupleScheme();
      }
    }

    private static class acquireSemaphore_argsTupleScheme extends TupleScheme<acquireSemaphore_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, acquireSemaphore_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetPath()) {
          optionals.set(1);
        }
        if (struct.isSetAcquireQty()) {
          optionals.set(2);
        }
        if (struct.isSetMaxWaitMs()) {
          optionals.set(3);
        }
        if (struct.isSetMaxLeases()) {
          optionals.set(4);
        }
        oprot.writeBitSet(optionals, 5);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetPath()) {
          oprot.writeString(struct.path);
        }
        if (struct.isSetAcquireQty()) {
          oprot.writeI32(struct.acquireQty);
        }
        if (struct.isSetMaxWaitMs()) {
          oprot.writeI32(struct.maxWaitMs);
        }
        if (struct.isSetMaxLeases()) {
          oprot.writeI32(struct.maxLeases);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, acquireSemaphore_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(5);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.path = iprot.readString();
          struct.setPathIsSet(true);
        }
        if (incoming.get(2)) {
          struct.acquireQty = iprot.readI32();
          struct.setAcquireQtyIsSet(true);
        }
        if (incoming.get(3)) {
          struct.maxWaitMs = iprot.readI32();
          struct.setMaxWaitMsIsSet(true);
        }
        if (incoming.get(4)) {
          struct.maxLeases = iprot.readI32();
          struct.setMaxLeasesIsSet(true);
        }
      }
    }

  }

  public static class acquireSemaphore_result implements org.apache.thrift.TBase<acquireSemaphore_result, acquireSemaphore_result._Fields>, java.io.Serializable, Cloneable, Comparable<acquireSemaphore_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("acquireSemaphore_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new acquireSemaphore_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new acquireSemaphore_resultTupleSchemeFactory());
    }

    public List<LeaseProjection> success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LeaseProjection.class))));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(acquireSemaphore_result.class, metaDataMap);
    }

    public acquireSemaphore_result() {
    }

    public acquireSemaphore_result(
      List<LeaseProjection> success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public acquireSemaphore_result(acquireSemaphore_result other) {
      if (other.isSetSuccess()) {
        List<LeaseProjection> __this__success = new ArrayList<LeaseProjection>(other.success.size());
        for (LeaseProjection other_element : other.success) {
          __this__success.add(new LeaseProjection(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public acquireSemaphore_result deepCopy() {
      return new acquireSemaphore_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<LeaseProjection> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(LeaseProjection elem) {
      if (this.success == null) {
        this.success = new ArrayList<LeaseProjection>();
      }
      this.success.add(elem);
    }

    public List<LeaseProjection> getSuccess() {
      return this.success;
    }

    public acquireSemaphore_result setSuccess(List<LeaseProjection> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public acquireSemaphore_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<LeaseProjection>)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof acquireSemaphore_result)
        return this.equals((acquireSemaphore_result)that);
      return false;
    }

    public boolean equals(acquireSemaphore_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(acquireSemaphore_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("acquireSemaphore_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class acquireSemaphore_resultStandardSchemeFactory implements SchemeFactory {
      public acquireSemaphore_resultStandardScheme getScheme() {
        return new acquireSemaphore_resultStandardScheme();
      }
    }

    private static class acquireSemaphore_resultStandardScheme extends StandardScheme<acquireSemaphore_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, acquireSemaphore_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
                  struct.success = new ArrayList<LeaseProjection>(_list24.size);
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
                  {
                    LeaseProjection _elem26;
                    _elem26 = new LeaseProjection();
                    _elem26.read(iprot);
                    struct.success.add(_elem26);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, acquireSemaphore_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (LeaseProjection _iter27 : struct.success)
            {
              _iter27.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class acquireSemaphore_resultTupleSchemeFactory implements SchemeFactory {
      public acquireSemaphore_resultTupleScheme getScheme() {
        return new acquireSemaphore_resultTupleScheme();
      }
    }

    private static class acquireSemaphore_resultTupleScheme extends TupleScheme<acquireSemaphore_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, acquireSemaphore_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (LeaseProjection _iter28 : struct.success)
            {
              _iter28.write(oprot);
            }
          }
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, acquireSemaphore_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<LeaseProjection>(_list29.size);
            for (int _i30 = 0; _i30 < _list29.size; ++_i30)
            {
              LeaseProjection _elem31;
              _elem31 = new LeaseProjection();
              _elem31.read(iprot);
              struct.success.add(_elem31);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class closeCuratorProjection_args implements org.apache.thrift.TBase<closeCuratorProjection_args, closeCuratorProjection_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeCuratorProjection_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeCuratorProjection_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new closeCuratorProjection_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new closeCuratorProjection_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeCuratorProjection_args.class, metaDataMap);
    }

    public closeCuratorProjection_args() {
    }

    public closeCuratorProjection_args(
      CuratorProjection projection)
    {
      this();
      this.projection = projection;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public closeCuratorProjection_args(closeCuratorProjection_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
    }

    public closeCuratorProjection_args deepCopy() {
      return new closeCuratorProjection_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public closeCuratorProjection_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof closeCuratorProjection_args)
        return this.equals((closeCuratorProjection_args)that);
      return false;
    }

    public boolean equals(closeCuratorProjection_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(closeCuratorProjection_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("closeCuratorProjection_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class closeCuratorProjection_argsStandardSchemeFactory implements SchemeFactory {
      public closeCuratorProjection_argsStandardScheme getScheme() {
        return new closeCuratorProjection_argsStandardScheme();
      }
    }

    private static class closeCuratorProjection_argsStandardScheme extends StandardScheme<closeCuratorProjection_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, closeCuratorProjection_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, closeCuratorProjection_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class closeCuratorProjection_argsTupleSchemeFactory implements SchemeFactory {
      public closeCuratorProjection_argsTupleScheme getScheme() {
        return new closeCuratorProjection_argsTupleScheme();
      }
    }

    private static class closeCuratorProjection_argsTupleScheme extends TupleScheme<closeCuratorProjection_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, closeCuratorProjection_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, closeCuratorProjection_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
      }
    }

  }

  public static class closeCuratorProjection_result implements org.apache.thrift.TBase<closeCuratorProjection_result, closeCuratorProjection_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeCuratorProjection_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeCuratorProjection_result");


    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new closeCuratorProjection_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new closeCuratorProjection_resultTupleSchemeFactory());
    }


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeCuratorProjection_result.class, metaDataMap);
    }

    public closeCuratorProjection_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public closeCuratorProjection_result(closeCuratorProjection_result other) {
    }

    public closeCuratorProjection_result deepCopy() {
      return new closeCuratorProjection_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof closeCuratorProjection_result)
        return this.equals((closeCuratorProjection_result)that);
      return false;
    }

    public boolean equals(closeCuratorProjection_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(closeCuratorProjection_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("closeCuratorProjection_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class closeCuratorProjection_resultStandardSchemeFactory implements SchemeFactory {
      public closeCuratorProjection_resultStandardScheme getScheme() {
        return new closeCuratorProjection_resultStandardScheme();
      }
    }

    private static class closeCuratorProjection_resultStandardScheme extends StandardScheme<closeCuratorProjection_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, closeCuratorProjection_result 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) {
            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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, closeCuratorProjection_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class closeCuratorProjection_resultTupleSchemeFactory implements SchemeFactory {
      public closeCuratorProjection_resultTupleScheme getScheme() {
        return new closeCuratorProjection_resultTupleScheme();
      }
    }

    private static class closeCuratorProjection_resultTupleScheme extends TupleScheme<closeCuratorProjection_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, closeCuratorProjection_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, closeCuratorProjection_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

  public static class closeGenericProjection_args implements org.apache.thrift.TBase<closeGenericProjection_args, closeGenericProjection_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeGenericProjection_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeGenericProjection_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new closeGenericProjection_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new closeGenericProjection_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public String id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      ID((short)2, "id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // ID
            return ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeGenericProjection_args.class, metaDataMap);
    }

    public closeGenericProjection_args() {
    }

    public closeGenericProjection_args(
      CuratorProjection projection,
      String id)
    {
      this();
      this.projection = projection;
      this.id = id;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public closeGenericProjection_args(closeGenericProjection_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetId()) {
        this.id = other.id;
      }
    }

    public closeGenericProjection_args deepCopy() {
      return new closeGenericProjection_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.id = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public closeGenericProjection_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public String getId() {
      return this.id;
    }

    public closeGenericProjection_args setId(String id) {
      this.id = id;
      return this;
    }

    public void unsetId() {
      this.id = null;
    }

    /** Returns true if field id is set (has been assigned a value) and false otherwise */
    public boolean isSetId() {
      return this.id != null;
    }

    public void setIdIsSet(boolean value) {
      if (!value) {
        this.id = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case ID:
        if (value == null) {
          unsetId();
        } else {
          setId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case ID:
        return getId();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case ID:
        return isSetId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof closeGenericProjection_args)
        return this.equals((closeGenericProjection_args)that);
      return false;
    }

    public boolean equals(closeGenericProjection_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_id = true && this.isSetId();
      boolean that_present_id = true && that.isSetId();
      if (this_present_id || that_present_id) {
        if (!(this_present_id && that_present_id))
          return false;
        if (!this.id.equals(that.id))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(closeGenericProjection_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("closeGenericProjection_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("id:");
      if (this.id == null) {
        sb.append("null");
      } else {
        sb.append(this.id);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class closeGenericProjection_argsStandardSchemeFactory implements SchemeFactory {
      public closeGenericProjection_argsStandardScheme getScheme() {
        return new closeGenericProjection_argsStandardScheme();
      }
    }

    private static class closeGenericProjection_argsStandardScheme extends StandardScheme<closeGenericProjection_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, closeGenericProjection_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.id = iprot.readString();
                struct.setIdIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, closeGenericProjection_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.id != null) {
          oprot.writeFieldBegin(ID_FIELD_DESC);
          oprot.writeString(struct.id);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class closeGenericProjection_argsTupleSchemeFactory implements SchemeFactory {
      public closeGenericProjection_argsTupleScheme getScheme() {
        return new closeGenericProjection_argsTupleScheme();
      }
    }

    private static class closeGenericProjection_argsTupleScheme extends TupleScheme<closeGenericProjection_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, closeGenericProjection_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetId()) {
          oprot.writeString(struct.id);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, closeGenericProjection_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.id = iprot.readString();
          struct.setIdIsSet(true);
        }
      }
    }

  }

  public static class closeGenericProjection_result implements org.apache.thrift.TBase<closeGenericProjection_result, closeGenericProjection_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeGenericProjection_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeGenericProjection_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new closeGenericProjection_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new closeGenericProjection_resultTupleSchemeFactory());
    }

    public boolean success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeGenericProjection_result.class, metaDataMap);
    }

    public closeGenericProjection_result() {
    }

    public closeGenericProjection_result(
      boolean success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public closeGenericProjection_result(closeGenericProjection_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public closeGenericProjection_result deepCopy() {
      return new closeGenericProjection_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.ex1 = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public closeGenericProjection_result setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public closeGenericProjection_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof closeGenericProjection_result)
        return this.equals((closeGenericProjection_result)that);
      return false;
    }

    public boolean equals(closeGenericProjection_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(closeGenericProjection_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("closeGenericProjection_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bitfield = 0;
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class closeGenericProjection_resultStandardSchemeFactory implements SchemeFactory {
      public closeGenericProjection_resultStandardScheme getScheme() {
        return new closeGenericProjection_resultStandardScheme();
      }
    }

    private static class closeGenericProjection_resultStandardScheme extends StandardScheme<closeGenericProjection_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, closeGenericProjection_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                struct.success = iprot.readBool();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, closeGenericProjection_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeBool(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class closeGenericProjection_resultTupleSchemeFactory implements SchemeFactory {
      public closeGenericProjection_resultTupleScheme getScheme() {
        return new closeGenericProjection_resultTupleScheme();
      }
    }

    private static class closeGenericProjection_resultTupleScheme extends TupleScheme<closeGenericProjection_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, closeGenericProjection_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          oprot.writeBool(struct.success);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, closeGenericProjection_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = iprot.readBool();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class createNode_args implements org.apache.thrift.TBase<createNode_args, createNode_args._Fields>, java.io.Serializable, Cloneable, Comparable<createNode_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createNode_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new createNode_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new createNode_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public CreateSpec spec; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      SPEC((short)2, "spec");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // SPEC
            return SPEC;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CreateSpec.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createNode_args.class, metaDataMap);
    }

    public createNode_args() {
    }

    public createNode_args(
      CuratorProjection projection,
      CreateSpec spec)
    {
      this();
      this.projection = projection;
      this.spec = spec;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createNode_args(createNode_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetSpec()) {
        this.spec = new CreateSpec(other.spec);
      }
    }

    public createNode_args deepCopy() {
      return new createNode_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.spec = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public createNode_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public CreateSpec getSpec() {
      return this.spec;
    }

    public createNode_args setSpec(CreateSpec spec) {
      this.spec = spec;
      return this;
    }

    public void unsetSpec() {
      this.spec = null;
    }

    /** Returns true if field spec is set (has been assigned a value) and false otherwise */
    public boolean isSetSpec() {
      return this.spec != null;
    }

    public void setSpecIsSet(boolean value) {
      if (!value) {
        this.spec = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case SPEC:
        if (value == null) {
          unsetSpec();
        } else {
          setSpec((CreateSpec)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case SPEC:
        return getSpec();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case SPEC:
        return isSetSpec();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createNode_args)
        return this.equals((createNode_args)that);
      return false;
    }

    public boolean equals(createNode_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_spec = true && this.isSetSpec();
      boolean that_present_spec = true && that.isSetSpec();
      if (this_present_spec || that_present_spec) {
        if (!(this_present_spec && that_present_spec))
          return false;
        if (!this.spec.equals(that.spec))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(createNode_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSpec()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createNode_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("spec:");
      if (this.spec == null) {
        sb.append("null");
      } else {
        sb.append(this.spec);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
      if (spec != null) {
        spec.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class createNode_argsStandardSchemeFactory implements SchemeFactory {
      public createNode_argsStandardScheme getScheme() {
        return new createNode_argsStandardScheme();
      }
    }

    private static class createNode_argsStandardScheme extends StandardScheme<createNode_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, createNode_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SPEC
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.spec = new CreateSpec();
                struct.spec.read(iprot);
                struct.setSpecIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, createNode_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.spec != null) {
          oprot.writeFieldBegin(SPEC_FIELD_DESC);
          struct.spec.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class createNode_argsTupleSchemeFactory implements SchemeFactory {
      public createNode_argsTupleScheme getScheme() {
        return new createNode_argsTupleScheme();
      }
    }

    private static class createNode_argsTupleScheme extends TupleScheme<createNode_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, createNode_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetSpec()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetSpec()) {
          struct.spec.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, createNode_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.spec = new CreateSpec();
          struct.spec.read(iprot);
          struct.setSpecIsSet(true);
        }
      }
    }

  }

  public static class createNode_result implements org.apache.thrift.TBase<createNode_result, createNode_result._Fields>, java.io.Serializable, Cloneable, Comparable<createNode_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createNode_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new createNode_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new createNode_resultTupleSchemeFactory());
    }

    public OptionalPath success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalPath.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createNode_result.class, metaDataMap);
    }

    public createNode_result() {
    }

    public createNode_result(
      OptionalPath success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createNode_result(createNode_result other) {
      if (other.isSetSuccess()) {
        this.success = new OptionalPath(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public createNode_result deepCopy() {
      return new createNode_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public OptionalPath getSuccess() {
      return this.success;
    }

    public createNode_result setSuccess(OptionalPath success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public createNode_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((OptionalPath)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof createNode_result)
        return this.equals((createNode_result)that);
      return false;
    }

    public boolean equals(createNode_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(createNode_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("createNode_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class createNode_resultStandardSchemeFactory implements SchemeFactory {
      public createNode_resultStandardScheme getScheme() {
        return new createNode_resultStandardScheme();
      }
    }

    private static class createNode_resultStandardScheme extends StandardScheme<createNode_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, createNode_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new OptionalPath();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, createNode_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class createNode_resultTupleSchemeFactory implements SchemeFactory {
      public createNode_resultTupleScheme getScheme() {
        return new createNode_resultTupleScheme();
      }
    }

    private static class createNode_resultTupleScheme extends TupleScheme<createNode_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, createNode_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, createNode_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new OptionalPath();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class deleteNode_args implements org.apache.thrift.TBase<deleteNode_args, deleteNode_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteNode_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteNode_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new deleteNode_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteNode_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public DeleteSpec spec; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      SPEC((short)2, "spec");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // SPEC
            return SPEC;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DeleteSpec.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteNode_args.class, metaDataMap);
    }

    public deleteNode_args() {
    }

    public deleteNode_args(
      CuratorProjection projection,
      DeleteSpec spec)
    {
      this();
      this.projection = projection;
      this.spec = spec;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteNode_args(deleteNode_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetSpec()) {
        this.spec = new DeleteSpec(other.spec);
      }
    }

    public deleteNode_args deepCopy() {
      return new deleteNode_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.spec = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public deleteNode_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public DeleteSpec getSpec() {
      return this.spec;
    }

    public deleteNode_args setSpec(DeleteSpec spec) {
      this.spec = spec;
      return this;
    }

    public void unsetSpec() {
      this.spec = null;
    }

    /** Returns true if field spec is set (has been assigned a value) and false otherwise */
    public boolean isSetSpec() {
      return this.spec != null;
    }

    public void setSpecIsSet(boolean value) {
      if (!value) {
        this.spec = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case SPEC:
        if (value == null) {
          unsetSpec();
        } else {
          setSpec((DeleteSpec)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case SPEC:
        return getSpec();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case SPEC:
        return isSetSpec();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteNode_args)
        return this.equals((deleteNode_args)that);
      return false;
    }

    public boolean equals(deleteNode_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_spec = true && this.isSetSpec();
      boolean that_present_spec = true && that.isSetSpec();
      if (this_present_spec || that_present_spec) {
        if (!(this_present_spec && that_present_spec))
          return false;
        if (!this.spec.equals(that.spec))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(deleteNode_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSpec()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteNode_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("spec:");
      if (this.spec == null) {
        sb.append("null");
      } else {
        sb.append(this.spec);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
      if (spec != null) {
        spec.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class deleteNode_argsStandardSchemeFactory implements SchemeFactory {
      public deleteNode_argsStandardScheme getScheme() {
        return new deleteNode_argsStandardScheme();
      }
    }

    private static class deleteNode_argsStandardScheme extends StandardScheme<deleteNode_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, deleteNode_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SPEC
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.spec = new DeleteSpec();
                struct.spec.read(iprot);
                struct.setSpecIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, deleteNode_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.spec != null) {
          oprot.writeFieldBegin(SPEC_FIELD_DESC);
          struct.spec.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteNode_argsTupleSchemeFactory implements SchemeFactory {
      public deleteNode_argsTupleScheme getScheme() {
        return new deleteNode_argsTupleScheme();
      }
    }

    private static class deleteNode_argsTupleScheme extends TupleScheme<deleteNode_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, deleteNode_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetSpec()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetSpec()) {
          struct.spec.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, deleteNode_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.spec = new DeleteSpec();
          struct.spec.read(iprot);
          struct.setSpecIsSet(true);
        }
      }
    }

  }

  public static class deleteNode_result implements org.apache.thrift.TBase<deleteNode_result, deleteNode_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteNode_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteNode_result");

    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new deleteNode_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteNode_resultTupleSchemeFactory());
    }

    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteNode_result.class, metaDataMap);
    }

    public deleteNode_result() {
    }

    public deleteNode_result(
      CuratorException ex1)
    {
      this();
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteNode_result(deleteNode_result other) {
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public deleteNode_result deepCopy() {
      return new deleteNode_result(this);
    }

    @Override
    public void clear() {
      this.ex1 = null;
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public deleteNode_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteNode_result)
        return this.equals((deleteNode_result)that);
      return false;
    }

    public boolean equals(deleteNode_result that) {
      if (that == null)
        return false;

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(deleteNode_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteNode_result(");
      boolean first = true;

      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class deleteNode_resultStandardSchemeFactory implements SchemeFactory {
      public deleteNode_resultStandardScheme getScheme() {
        return new deleteNode_resultStandardScheme();
      }
    }

    private static class deleteNode_resultStandardScheme extends StandardScheme<deleteNode_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, deleteNode_result 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: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, deleteNode_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteNode_resultTupleSchemeFactory implements SchemeFactory {
      public deleteNode_resultTupleScheme getScheme() {
        return new deleteNode_resultTupleScheme();
      }
    }

    private static class deleteNode_resultTupleScheme extends TupleScheme<deleteNode_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, deleteNode_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetEx1()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, deleteNode_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class exists_args implements org.apache.thrift.TBase<exists_args, exists_args._Fields>, java.io.Serializable, Cloneable, Comparable<exists_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new exists_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new exists_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public ExistsSpec spec; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      SPEC((short)2, "spec");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // SPEC
            return SPEC;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExistsSpec.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_args.class, metaDataMap);
    }

    public exists_args() {
    }

    public exists_args(
      CuratorProjection projection,
      ExistsSpec spec)
    {
      this();
      this.projection = projection;
      this.spec = spec;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public exists_args(exists_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetSpec()) {
        this.spec = new ExistsSpec(other.spec);
      }
    }

    public exists_args deepCopy() {
      return new exists_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.spec = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public exists_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public ExistsSpec getSpec() {
      return this.spec;
    }

    public exists_args setSpec(ExistsSpec spec) {
      this.spec = spec;
      return this;
    }

    public void unsetSpec() {
      this.spec = null;
    }

    /** Returns true if field spec is set (has been assigned a value) and false otherwise */
    public boolean isSetSpec() {
      return this.spec != null;
    }

    public void setSpecIsSet(boolean value) {
      if (!value) {
        this.spec = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case SPEC:
        if (value == null) {
          unsetSpec();
        } else {
          setSpec((ExistsSpec)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case SPEC:
        return getSpec();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case SPEC:
        return isSetSpec();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof exists_args)
        return this.equals((exists_args)that);
      return false;
    }

    public boolean equals(exists_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_spec = true && this.isSetSpec();
      boolean that_present_spec = true && that.isSetSpec();
      if (this_present_spec || that_present_spec) {
        if (!(this_present_spec && that_present_spec))
          return false;
        if (!this.spec.equals(that.spec))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(exists_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSpec()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("exists_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("spec:");
      if (this.spec == null) {
        sb.append("null");
      } else {
        sb.append(this.spec);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
      if (spec != null) {
        spec.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class exists_argsStandardSchemeFactory implements SchemeFactory {
      public exists_argsStandardScheme getScheme() {
        return new exists_argsStandardScheme();
      }
    }

    private static class exists_argsStandardScheme extends StandardScheme<exists_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, exists_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SPEC
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.spec = new ExistsSpec();
                struct.spec.read(iprot);
                struct.setSpecIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, exists_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.spec != null) {
          oprot.writeFieldBegin(SPEC_FIELD_DESC);
          struct.spec.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class exists_argsTupleSchemeFactory implements SchemeFactory {
      public exists_argsTupleScheme getScheme() {
        return new exists_argsTupleScheme();
      }
    }

    private static class exists_argsTupleScheme extends TupleScheme<exists_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetSpec()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetSpec()) {
          struct.spec.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.spec = new ExistsSpec();
          struct.spec.read(iprot);
          struct.setSpecIsSet(true);
        }
      }
    }

  }

  public static class exists_result implements org.apache.thrift.TBase<exists_result, exists_result._Fields>, java.io.Serializable, Cloneable, Comparable<exists_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new exists_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new exists_resultTupleSchemeFactory());
    }

    public OptionalStat success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalStat.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_result.class, metaDataMap);
    }

    public exists_result() {
    }

    public exists_result(
      OptionalStat success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public exists_result(exists_result other) {
      if (other.isSetSuccess()) {
        this.success = new OptionalStat(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public exists_result deepCopy() {
      return new exists_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public OptionalStat getSuccess() {
      return this.success;
    }

    public exists_result setSuccess(OptionalStat success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public exists_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((OptionalStat)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof exists_result)
        return this.equals((exists_result)that);
      return false;
    }

    public boolean equals(exists_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(exists_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("exists_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class exists_resultStandardSchemeFactory implements SchemeFactory {
      public exists_resultStandardScheme getScheme() {
        return new exists_resultStandardScheme();
      }
    }

    private static class exists_resultStandardScheme extends StandardScheme<exists_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, exists_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new OptionalStat();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, exists_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class exists_resultTupleSchemeFactory implements SchemeFactory {
      public exists_resultTupleScheme getScheme() {
        return new exists_resultTupleScheme();
      }
    }

    private static class exists_resultTupleScheme extends TupleScheme<exists_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new OptionalStat();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class getChildren_args implements org.apache.thrift.TBase<getChildren_args, getChildren_args._Fields>, java.io.Serializable, Cloneable, Comparable<getChildren_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getChildren_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getChildren_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getChildren_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public GetChildrenSpec spec; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      SPEC((short)2, "spec");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // SPEC
            return SPEC;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetChildrenSpec.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getChildren_args.class, metaDataMap);
    }

    public getChildren_args() {
    }

    public getChildren_args(
      CuratorProjection projection,
      GetChildrenSpec spec)
    {
      this();
      this.projection = projection;
      this.spec = spec;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getChildren_args(getChildren_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetSpec()) {
        this.spec = new GetChildrenSpec(other.spec);
      }
    }

    public getChildren_args deepCopy() {
      return new getChildren_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.spec = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public getChildren_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public GetChildrenSpec getSpec() {
      return this.spec;
    }

    public getChildren_args setSpec(GetChildrenSpec spec) {
      this.spec = spec;
      return this;
    }

    public void unsetSpec() {
      this.spec = null;
    }

    /** Returns true if field spec is set (has been assigned a value) and false otherwise */
    public boolean isSetSpec() {
      return this.spec != null;
    }

    public void setSpecIsSet(boolean value) {
      if (!value) {
        this.spec = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case SPEC:
        if (value == null) {
          unsetSpec();
        } else {
          setSpec((GetChildrenSpec)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case SPEC:
        return getSpec();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case SPEC:
        return isSetSpec();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getChildren_args)
        return this.equals((getChildren_args)that);
      return false;
    }

    public boolean equals(getChildren_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_spec = true && this.isSetSpec();
      boolean that_present_spec = true && that.isSetSpec();
      if (this_present_spec || that_present_spec) {
        if (!(this_present_spec && that_present_spec))
          return false;
        if (!this.spec.equals(that.spec))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getChildren_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSpec()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getChildren_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("spec:");
      if (this.spec == null) {
        sb.append("null");
      } else {
        sb.append(this.spec);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
      if (spec != null) {
        spec.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getChildren_argsStandardSchemeFactory implements SchemeFactory {
      public getChildren_argsStandardScheme getScheme() {
        return new getChildren_argsStandardScheme();
      }
    }

    private static class getChildren_argsStandardScheme extends StandardScheme<getChildren_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getChildren_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SPEC
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.spec = new GetChildrenSpec();
                struct.spec.read(iprot);
                struct.setSpecIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getChildren_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.spec != null) {
          oprot.writeFieldBegin(SPEC_FIELD_DESC);
          struct.spec.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getChildren_argsTupleSchemeFactory implements SchemeFactory {
      public getChildren_argsTupleScheme getScheme() {
        return new getChildren_argsTupleScheme();
      }
    }

    private static class getChildren_argsTupleScheme extends TupleScheme<getChildren_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getChildren_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetSpec()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetSpec()) {
          struct.spec.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getChildren_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.spec = new GetChildrenSpec();
          struct.spec.read(iprot);
          struct.setSpecIsSet(true);
        }
      }
    }

  }

  public static class getChildren_result implements org.apache.thrift.TBase<getChildren_result, getChildren_result._Fields>, java.io.Serializable, Cloneable, Comparable<getChildren_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getChildren_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getChildren_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getChildren_resultTupleSchemeFactory());
    }

    public OptionalChildrenList success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalChildrenList.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getChildren_result.class, metaDataMap);
    }

    public getChildren_result() {
    }

    public getChildren_result(
      OptionalChildrenList success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getChildren_result(getChildren_result other) {
      if (other.isSetSuccess()) {
        this.success = new OptionalChildrenList(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public getChildren_result deepCopy() {
      return new getChildren_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public OptionalChildrenList getSuccess() {
      return this.success;
    }

    public getChildren_result setSuccess(OptionalChildrenList success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public getChildren_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((OptionalChildrenList)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getChildren_result)
        return this.equals((getChildren_result)that);
      return false;
    }

    public boolean equals(getChildren_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getChildren_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getChildren_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getChildren_resultStandardSchemeFactory implements SchemeFactory {
      public getChildren_resultStandardScheme getScheme() {
        return new getChildren_resultStandardScheme();
      }
    }

    private static class getChildren_resultStandardScheme extends StandardScheme<getChildren_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getChildren_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new OptionalChildrenList();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getChildren_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getChildren_resultTupleSchemeFactory implements SchemeFactory {
      public getChildren_resultTupleScheme getScheme() {
        return new getChildren_resultTupleScheme();
      }
    }

    private static class getChildren_resultTupleScheme extends TupleScheme<getChildren_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getChildren_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getChildren_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new OptionalChildrenList();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class getData_args implements org.apache.thrift.TBase<getData_args, getData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getData_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getData_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getData_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getData_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public GetDataSpec spec; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      SPEC((short)2, "spec");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // SPEC
            return SPEC;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetDataSpec.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getData_args.class, metaDataMap);
    }

    public getData_args() {
    }

    public getData_args(
      CuratorProjection projection,
      GetDataSpec spec)
    {
      this();
      this.projection = projection;
      this.spec = spec;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getData_args(getData_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetSpec()) {
        this.spec = new GetDataSpec(other.spec);
      }
    }

    public getData_args deepCopy() {
      return new getData_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.spec = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public getData_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public GetDataSpec getSpec() {
      return this.spec;
    }

    public getData_args setSpec(GetDataSpec spec) {
      this.spec = spec;
      return this;
    }

    public void unsetSpec() {
      this.spec = null;
    }

    /** Returns true if field spec is set (has been assigned a value) and false otherwise */
    public boolean isSetSpec() {
      return this.spec != null;
    }

    public void setSpecIsSet(boolean value) {
      if (!value) {
        this.spec = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case SPEC:
        if (value == null) {
          unsetSpec();
        } else {
          setSpec((GetDataSpec)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case SPEC:
        return getSpec();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case SPEC:
        return isSetSpec();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getData_args)
        return this.equals((getData_args)that);
      return false;
    }

    public boolean equals(getData_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_spec = true && this.isSetSpec();
      boolean that_present_spec = true && that.isSetSpec();
      if (this_present_spec || that_present_spec) {
        if (!(this_present_spec && that_present_spec))
          return false;
        if (!this.spec.equals(that.spec))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getData_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSpec()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getData_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("spec:");
      if (this.spec == null) {
        sb.append("null");
      } else {
        sb.append(this.spec);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
      if (spec != null) {
        spec.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getData_argsStandardSchemeFactory implements SchemeFactory {
      public getData_argsStandardScheme getScheme() {
        return new getData_argsStandardScheme();
      }
    }

    private static class getData_argsStandardScheme extends StandardScheme<getData_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getData_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SPEC
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.spec = new GetDataSpec();
                struct.spec.read(iprot);
                struct.setSpecIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getData_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.spec != null) {
          oprot.writeFieldBegin(SPEC_FIELD_DESC);
          struct.spec.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getData_argsTupleSchemeFactory implements SchemeFactory {
      public getData_argsTupleScheme getScheme() {
        return new getData_argsTupleScheme();
      }
    }

    private static class getData_argsTupleScheme extends TupleScheme<getData_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getData_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetSpec()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetSpec()) {
          struct.spec.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getData_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.spec = new GetDataSpec();
          struct.spec.read(iprot);
          struct.setSpecIsSet(true);
        }
      }
    }

  }

  public static class getData_result implements org.apache.thrift.TBase<getData_result, getData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getData_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getData_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getData_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getData_resultTupleSchemeFactory());
    }

    public OptionalData success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalData.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getData_result.class, metaDataMap);
    }

    public getData_result() {
    }

    public getData_result(
      OptionalData success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getData_result(getData_result other) {
      if (other.isSetSuccess()) {
        this.success = new OptionalData(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public getData_result deepCopy() {
      return new getData_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public OptionalData getSuccess() {
      return this.success;
    }

    public getData_result setSuccess(OptionalData success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public getData_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((OptionalData)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getData_result)
        return this.equals((getData_result)that);
      return false;
    }

    public boolean equals(getData_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getData_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getData_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getData_resultStandardSchemeFactory implements SchemeFactory {
      public getData_resultStandardScheme getScheme() {
        return new getData_resultStandardScheme();
      }
    }

    private static class getData_resultStandardScheme extends StandardScheme<getData_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getData_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new OptionalData();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getData_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getData_resultTupleSchemeFactory implements SchemeFactory {
      public getData_resultTupleScheme getScheme() {
        return new getData_resultTupleScheme();
      }
    }

    private static class getData_resultTupleScheme extends TupleScheme<getData_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getData_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getData_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new OptionalData();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class getLeaderParticipants_args implements org.apache.thrift.TBase<getLeaderParticipants_args, getLeaderParticipants_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLeaderParticipants_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLeaderParticipants_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField LEADER_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("leaderProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getLeaderParticipants_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getLeaderParticipants_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public LeaderProjection leaderProjection; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      LEADER_PROJECTION((short)2, "leaderProjection");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // LEADER_PROJECTION
            return LEADER_PROJECTION;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.LEADER_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("leaderProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LeaderProjection.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLeaderParticipants_args.class, metaDataMap);
    }

    public getLeaderParticipants_args() {
    }

    public getLeaderParticipants_args(
      CuratorProjection projection,
      LeaderProjection leaderProjection)
    {
      this();
      this.projection = projection;
      this.leaderProjection = leaderProjection;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLeaderParticipants_args(getLeaderParticipants_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetLeaderProjection()) {
        this.leaderProjection = new LeaderProjection(other.leaderProjection);
      }
    }

    public getLeaderParticipants_args deepCopy() {
      return new getLeaderParticipants_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.leaderProjection = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public getLeaderParticipants_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public LeaderProjection getLeaderProjection() {
      return this.leaderProjection;
    }

    public getLeaderParticipants_args setLeaderProjection(LeaderProjection leaderProjection) {
      this.leaderProjection = leaderProjection;
      return this;
    }

    public void unsetLeaderProjection() {
      this.leaderProjection = null;
    }

    /** Returns true if field leaderProjection is set (has been assigned a value) and false otherwise */
    public boolean isSetLeaderProjection() {
      return this.leaderProjection != null;
    }

    public void setLeaderProjectionIsSet(boolean value) {
      if (!value) {
        this.leaderProjection = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case LEADER_PROJECTION:
        if (value == null) {
          unsetLeaderProjection();
        } else {
          setLeaderProjection((LeaderProjection)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case LEADER_PROJECTION:
        return getLeaderProjection();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case LEADER_PROJECTION:
        return isSetLeaderProjection();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getLeaderParticipants_args)
        return this.equals((getLeaderParticipants_args)that);
      return false;
    }

    public boolean equals(getLeaderParticipants_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_leaderProjection = true && this.isSetLeaderProjection();
      boolean that_present_leaderProjection = true && that.isSetLeaderProjection();
      if (this_present_leaderProjection || that_present_leaderProjection) {
        if (!(this_present_leaderProjection && that_present_leaderProjection))
          return false;
        if (!this.leaderProjection.equals(that.leaderProjection))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getLeaderParticipants_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLeaderProjection()).compareTo(other.isSetLeaderProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLeaderProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leaderProjection, other.leaderProjection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getLeaderParticipants_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("leaderProjection:");
      if (this.leaderProjection == null) {
        sb.append("null");
      } else {
        sb.append(this.leaderProjection);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
      if (leaderProjection != null) {
        leaderProjection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getLeaderParticipants_argsStandardSchemeFactory implements SchemeFactory {
      public getLeaderParticipants_argsStandardScheme getScheme() {
        return new getLeaderParticipants_argsStandardScheme();
      }
    }

    private static class getLeaderParticipants_argsStandardScheme extends StandardScheme<getLeaderParticipants_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getLeaderParticipants_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // LEADER_PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.leaderProjection = new LeaderProjection();
                struct.leaderProjection.read(iprot);
                struct.setLeaderProjectionIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getLeaderParticipants_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.leaderProjection != null) {
          oprot.writeFieldBegin(LEADER_PROJECTION_FIELD_DESC);
          struct.leaderProjection.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getLeaderParticipants_argsTupleSchemeFactory implements SchemeFactory {
      public getLeaderParticipants_argsTupleScheme getScheme() {
        return new getLeaderParticipants_argsTupleScheme();
      }
    }

    private static class getLeaderParticipants_argsTupleScheme extends TupleScheme<getLeaderParticipants_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getLeaderParticipants_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetLeaderProjection()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetLeaderProjection()) {
          struct.leaderProjection.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getLeaderParticipants_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.leaderProjection = new LeaderProjection();
          struct.leaderProjection.read(iprot);
          struct.setLeaderProjectionIsSet(true);
        }
      }
    }

  }

  public static class getLeaderParticipants_result implements org.apache.thrift.TBase<getLeaderParticipants_result, getLeaderParticipants_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLeaderParticipants_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLeaderParticipants_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getLeaderParticipants_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getLeaderParticipants_resultTupleSchemeFactory());
    }

    public List<Participant> success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Participant.class))));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLeaderParticipants_result.class, metaDataMap);
    }

    public getLeaderParticipants_result() {
    }

    public getLeaderParticipants_result(
      List<Participant> success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLeaderParticipants_result(getLeaderParticipants_result other) {
      if (other.isSetSuccess()) {
        List<Participant> __this__success = new ArrayList<Participant>(other.success.size());
        for (Participant other_element : other.success) {
          __this__success.add(new Participant(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public getLeaderParticipants_result deepCopy() {
      return new getLeaderParticipants_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Participant> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Participant elem) {
      if (this.success == null) {
        this.success = new ArrayList<Participant>();
      }
      this.success.add(elem);
    }

    public List<Participant> getSuccess() {
      return this.success;
    }

    public getLeaderParticipants_result setSuccess(List<Participant> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public getLeaderParticipants_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Participant>)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getLeaderParticipants_result)
        return this.equals((getLeaderParticipants_result)that);
      return false;
    }

    public boolean equals(getLeaderParticipants_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getLeaderParticipants_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getLeaderParticipants_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getLeaderParticipants_resultStandardSchemeFactory implements SchemeFactory {
      public getLeaderParticipants_resultStandardScheme getScheme() {
        return new getLeaderParticipants_resultStandardScheme();
      }
    }

    private static class getLeaderParticipants_resultStandardScheme extends StandardScheme<getLeaderParticipants_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getLeaderParticipants_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
                  struct.success = new ArrayList<Participant>(_list32.size);
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
                  {
                    Participant _elem34;
                    _elem34 = new Participant();
                    _elem34.read(iprot);
                    struct.success.add(_elem34);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getLeaderParticipants_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (Participant _iter35 : struct.success)
            {
              _iter35.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getLeaderParticipants_resultTupleSchemeFactory implements SchemeFactory {
      public getLeaderParticipants_resultTupleScheme getScheme() {
        return new getLeaderParticipants_resultTupleScheme();
      }
    }

    private static class getLeaderParticipants_resultTupleScheme extends TupleScheme<getLeaderParticipants_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getLeaderParticipants_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (Participant _iter36 : struct.success)
            {
              _iter36.write(oprot);
            }
          }
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getLeaderParticipants_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<Participant>(_list37.size);
            for (int _i38 = 0; _i38 < _list37.size; ++_i38)
            {
              Participant _elem39;
              _elem39 = new Participant();
              _elem39.read(iprot);
              struct.success.add(_elem39);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class getNodeCacheData_args implements org.apache.thrift.TBase<getNodeCacheData_args, getNodeCacheData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getNodeCacheData_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNodeCacheData_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField CACHE_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getNodeCacheData_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getNodeCacheData_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public NodeCacheProjection cacheProjection; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      CACHE_PROJECTION((short)2, "cacheProjection");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // CACHE_PROJECTION
            return CACHE_PROJECTION;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.CACHE_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("cacheProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NodeCacheProjection.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNodeCacheData_args.class, metaDataMap);
    }

    public getNodeCacheData_args() {
    }

    public getNodeCacheData_args(
      CuratorProjection projection,
      NodeCacheProjection cacheProjection)
    {
      this();
      this.projection = projection;
      this.cacheProjection = cacheProjection;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getNodeCacheData_args(getNodeCacheData_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetCacheProjection()) {
        this.cacheProjection = new NodeCacheProjection(other.cacheProjection);
      }
    }

    public getNodeCacheData_args deepCopy() {
      return new getNodeCacheData_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.cacheProjection = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public getNodeCacheData_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public NodeCacheProjection getCacheProjection() {
      return this.cacheProjection;
    }

    public getNodeCacheData_args setCacheProjection(NodeCacheProjection cacheProjection) {
      this.cacheProjection = cacheProjection;
      return this;
    }

    public void unsetCacheProjection() {
      this.cacheProjection = null;
    }

    /** Returns true if field cacheProjection is set (has been assigned a value) and false otherwise */
    public boolean isSetCacheProjection() {
      return this.cacheProjection != null;
    }

    public void setCacheProjectionIsSet(boolean value) {
      if (!value) {
        this.cacheProjection = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case CACHE_PROJECTION:
        if (value == null) {
          unsetCacheProjection();
        } else {
          setCacheProjection((NodeCacheProjection)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case CACHE_PROJECTION:
        return getCacheProjection();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case CACHE_PROJECTION:
        return isSetCacheProjection();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getNodeCacheData_args)
        return this.equals((getNodeCacheData_args)that);
      return false;
    }

    public boolean equals(getNodeCacheData_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_cacheProjection = true && this.isSetCacheProjection();
      boolean that_present_cacheProjection = true && that.isSetCacheProjection();
      if (this_present_cacheProjection || that_present_cacheProjection) {
        if (!(this_present_cacheProjection && that_present_cacheProjection))
          return false;
        if (!this.cacheProjection.equals(that.cacheProjection))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getNodeCacheData_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCacheProjection()).compareTo(other.isSetCacheProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCacheProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheProjection, other.cacheProjection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getNodeCacheData_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("cacheProjection:");
      if (this.cacheProjection == null) {
        sb.append("null");
      } else {
        sb.append(this.cacheProjection);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
      if (cacheProjection != null) {
        cacheProjection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getNodeCacheData_argsStandardSchemeFactory implements SchemeFactory {
      public getNodeCacheData_argsStandardScheme getScheme() {
        return new getNodeCacheData_argsStandardScheme();
      }
    }

    private static class getNodeCacheData_argsStandardScheme extends StandardScheme<getNodeCacheData_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getNodeCacheData_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // CACHE_PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.cacheProjection = new NodeCacheProjection();
                struct.cacheProjection.read(iprot);
                struct.setCacheProjectionIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getNodeCacheData_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.cacheProjection != null) {
          oprot.writeFieldBegin(CACHE_PROJECTION_FIELD_DESC);
          struct.cacheProjection.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getNodeCacheData_argsTupleSchemeFactory implements SchemeFactory {
      public getNodeCacheData_argsTupleScheme getScheme() {
        return new getNodeCacheData_argsTupleScheme();
      }
    }

    private static class getNodeCacheData_argsTupleScheme extends TupleScheme<getNodeCacheData_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getNodeCacheData_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetCacheProjection()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetCacheProjection()) {
          struct.cacheProjection.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getNodeCacheData_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.cacheProjection = new NodeCacheProjection();
          struct.cacheProjection.read(iprot);
          struct.setCacheProjectionIsSet(true);
        }
      }
    }

  }

  public static class getNodeCacheData_result implements org.apache.thrift.TBase<getNodeCacheData_result, getNodeCacheData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getNodeCacheData_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNodeCacheData_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getNodeCacheData_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getNodeCacheData_resultTupleSchemeFactory());
    }

    public ChildData success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildData.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNodeCacheData_result.class, metaDataMap);
    }

    public getNodeCacheData_result() {
    }

    public getNodeCacheData_result(
      ChildData success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getNodeCacheData_result(getNodeCacheData_result other) {
      if (other.isSetSuccess()) {
        this.success = new ChildData(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public getNodeCacheData_result deepCopy() {
      return new getNodeCacheData_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public ChildData getSuccess() {
      return this.success;
    }

    public getNodeCacheData_result setSuccess(ChildData success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public getNodeCacheData_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((ChildData)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getNodeCacheData_result)
        return this.equals((getNodeCacheData_result)that);
      return false;
    }

    public boolean equals(getNodeCacheData_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getNodeCacheData_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getNodeCacheData_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getNodeCacheData_resultStandardSchemeFactory implements SchemeFactory {
      public getNodeCacheData_resultStandardScheme getScheme() {
        return new getNodeCacheData_resultStandardScheme();
      }
    }

    private static class getNodeCacheData_resultStandardScheme extends StandardScheme<getNodeCacheData_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getNodeCacheData_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new ChildData();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getNodeCacheData_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getNodeCacheData_resultTupleSchemeFactory implements SchemeFactory {
      public getNodeCacheData_resultTupleScheme getScheme() {
        return new getNodeCacheData_resultTupleScheme();
      }
    }

    private static class getNodeCacheData_resultTupleScheme extends TupleScheme<getNodeCacheData_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getNodeCacheData_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getNodeCacheData_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new ChildData();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class getPathChildrenCacheData_args implements org.apache.thrift.TBase<getPathChildrenCacheData_args, getPathChildrenCacheData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPathChildrenCacheData_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPathChildrenCacheData_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField CACHE_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getPathChildrenCacheData_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getPathChildrenCacheData_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public PathChildrenCacheProjection cacheProjection; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      CACHE_PROJECTION((short)2, "cacheProjection");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // CACHE_PROJECTION
            return CACHE_PROJECTION;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.CACHE_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("cacheProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PathChildrenCacheProjection.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPathChildrenCacheData_args.class, metaDataMap);
    }

    public getPathChildrenCacheData_args() {
    }

    public getPathChildrenCacheData_args(
      CuratorProjection projection,
      PathChildrenCacheProjection cacheProjection)
    {
      this();
      this.projection = projection;
      this.cacheProjection = cacheProjection;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPathChildrenCacheData_args(getPathChildrenCacheData_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetCacheProjection()) {
        this.cacheProjection = new PathChildrenCacheProjection(other.cacheProjection);
      }
    }

    public getPathChildrenCacheData_args deepCopy() {
      return new getPathChildrenCacheData_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.cacheProjection = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public getPathChildrenCacheData_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public PathChildrenCacheProjection getCacheProjection() {
      return this.cacheProjection;
    }

    public getPathChildrenCacheData_args setCacheProjection(PathChildrenCacheProjection cacheProjection) {
      this.cacheProjection = cacheProjection;
      return this;
    }

    public void unsetCacheProjection() {
      this.cacheProjection = null;
    }

    /** Returns true if field cacheProjection is set (has been assigned a value) and false otherwise */
    public boolean isSetCacheProjection() {
      return this.cacheProjection != null;
    }

    public void setCacheProjectionIsSet(boolean value) {
      if (!value) {
        this.cacheProjection = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case CACHE_PROJECTION:
        if (value == null) {
          unsetCacheProjection();
        } else {
          setCacheProjection((PathChildrenCacheProjection)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case CACHE_PROJECTION:
        return getCacheProjection();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case CACHE_PROJECTION:
        return isSetCacheProjection();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getPathChildrenCacheData_args)
        return this.equals((getPathChildrenCacheData_args)that);
      return false;
    }

    public boolean equals(getPathChildrenCacheData_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_cacheProjection = true && this.isSetCacheProjection();
      boolean that_present_cacheProjection = true && that.isSetCacheProjection();
      if (this_present_cacheProjection || that_present_cacheProjection) {
        if (!(this_present_cacheProjection && that_present_cacheProjection))
          return false;
        if (!this.cacheProjection.equals(that.cacheProjection))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getPathChildrenCacheData_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCacheProjection()).compareTo(other.isSetCacheProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCacheProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheProjection, other.cacheProjection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getPathChildrenCacheData_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("cacheProjection:");
      if (this.cacheProjection == null) {
        sb.append("null");
      } else {
        sb.append(this.cacheProjection);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
      if (cacheProjection != null) {
        cacheProjection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getPathChildrenCacheData_argsStandardSchemeFactory implements SchemeFactory {
      public getPathChildrenCacheData_argsStandardScheme getScheme() {
        return new getPathChildrenCacheData_argsStandardScheme();
      }
    }

    private static class getPathChildrenCacheData_argsStandardScheme extends StandardScheme<getPathChildrenCacheData_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getPathChildrenCacheData_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // CACHE_PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.cacheProjection = new PathChildrenCacheProjection();
                struct.cacheProjection.read(iprot);
                struct.setCacheProjectionIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getPathChildrenCacheData_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.cacheProjection != null) {
          oprot.writeFieldBegin(CACHE_PROJECTION_FIELD_DESC);
          struct.cacheProjection.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getPathChildrenCacheData_argsTupleSchemeFactory implements SchemeFactory {
      public getPathChildrenCacheData_argsTupleScheme getScheme() {
        return new getPathChildrenCacheData_argsTupleScheme();
      }
    }

    private static class getPathChildrenCacheData_argsTupleScheme extends TupleScheme<getPathChildrenCacheData_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheData_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetCacheProjection()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetCacheProjection()) {
          struct.cacheProjection.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheData_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.cacheProjection = new PathChildrenCacheProjection();
          struct.cacheProjection.read(iprot);
          struct.setCacheProjectionIsSet(true);
        }
      }
    }

  }

  public static class getPathChildrenCacheData_result implements org.apache.thrift.TBase<getPathChildrenCacheData_result, getPathChildrenCacheData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPathChildrenCacheData_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPathChildrenCacheData_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getPathChildrenCacheData_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getPathChildrenCacheData_resultTupleSchemeFactory());
    }

    public List<ChildData> success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildData.class))));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPathChildrenCacheData_result.class, metaDataMap);
    }

    public getPathChildrenCacheData_result() {
    }

    public getPathChildrenCacheData_result(
      List<ChildData> success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPathChildrenCacheData_result(getPathChildrenCacheData_result other) {
      if (other.isSetSuccess()) {
        List<ChildData> __this__success = new ArrayList<ChildData>(other.success.size());
        for (ChildData other_element : other.success) {
          __this__success.add(new ChildData(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public getPathChildrenCacheData_result deepCopy() {
      return new getPathChildrenCacheData_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<ChildData> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(ChildData elem) {
      if (this.success == null) {
        this.success = new ArrayList<ChildData>();
      }
      this.success.add(elem);
    }

    public List<ChildData> getSuccess() {
      return this.success;
    }

    public getPathChildrenCacheData_result setSuccess(List<ChildData> success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public getPathChildrenCacheData_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<ChildData>)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getPathChildrenCacheData_result)
        return this.equals((getPathChildrenCacheData_result)that);
      return false;
    }

    public boolean equals(getPathChildrenCacheData_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getPathChildrenCacheData_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getPathChildrenCacheData_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getPathChildrenCacheData_resultStandardSchemeFactory implements SchemeFactory {
      public getPathChildrenCacheData_resultStandardScheme getScheme() {
        return new getPathChildrenCacheData_resultStandardScheme();
      }
    }

    private static class getPathChildrenCacheData_resultStandardScheme extends StandardScheme<getPathChildrenCacheData_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getPathChildrenCacheData_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
                  struct.success = new ArrayList<ChildData>(_list40.size);
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
                  {
                    ChildData _elem42;
                    _elem42 = new ChildData();
                    _elem42.read(iprot);
                    struct.success.add(_elem42);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getPathChildrenCacheData_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (ChildData _iter43 : struct.success)
            {
              _iter43.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getPathChildrenCacheData_resultTupleSchemeFactory implements SchemeFactory {
      public getPathChildrenCacheData_resultTupleScheme getScheme() {
        return new getPathChildrenCacheData_resultTupleScheme();
      }
    }

    private static class getPathChildrenCacheData_resultTupleScheme extends TupleScheme<getPathChildrenCacheData_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheData_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (ChildData _iter44 : struct.success)
            {
              _iter44.write(oprot);
            }
          }
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheData_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList<ChildData>(_list45.size);
            for (int _i46 = 0; _i46 < _list45.size; ++_i46)
            {
              ChildData _elem47;
              _elem47 = new ChildData();
              _elem47.read(iprot);
              struct.success.add(_elem47);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class getPathChildrenCacheDataForPath_args implements org.apache.thrift.TBase<getPathChildrenCacheDataForPath_args, getPathChildrenCacheDataForPath_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPathChildrenCacheDataForPath_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPathChildrenCacheDataForPath_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField CACHE_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)3);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getPathChildrenCacheDataForPath_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getPathChildrenCacheDataForPath_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public PathChildrenCacheProjection cacheProjection; // required
    public String path; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      CACHE_PROJECTION((short)2, "cacheProjection"),
      PATH((short)3, "path");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // CACHE_PROJECTION
            return CACHE_PROJECTION;
          case 3: // PATH
            return PATH;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.CACHE_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("cacheProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PathChildrenCacheProjection.class)));
      tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPathChildrenCacheDataForPath_args.class, metaDataMap);
    }

    public getPathChildrenCacheDataForPath_args() {
    }

    public getPathChildrenCacheDataForPath_args(
      CuratorProjection projection,
      PathChildrenCacheProjection cacheProjection,
      String path)
    {
      this();
      this.projection = projection;
      this.cacheProjection = cacheProjection;
      this.path = path;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPathChildrenCacheDataForPath_args(getPathChildrenCacheDataForPath_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetCacheProjection()) {
        this.cacheProjection = new PathChildrenCacheProjection(other.cacheProjection);
      }
      if (other.isSetPath()) {
        this.path = other.path;
      }
    }

    public getPathChildrenCacheDataForPath_args deepCopy() {
      return new getPathChildrenCacheDataForPath_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.cacheProjection = null;
      this.path = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public getPathChildrenCacheDataForPath_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public PathChildrenCacheProjection getCacheProjection() {
      return this.cacheProjection;
    }

    public getPathChildrenCacheDataForPath_args setCacheProjection(PathChildrenCacheProjection cacheProjection) {
      this.cacheProjection = cacheProjection;
      return this;
    }

    public void unsetCacheProjection() {
      this.cacheProjection = null;
    }

    /** Returns true if field cacheProjection is set (has been assigned a value) and false otherwise */
    public boolean isSetCacheProjection() {
      return this.cacheProjection != null;
    }

    public void setCacheProjectionIsSet(boolean value) {
      if (!value) {
        this.cacheProjection = null;
      }
    }

    public String getPath() {
      return this.path;
    }

    public getPathChildrenCacheDataForPath_args setPath(String path) {
      this.path = path;
      return this;
    }

    public void unsetPath() {
      this.path = null;
    }

    /** Returns true if field path is set (has been assigned a value) and false otherwise */
    public boolean isSetPath() {
      return this.path != null;
    }

    public void setPathIsSet(boolean value) {
      if (!value) {
        this.path = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case CACHE_PROJECTION:
        if (value == null) {
          unsetCacheProjection();
        } else {
          setCacheProjection((PathChildrenCacheProjection)value);
        }
        break;

      case PATH:
        if (value == null) {
          unsetPath();
        } else {
          setPath((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case CACHE_PROJECTION:
        return getCacheProjection();

      case PATH:
        return getPath();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case CACHE_PROJECTION:
        return isSetCacheProjection();
      case PATH:
        return isSetPath();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getPathChildrenCacheDataForPath_args)
        return this.equals((getPathChildrenCacheDataForPath_args)that);
      return false;
    }

    public boolean equals(getPathChildrenCacheDataForPath_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_cacheProjection = true && this.isSetCacheProjection();
      boolean that_present_cacheProjection = true && that.isSetCacheProjection();
      if (this_present_cacheProjection || that_present_cacheProjection) {
        if (!(this_present_cacheProjection && that_present_cacheProjection))
          return false;
        if (!this.cacheProjection.equals(that.cacheProjection))
          return false;
      }

      boolean this_present_path = true && this.isSetPath();
      boolean that_present_path = true && that.isSetPath();
      if (this_present_path || that_present_path) {
        if (!(this_present_path && that_present_path))
          return false;
        if (!this.path.equals(that.path))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getPathChildrenCacheDataForPath_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCacheProjection()).compareTo(other.isSetCacheProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCacheProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheProjection, other.cacheProjection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPath()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getPathChildrenCacheDataForPath_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("cacheProjection:");
      if (this.cacheProjection == null) {
        sb.append("null");
      } else {
        sb.append(this.cacheProjection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("path:");
      if (this.path == null) {
        sb.append("null");
      } else {
        sb.append(this.path);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
      if (cacheProjection != null) {
        cacheProjection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getPathChildrenCacheDataForPath_argsStandardSchemeFactory implements SchemeFactory {
      public getPathChildrenCacheDataForPath_argsStandardScheme getScheme() {
        return new getPathChildrenCacheDataForPath_argsStandardScheme();
      }
    }

    private static class getPathChildrenCacheDataForPath_argsStandardScheme extends StandardScheme<getPathChildrenCacheDataForPath_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getPathChildrenCacheDataForPath_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // CACHE_PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.cacheProjection = new PathChildrenCacheProjection();
                struct.cacheProjection.read(iprot);
                struct.setCacheProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // PATH
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.path = iprot.readString();
                struct.setPathIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getPathChildrenCacheDataForPath_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.cacheProjection != null) {
          oprot.writeFieldBegin(CACHE_PROJECTION_FIELD_DESC);
          struct.cacheProjection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.path != null) {
          oprot.writeFieldBegin(PATH_FIELD_DESC);
          oprot.writeString(struct.path);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getPathChildrenCacheDataForPath_argsTupleSchemeFactory implements SchemeFactory {
      public getPathChildrenCacheDataForPath_argsTupleScheme getScheme() {
        return new getPathChildrenCacheDataForPath_argsTupleScheme();
      }
    }

    private static class getPathChildrenCacheDataForPath_argsTupleScheme extends TupleScheme<getPathChildrenCacheDataForPath_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheDataForPath_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetCacheProjection()) {
          optionals.set(1);
        }
        if (struct.isSetPath()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetCacheProjection()) {
          struct.cacheProjection.write(oprot);
        }
        if (struct.isSetPath()) {
          oprot.writeString(struct.path);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheDataForPath_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.cacheProjection = new PathChildrenCacheProjection();
          struct.cacheProjection.read(iprot);
          struct.setCacheProjectionIsSet(true);
        }
        if (incoming.get(2)) {
          struct.path = iprot.readString();
          struct.setPathIsSet(true);
        }
      }
    }

  }

  public static class getPathChildrenCacheDataForPath_result implements org.apache.thrift.TBase<getPathChildrenCacheDataForPath_result, getPathChildrenCacheDataForPath_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPathChildrenCacheDataForPath_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPathChildrenCacheDataForPath_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getPathChildrenCacheDataForPath_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getPathChildrenCacheDataForPath_resultTupleSchemeFactory());
    }

    public ChildData success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildData.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPathChildrenCacheDataForPath_result.class, metaDataMap);
    }

    public getPathChildrenCacheDataForPath_result() {
    }

    public getPathChildrenCacheDataForPath_result(
      ChildData success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPathChildrenCacheDataForPath_result(getPathChildrenCacheDataForPath_result other) {
      if (other.isSetSuccess()) {
        this.success = new ChildData(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public getPathChildrenCacheDataForPath_result deepCopy() {
      return new getPathChildrenCacheDataForPath_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public ChildData getSuccess() {
      return this.success;
    }

    public getPathChildrenCacheDataForPath_result setSuccess(ChildData success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public getPathChildrenCacheDataForPath_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((ChildData)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getPathChildrenCacheDataForPath_result)
        return this.equals((getPathChildrenCacheDataForPath_result)that);
      return false;
    }

    public boolean equals(getPathChildrenCacheDataForPath_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getPathChildrenCacheDataForPath_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getPathChildrenCacheDataForPath_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getPathChildrenCacheDataForPath_resultStandardSchemeFactory implements SchemeFactory {
      public getPathChildrenCacheDataForPath_resultStandardScheme getScheme() {
        return new getPathChildrenCacheDataForPath_resultStandardScheme();
      }
    }

    private static class getPathChildrenCacheDataForPath_resultStandardScheme extends StandardScheme<getPathChildrenCacheDataForPath_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getPathChildrenCacheDataForPath_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new ChildData();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getPathChildrenCacheDataForPath_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getPathChildrenCacheDataForPath_resultTupleSchemeFactory implements SchemeFactory {
      public getPathChildrenCacheDataForPath_resultTupleScheme getScheme() {
        return new getPathChildrenCacheDataForPath_resultTupleScheme();
      }
    }

    private static class getPathChildrenCacheDataForPath_resultTupleScheme extends TupleScheme<getPathChildrenCacheDataForPath_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheDataForPath_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheDataForPath_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new ChildData();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class isLeader_args implements org.apache.thrift.TBase<isLeader_args, isLeader_args._Fields>, java.io.Serializable, Cloneable, Comparable<isLeader_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isLeader_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField LEADER_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("leaderProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new isLeader_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new isLeader_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public LeaderProjection leaderProjection; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      LEADER_PROJECTION((short)2, "leaderProjection");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // LEADER_PROJECTION
            return LEADER_PROJECTION;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.LEADER_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("leaderProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LeaderProjection.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isLeader_args.class, metaDataMap);
    }

    public isLeader_args() {
    }

    public isLeader_args(
      CuratorProjection projection,
      LeaderProjection leaderProjection)
    {
      this();
      this.projection = projection;
      this.leaderProjection = leaderProjection;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isLeader_args(isLeader_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetLeaderProjection()) {
        this.leaderProjection = new LeaderProjection(other.leaderProjection);
      }
    }

    public isLeader_args deepCopy() {
      return new isLeader_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.leaderProjection = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public isLeader_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public LeaderProjection getLeaderProjection() {
      return this.leaderProjection;
    }

    public isLeader_args setLeaderProjection(LeaderProjection leaderProjection) {
      this.leaderProjection = leaderProjection;
      return this;
    }

    public void unsetLeaderProjection() {
      this.leaderProjection = null;
    }

    /** Returns true if field leaderProjection is set (has been assigned a value) and false otherwise */
    public boolean isSetLeaderProjection() {
      return this.leaderProjection != null;
    }

    public void setLeaderProjectionIsSet(boolean value) {
      if (!value) {
        this.leaderProjection = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case LEADER_PROJECTION:
        if (value == null) {
          unsetLeaderProjection();
        } else {
          setLeaderProjection((LeaderProjection)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case LEADER_PROJECTION:
        return getLeaderProjection();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case LEADER_PROJECTION:
        return isSetLeaderProjection();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof isLeader_args)
        return this.equals((isLeader_args)that);
      return false;
    }

    public boolean equals(isLeader_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_leaderProjection = true && this.isSetLeaderProjection();
      boolean that_present_leaderProjection = true && that.isSetLeaderProjection();
      if (this_present_leaderProjection || that_present_leaderProjection) {
        if (!(this_present_leaderProjection && that_present_leaderProjection))
          return false;
        if (!this.leaderProjection.equals(that.leaderProjection))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(isLeader_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLeaderProjection()).compareTo(other.isSetLeaderProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLeaderProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leaderProjection, other.leaderProjection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isLeader_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("leaderProjection:");
      if (this.leaderProjection == null) {
        sb.append("null");
      } else {
        sb.append(this.leaderProjection);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
      if (leaderProjection != null) {
        leaderProjection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class isLeader_argsStandardSchemeFactory implements SchemeFactory {
      public isLeader_argsStandardScheme getScheme() {
        return new isLeader_argsStandardScheme();
      }
    }

    private static class isLeader_argsStandardScheme extends StandardScheme<isLeader_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, isLeader_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // LEADER_PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.leaderProjection = new LeaderProjection();
                struct.leaderProjection.read(iprot);
                struct.setLeaderProjectionIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, isLeader_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.leaderProjection != null) {
          oprot.writeFieldBegin(LEADER_PROJECTION_FIELD_DESC);
          struct.leaderProjection.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class isLeader_argsTupleSchemeFactory implements SchemeFactory {
      public isLeader_argsTupleScheme getScheme() {
        return new isLeader_argsTupleScheme();
      }
    }

    private static class isLeader_argsTupleScheme extends TupleScheme<isLeader_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, isLeader_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetLeaderProjection()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetLeaderProjection()) {
          struct.leaderProjection.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, isLeader_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.leaderProjection = new LeaderProjection();
          struct.leaderProjection.read(iprot);
          struct.setLeaderProjectionIsSet(true);
        }
      }
    }

  }

  public static class isLeader_result implements org.apache.thrift.TBase<isLeader_result, isLeader_result._Fields>, java.io.Serializable, Cloneable, Comparable<isLeader_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isLeader_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new isLeader_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new isLeader_resultTupleSchemeFactory());
    }

    public boolean success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isLeader_result.class, metaDataMap);
    }

    public isLeader_result() {
    }

    public isLeader_result(
      boolean success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isLeader_result(isLeader_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public isLeader_result deepCopy() {
      return new isLeader_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.ex1 = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public isLeader_result setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public isLeader_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof isLeader_result)
        return this.equals((isLeader_result)that);
      return false;
    }

    public boolean equals(isLeader_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(isLeader_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isLeader_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bitfield = 0;
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class isLeader_resultStandardSchemeFactory implements SchemeFactory {
      public isLeader_resultStandardScheme getScheme() {
        return new isLeader_resultStandardScheme();
      }
    }

    private static class isLeader_resultStandardScheme extends StandardScheme<isLeader_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, isLeader_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                struct.success = iprot.readBool();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, isLeader_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeBool(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class isLeader_resultTupleSchemeFactory implements SchemeFactory {
      public isLeader_resultTupleScheme getScheme() {
        return new isLeader_resultTupleScheme();
      }
    }

    private static class isLeader_resultTupleScheme extends TupleScheme<isLeader_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, isLeader_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          oprot.writeBool(struct.success);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, isLeader_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = iprot.readBool();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class newCuratorProjection_args implements org.apache.thrift.TBase<newCuratorProjection_args, newCuratorProjection_args._Fields>, java.io.Serializable, Cloneable, Comparable<newCuratorProjection_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("newCuratorProjection_args");

    private static final org.apache.thrift.protocol.TField CONNECTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("connectionName", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new newCuratorProjection_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new newCuratorProjection_argsTupleSchemeFactory());
    }

    public String connectionName; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CONNECTION_NAME((short)1, "connectionName");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CONNECTION_NAME
            return CONNECTION_NAME;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CONNECTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("connectionName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(newCuratorProjection_args.class, metaDataMap);
    }

    public newCuratorProjection_args() {
    }

    public newCuratorProjection_args(
      String connectionName)
    {
      this();
      this.connectionName = connectionName;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public newCuratorProjection_args(newCuratorProjection_args other) {
      if (other.isSetConnectionName()) {
        this.connectionName = other.connectionName;
      }
    }

    public newCuratorProjection_args deepCopy() {
      return new newCuratorProjection_args(this);
    }

    @Override
    public void clear() {
      this.connectionName = null;
    }

    public String getConnectionName() {
      return this.connectionName;
    }

    public newCuratorProjection_args setConnectionName(String connectionName) {
      this.connectionName = connectionName;
      return this;
    }

    public void unsetConnectionName() {
      this.connectionName = null;
    }

    /** Returns true if field connectionName is set (has been assigned a value) and false otherwise */
    public boolean isSetConnectionName() {
      return this.connectionName != null;
    }

    public void setConnectionNameIsSet(boolean value) {
      if (!value) {
        this.connectionName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CONNECTION_NAME:
        if (value == null) {
          unsetConnectionName();
        } else {
          setConnectionName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CONNECTION_NAME:
        return getConnectionName();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CONNECTION_NAME:
        return isSetConnectionName();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof newCuratorProjection_args)
        return this.equals((newCuratorProjection_args)that);
      return false;
    }

    public boolean equals(newCuratorProjection_args that) {
      if (that == null)
        return false;

      boolean this_present_connectionName = true && this.isSetConnectionName();
      boolean that_present_connectionName = true && that.isSetConnectionName();
      if (this_present_connectionName || that_present_connectionName) {
        if (!(this_present_connectionName && that_present_connectionName))
          return false;
        if (!this.connectionName.equals(that.connectionName))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(newCuratorProjection_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetConnectionName()).compareTo(other.isSetConnectionName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetConnectionName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.connectionName, other.connectionName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("newCuratorProjection_args(");
      boolean first = true;

      sb.append("connectionName:");
      if (this.connectionName == null) {
        sb.append("null");
      } else {
        sb.append(this.connectionName);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class newCuratorProjection_argsStandardSchemeFactory implements SchemeFactory {
      public newCuratorProjection_argsStandardScheme getScheme() {
        return new newCuratorProjection_argsStandardScheme();
      }
    }

    private static class newCuratorProjection_argsStandardScheme extends StandardScheme<newCuratorProjection_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, newCuratorProjection_args 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: // CONNECTION_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.connectionName = iprot.readString();
                struct.setConnectionNameIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, newCuratorProjection_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.connectionName != null) {
          oprot.writeFieldBegin(CONNECTION_NAME_FIELD_DESC);
          oprot.writeString(struct.connectionName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class newCuratorProjection_argsTupleSchemeFactory implements SchemeFactory {
      public newCuratorProjection_argsTupleScheme getScheme() {
        return new newCuratorProjection_argsTupleScheme();
      }
    }

    private static class newCuratorProjection_argsTupleScheme extends TupleScheme<newCuratorProjection_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, newCuratorProjection_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetConnectionName()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetConnectionName()) {
          oprot.writeString(struct.connectionName);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, newCuratorProjection_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.connectionName = iprot.readString();
          struct.setConnectionNameIsSet(true);
        }
      }
    }

  }

  public static class newCuratorProjection_result implements org.apache.thrift.TBase<newCuratorProjection_result, newCuratorProjection_result._Fields>, java.io.Serializable, Cloneable, Comparable<newCuratorProjection_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("newCuratorProjection_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new newCuratorProjection_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new newCuratorProjection_resultTupleSchemeFactory());
    }

    public CuratorProjection success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(newCuratorProjection_result.class, metaDataMap);
    }

    public newCuratorProjection_result() {
    }

    public newCuratorProjection_result(
      CuratorProjection success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public newCuratorProjection_result(newCuratorProjection_result other) {
      if (other.isSetSuccess()) {
        this.success = new CuratorProjection(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public newCuratorProjection_result deepCopy() {
      return new newCuratorProjection_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public CuratorProjection getSuccess() {
      return this.success;
    }

    public newCuratorProjection_result setSuccess(CuratorProjection success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public newCuratorProjection_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((CuratorProjection)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof newCuratorProjection_result)
        return this.equals((newCuratorProjection_result)that);
      return false;
    }

    public boolean equals(newCuratorProjection_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(newCuratorProjection_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("newCuratorProjection_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class newCuratorProjection_resultStandardSchemeFactory implements SchemeFactory {
      public newCuratorProjection_resultStandardScheme getScheme() {
        return new newCuratorProjection_resultStandardScheme();
      }
    }

    private static class newCuratorProjection_resultStandardScheme extends StandardScheme<newCuratorProjection_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, newCuratorProjection_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new CuratorProjection();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, newCuratorProjection_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class newCuratorProjection_resultTupleSchemeFactory implements SchemeFactory {
      public newCuratorProjection_resultTupleScheme getScheme() {
        return new newCuratorProjection_resultTupleScheme();
      }
    }

    private static class newCuratorProjection_resultTupleScheme extends TupleScheme<newCuratorProjection_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, newCuratorProjection_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, newCuratorProjection_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new CuratorProjection();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class pingCuratorProjection_args implements org.apache.thrift.TBase<pingCuratorProjection_args, pingCuratorProjection_args._Fields>, java.io.Serializable, Cloneable, Comparable<pingCuratorProjection_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pingCuratorProjection_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new pingCuratorProjection_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new pingCuratorProjection_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pingCuratorProjection_args.class, metaDataMap);
    }

    public pingCuratorProjection_args() {
    }

    public pingCuratorProjection_args(
      CuratorProjection projection)
    {
      this();
      this.projection = projection;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public pingCuratorProjection_args(pingCuratorProjection_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
    }

    public pingCuratorProjection_args deepCopy() {
      return new pingCuratorProjection_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public pingCuratorProjection_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof pingCuratorProjection_args)
        return this.equals((pingCuratorProjection_args)that);
      return false;
    }

    public boolean equals(pingCuratorProjection_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(pingCuratorProjection_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("pingCuratorProjection_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class pingCuratorProjection_argsStandardSchemeFactory implements SchemeFactory {
      public pingCuratorProjection_argsStandardScheme getScheme() {
        return new pingCuratorProjection_argsStandardScheme();
      }
    }

    private static class pingCuratorProjection_argsStandardScheme extends StandardScheme<pingCuratorProjection_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, pingCuratorProjection_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, pingCuratorProjection_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class pingCuratorProjection_argsTupleSchemeFactory implements SchemeFactory {
      public pingCuratorProjection_argsTupleScheme getScheme() {
        return new pingCuratorProjection_argsTupleScheme();
      }
    }

    private static class pingCuratorProjection_argsTupleScheme extends TupleScheme<pingCuratorProjection_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, pingCuratorProjection_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, pingCuratorProjection_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
      }
    }

  }

  public static class setData_args implements org.apache.thrift.TBase<setData_args, setData_args._Fields>, java.io.Serializable, Cloneable, Comparable<setData_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setData_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new setData_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new setData_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public SetDataSpec spec; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      SPEC((short)2, "spec");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // SPEC
            return SPEC;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SetDataSpec.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setData_args.class, metaDataMap);
    }

    public setData_args() {
    }

    public setData_args(
      CuratorProjection projection,
      SetDataSpec spec)
    {
      this();
      this.projection = projection;
      this.spec = spec;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setData_args(setData_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetSpec()) {
        this.spec = new SetDataSpec(other.spec);
      }
    }

    public setData_args deepCopy() {
      return new setData_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.spec = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public setData_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public SetDataSpec getSpec() {
      return this.spec;
    }

    public setData_args setSpec(SetDataSpec spec) {
      this.spec = spec;
      return this;
    }

    public void unsetSpec() {
      this.spec = null;
    }

    /** Returns true if field spec is set (has been assigned a value) and false otherwise */
    public boolean isSetSpec() {
      return this.spec != null;
    }

    public void setSpecIsSet(boolean value) {
      if (!value) {
        this.spec = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case SPEC:
        if (value == null) {
          unsetSpec();
        } else {
          setSpec((SetDataSpec)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case SPEC:
        return getSpec();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case SPEC:
        return isSetSpec();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof setData_args)
        return this.equals((setData_args)that);
      return false;
    }

    public boolean equals(setData_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_spec = true && this.isSetSpec();
      boolean that_present_spec = true && that.isSetSpec();
      if (this_present_spec || that_present_spec) {
        if (!(this_present_spec && that_present_spec))
          return false;
        if (!this.spec.equals(that.spec))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(setData_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSpec()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("setData_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("spec:");
      if (this.spec == null) {
        sb.append("null");
      } else {
        sb.append(this.spec);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
      if (spec != null) {
        spec.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class setData_argsStandardSchemeFactory implements SchemeFactory {
      public setData_argsStandardScheme getScheme() {
        return new setData_argsStandardScheme();
      }
    }

    private static class setData_argsStandardScheme extends StandardScheme<setData_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setData_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SPEC
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.spec = new SetDataSpec();
                struct.spec.read(iprot);
                struct.setSpecIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, setData_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.spec != null) {
          oprot.writeFieldBegin(SPEC_FIELD_DESC);
          struct.spec.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setData_argsTupleSchemeFactory implements SchemeFactory {
      public setData_argsTupleScheme getScheme() {
        return new setData_argsTupleScheme();
      }
    }

    private static class setData_argsTupleScheme extends TupleScheme<setData_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setData_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetSpec()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetSpec()) {
          struct.spec.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setData_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.spec = new SetDataSpec();
          struct.spec.read(iprot);
          struct.setSpecIsSet(true);
        }
      }
    }

  }

  public static class setData_result implements org.apache.thrift.TBase<setData_result, setData_result._Fields>, java.io.Serializable, Cloneable, Comparable<setData_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setData_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new setData_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new setData_resultTupleSchemeFactory());
    }

    public OptionalStat success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalStat.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setData_result.class, metaDataMap);
    }

    public setData_result() {
    }

    public setData_result(
      OptionalStat success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setData_result(setData_result other) {
      if (other.isSetSuccess()) {
        this.success = new OptionalStat(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public setData_result deepCopy() {
      return new setData_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public OptionalStat getSuccess() {
      return this.success;
    }

    public setData_result setSuccess(OptionalStat success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public setData_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((OptionalStat)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof setData_result)
        return this.equals((setData_result)that);
      return false;
    }

    public boolean equals(setData_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(setData_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("setData_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class setData_resultStandardSchemeFactory implements SchemeFactory {
      public setData_resultStandardScheme getScheme() {
        return new setData_resultStandardScheme();
      }
    }

    private static class setData_resultStandardScheme extends StandardScheme<setData_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setData_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new OptionalStat();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, setData_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setData_resultTupleSchemeFactory implements SchemeFactory {
      public setData_resultTupleScheme getScheme() {
        return new setData_resultTupleScheme();
      }
    }

    private static class setData_resultTupleScheme extends TupleScheme<setData_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setData_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setData_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new OptionalStat();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class startLeaderSelector_args implements org.apache.thrift.TBase<startLeaderSelector_args, startLeaderSelector_args._Fields>, java.io.Serializable, Cloneable, Comparable<startLeaderSelector_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startLeaderSelector_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField PARTICIPANT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("participantId", org.apache.thrift.protocol.TType.STRING, (short)3);
    private static final org.apache.thrift.protocol.TField WAIT_FOR_LEADERSHIP_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("waitForLeadershipMs", org.apache.thrift.protocol.TType.I32, (short)4);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new startLeaderSelector_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new startLeaderSelector_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public String path; // required
    public String participantId; // required
    public int waitForLeadershipMs; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      PATH((short)2, "path"),
      PARTICIPANT_ID((short)3, "participantId"),
      WAIT_FOR_LEADERSHIP_MS((short)4, "waitForLeadershipMs");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // PATH
            return PATH;
          case 3: // PARTICIPANT_ID
            return PARTICIPANT_ID;
          case 4: // WAIT_FOR_LEADERSHIP_MS
            return WAIT_FOR_LEADERSHIP_MS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAITFORLEADERSHIPMS_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.PARTICIPANT_ID, new org.apache.thrift.meta_data.FieldMetaData("participantId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.WAIT_FOR_LEADERSHIP_MS, new org.apache.thrift.meta_data.FieldMetaData("waitForLeadershipMs", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startLeaderSelector_args.class, metaDataMap);
    }

    public startLeaderSelector_args() {
    }

    public startLeaderSelector_args(
      CuratorProjection projection,
      String path,
      String participantId,
      int waitForLeadershipMs)
    {
      this();
      this.projection = projection;
      this.path = path;
      this.participantId = participantId;
      this.waitForLeadershipMs = waitForLeadershipMs;
      setWaitForLeadershipMsIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public startLeaderSelector_args(startLeaderSelector_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetPath()) {
        this.path = other.path;
      }
      if (other.isSetParticipantId()) {
        this.participantId = other.participantId;
      }
      this.waitForLeadershipMs = other.waitForLeadershipMs;
    }

    public startLeaderSelector_args deepCopy() {
      return new startLeaderSelector_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.path = null;
      this.participantId = null;
      setWaitForLeadershipMsIsSet(false);
      this.waitForLeadershipMs = 0;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public startLeaderSelector_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public String getPath() {
      return this.path;
    }

    public startLeaderSelector_args setPath(String path) {
      this.path = path;
      return this;
    }

    public void unsetPath() {
      this.path = null;
    }

    /** Returns true if field path is set (has been assigned a value) and false otherwise */
    public boolean isSetPath() {
      return this.path != null;
    }

    public void setPathIsSet(boolean value) {
      if (!value) {
        this.path = null;
      }
    }

    public String getParticipantId() {
      return this.participantId;
    }

    public startLeaderSelector_args setParticipantId(String participantId) {
      this.participantId = participantId;
      return this;
    }

    public void unsetParticipantId() {
      this.participantId = null;
    }

    /** Returns true if field participantId is set (has been assigned a value) and false otherwise */
    public boolean isSetParticipantId() {
      return this.participantId != null;
    }

    public void setParticipantIdIsSet(boolean value) {
      if (!value) {
        this.participantId = null;
      }
    }

    public int getWaitForLeadershipMs() {
      return this.waitForLeadershipMs;
    }

    public startLeaderSelector_args setWaitForLeadershipMs(int waitForLeadershipMs) {
      this.waitForLeadershipMs = waitForLeadershipMs;
      setWaitForLeadershipMsIsSet(true);
      return this;
    }

    public void unsetWaitForLeadershipMs() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WAITFORLEADERSHIPMS_ISSET_ID);
    }

    /** Returns true if field waitForLeadershipMs is set (has been assigned a value) and false otherwise */
    public boolean isSetWaitForLeadershipMs() {
      return EncodingUtils.testBit(__isset_bitfield, __WAITFORLEADERSHIPMS_ISSET_ID);
    }

    public void setWaitForLeadershipMsIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WAITFORLEADERSHIPMS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case PATH:
        if (value == null) {
          unsetPath();
        } else {
          setPath((String)value);
        }
        break;

      case PARTICIPANT_ID:
        if (value == null) {
          unsetParticipantId();
        } else {
          setParticipantId((String)value);
        }
        break;

      case WAIT_FOR_LEADERSHIP_MS:
        if (value == null) {
          unsetWaitForLeadershipMs();
        } else {
          setWaitForLeadershipMs((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case PATH:
        return getPath();

      case PARTICIPANT_ID:
        return getParticipantId();

      case WAIT_FOR_LEADERSHIP_MS:
        return Integer.valueOf(getWaitForLeadershipMs());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case PATH:
        return isSetPath();
      case PARTICIPANT_ID:
        return isSetParticipantId();
      case WAIT_FOR_LEADERSHIP_MS:
        return isSetWaitForLeadershipMs();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof startLeaderSelector_args)
        return this.equals((startLeaderSelector_args)that);
      return false;
    }

    public boolean equals(startLeaderSelector_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_path = true && this.isSetPath();
      boolean that_present_path = true && that.isSetPath();
      if (this_present_path || that_present_path) {
        if (!(this_present_path && that_present_path))
          return false;
        if (!this.path.equals(that.path))
          return false;
      }

      boolean this_present_participantId = true && this.isSetParticipantId();
      boolean that_present_participantId = true && that.isSetParticipantId();
      if (this_present_participantId || that_present_participantId) {
        if (!(this_present_participantId && that_present_participantId))
          return false;
        if (!this.participantId.equals(that.participantId))
          return false;
      }

      boolean this_present_waitForLeadershipMs = true;
      boolean that_present_waitForLeadershipMs = true;
      if (this_present_waitForLeadershipMs || that_present_waitForLeadershipMs) {
        if (!(this_present_waitForLeadershipMs && that_present_waitForLeadershipMs))
          return false;
        if (this.waitForLeadershipMs != that.waitForLeadershipMs)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(startLeaderSelector_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPath()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetParticipantId()).compareTo(other.isSetParticipantId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetParticipantId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.participantId, other.participantId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWaitForLeadershipMs()).compareTo(other.isSetWaitForLeadershipMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWaitForLeadershipMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.waitForLeadershipMs, other.waitForLeadershipMs);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("startLeaderSelector_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("path:");
      if (this.path == null) {
        sb.append("null");
      } else {
        sb.append(this.path);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("participantId:");
      if (this.participantId == null) {
        sb.append("null");
      } else {
        sb.append(this.participantId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("waitForLeadershipMs:");
      sb.append(this.waitForLeadershipMs);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bitfield = 0;
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class startLeaderSelector_argsStandardSchemeFactory implements SchemeFactory {
      public startLeaderSelector_argsStandardScheme getScheme() {
        return new startLeaderSelector_argsStandardScheme();
      }
    }

    private static class startLeaderSelector_argsStandardScheme extends StandardScheme<startLeaderSelector_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, startLeaderSelector_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // PATH
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.path = iprot.readString();
                struct.setPathIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // PARTICIPANT_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.participantId = iprot.readString();
                struct.setParticipantIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // WAIT_FOR_LEADERSHIP_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.waitForLeadershipMs = iprot.readI32();
                struct.setWaitForLeadershipMsIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, startLeaderSelector_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.path != null) {
          oprot.writeFieldBegin(PATH_FIELD_DESC);
          oprot.writeString(struct.path);
          oprot.writeFieldEnd();
        }
        if (struct.participantId != null) {
          oprot.writeFieldBegin(PARTICIPANT_ID_FIELD_DESC);
          oprot.writeString(struct.participantId);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(WAIT_FOR_LEADERSHIP_MS_FIELD_DESC);
        oprot.writeI32(struct.waitForLeadershipMs);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class startLeaderSelector_argsTupleSchemeFactory implements SchemeFactory {
      public startLeaderSelector_argsTupleScheme getScheme() {
        return new startLeaderSelector_argsTupleScheme();
      }
    }

    private static class startLeaderSelector_argsTupleScheme extends TupleScheme<startLeaderSelector_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, startLeaderSelector_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetPath()) {
          optionals.set(1);
        }
        if (struct.isSetParticipantId()) {
          optionals.set(2);
        }
        if (struct.isSetWaitForLeadershipMs()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetPath()) {
          oprot.writeString(struct.path);
        }
        if (struct.isSetParticipantId()) {
          oprot.writeString(struct.participantId);
        }
        if (struct.isSetWaitForLeadershipMs()) {
          oprot.writeI32(struct.waitForLeadershipMs);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, startLeaderSelector_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.path = iprot.readString();
          struct.setPathIsSet(true);
        }
        if (incoming.get(2)) {
          struct.participantId = iprot.readString();
          struct.setParticipantIdIsSet(true);
        }
        if (incoming.get(3)) {
          struct.waitForLeadershipMs = iprot.readI32();
          struct.setWaitForLeadershipMsIsSet(true);
        }
      }
    }

  }

  public static class startLeaderSelector_result implements org.apache.thrift.TBase<startLeaderSelector_result, startLeaderSelector_result._Fields>, java.io.Serializable, Cloneable, Comparable<startLeaderSelector_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startLeaderSelector_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new startLeaderSelector_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new startLeaderSelector_resultTupleSchemeFactory());
    }

    public LeaderResult success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LeaderResult.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startLeaderSelector_result.class, metaDataMap);
    }

    public startLeaderSelector_result() {
    }

    public startLeaderSelector_result(
      LeaderResult success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public startLeaderSelector_result(startLeaderSelector_result other) {
      if (other.isSetSuccess()) {
        this.success = new LeaderResult(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public startLeaderSelector_result deepCopy() {
      return new startLeaderSelector_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public LeaderResult getSuccess() {
      return this.success;
    }

    public startLeaderSelector_result setSuccess(LeaderResult success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public startLeaderSelector_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((LeaderResult)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof startLeaderSelector_result)
        return this.equals((startLeaderSelector_result)that);
      return false;
    }

    public boolean equals(startLeaderSelector_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(startLeaderSelector_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("startLeaderSelector_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class startLeaderSelector_resultStandardSchemeFactory implements SchemeFactory {
      public startLeaderSelector_resultStandardScheme getScheme() {
        return new startLeaderSelector_resultStandardScheme();
      }
    }

    private static class startLeaderSelector_resultStandardScheme extends StandardScheme<startLeaderSelector_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, startLeaderSelector_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new LeaderResult();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, startLeaderSelector_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class startLeaderSelector_resultTupleSchemeFactory implements SchemeFactory {
      public startLeaderSelector_resultTupleScheme getScheme() {
        return new startLeaderSelector_resultTupleScheme();
      }
    }

    private static class startLeaderSelector_resultTupleScheme extends TupleScheme<startLeaderSelector_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, startLeaderSelector_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, startLeaderSelector_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new LeaderResult();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class startNodeCache_args implements org.apache.thrift.TBase<startNodeCache_args, startNodeCache_args._Fields>, java.io.Serializable, Cloneable, Comparable<startNodeCache_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startNodeCache_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField DATA_IS_COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("dataIsCompressed", org.apache.thrift.protocol.TType.BOOL, (short)3);
    private static final org.apache.thrift.protocol.TField BUILD_INITIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("buildInitial", org.apache.thrift.protocol.TType.BOOL, (short)4);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new startNodeCache_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new startNodeCache_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public String path; // required
    public boolean dataIsCompressed; // required
    public boolean buildInitial; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      PATH((short)2, "path"),
      DATA_IS_COMPRESSED((short)3, "dataIsCompressed"),
      BUILD_INITIAL((short)4, "buildInitial");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // PATH
            return PATH;
          case 3: // DATA_IS_COMPRESSED
            return DATA_IS_COMPRESSED;
          case 4: // BUILD_INITIAL
            return BUILD_INITIAL;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __DATAISCOMPRESSED_ISSET_ID = 0;
    private static final int __BUILDINITIAL_ISSET_ID = 1;
    private byte __isset_bitfield = 0;
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.DATA_IS_COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("dataIsCompressed", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.BUILD_INITIAL, new org.apache.thrift.meta_data.FieldMetaData("buildInitial", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startNodeCache_args.class, metaDataMap);
    }

    public startNodeCache_args() {
    }

    public startNodeCache_args(
      CuratorProjection projection,
      String path,
      boolean dataIsCompressed,
      boolean buildInitial)
    {
      this();
      this.projection = projection;
      this.path = path;
      this.dataIsCompressed = dataIsCompressed;
      setDataIsCompressedIsSet(true);
      this.buildInitial = buildInitial;
      setBuildInitialIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public startNodeCache_args(startNodeCache_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetPath()) {
        this.path = other.path;
      }
      this.dataIsCompressed = other.dataIsCompressed;
      this.buildInitial = other.buildInitial;
    }

    public startNodeCache_args deepCopy() {
      return new startNodeCache_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.path = null;
      setDataIsCompressedIsSet(false);
      this.dataIsCompressed = false;
      setBuildInitialIsSet(false);
      this.buildInitial = false;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public startNodeCache_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public String getPath() {
      return this.path;
    }

    public startNodeCache_args setPath(String path) {
      this.path = path;
      return this;
    }

    public void unsetPath() {
      this.path = null;
    }

    /** Returns true if field path is set (has been assigned a value) and false otherwise */
    public boolean isSetPath() {
      return this.path != null;
    }

    public void setPathIsSet(boolean value) {
      if (!value) {
        this.path = null;
      }
    }

    public boolean isDataIsCompressed() {
      return this.dataIsCompressed;
    }

    public startNodeCache_args setDataIsCompressed(boolean dataIsCompressed) {
      this.dataIsCompressed = dataIsCompressed;
      setDataIsCompressedIsSet(true);
      return this;
    }

    public void unsetDataIsCompressed() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATAISCOMPRESSED_ISSET_ID);
    }

    /** Returns true if field dataIsCompressed is set (has been assigned a value) and false otherwise */
    public boolean isSetDataIsCompressed() {
      return EncodingUtils.testBit(__isset_bitfield, __DATAISCOMPRESSED_ISSET_ID);
    }

    public void setDataIsCompressedIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATAISCOMPRESSED_ISSET_ID, value);
    }

    public boolean isBuildInitial() {
      return this.buildInitial;
    }

    public startNodeCache_args setBuildInitial(boolean buildInitial) {
      this.buildInitial = buildInitial;
      setBuildInitialIsSet(true);
      return this;
    }

    public void unsetBuildInitial() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BUILDINITIAL_ISSET_ID);
    }

    /** Returns true if field buildInitial is set (has been assigned a value) and false otherwise */
    public boolean isSetBuildInitial() {
      return EncodingUtils.testBit(__isset_bitfield, __BUILDINITIAL_ISSET_ID);
    }

    public void setBuildInitialIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BUILDINITIAL_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case PATH:
        if (value == null) {
          unsetPath();
        } else {
          setPath((String)value);
        }
        break;

      case DATA_IS_COMPRESSED:
        if (value == null) {
          unsetDataIsCompressed();
        } else {
          setDataIsCompressed((Boolean)value);
        }
        break;

      case BUILD_INITIAL:
        if (value == null) {
          unsetBuildInitial();
        } else {
          setBuildInitial((Boolean)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case PATH:
        return getPath();

      case DATA_IS_COMPRESSED:
        return Boolean.valueOf(isDataIsCompressed());

      case BUILD_INITIAL:
        return Boolean.valueOf(isBuildInitial());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case PATH:
        return isSetPath();
      case DATA_IS_COMPRESSED:
        return isSetDataIsCompressed();
      case BUILD_INITIAL:
        return isSetBuildInitial();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof startNodeCache_args)
        return this.equals((startNodeCache_args)that);
      return false;
    }

    public boolean equals(startNodeCache_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_path = true && this.isSetPath();
      boolean that_present_path = true && that.isSetPath();
      if (this_present_path || that_present_path) {
        if (!(this_present_path && that_present_path))
          return false;
        if (!this.path.equals(that.path))
          return false;
      }

      boolean this_present_dataIsCompressed = true;
      boolean that_present_dataIsCompressed = true;
      if (this_present_dataIsCompressed || that_present_dataIsCompressed) {
        if (!(this_present_dataIsCompressed && that_present_dataIsCompressed))
          return false;
        if (this.dataIsCompressed != that.dataIsCompressed)
          return false;
      }

      boolean this_present_buildInitial = true;
      boolean that_present_buildInitial = true;
      if (this_present_buildInitial || that_present_buildInitial) {
        if (!(this_present_buildInitial && that_present_buildInitial))
          return false;
        if (this.buildInitial != that.buildInitial)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(startNodeCache_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPath()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDataIsCompressed()).compareTo(other.isSetDataIsCompressed());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDataIsCompressed()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataIsCompressed, other.dataIsCompressed);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetBuildInitial()).compareTo(other.isSetBuildInitial());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBuildInitial()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.buildInitial, other.buildInitial);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("startNodeCache_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("path:");
      if (this.path == null) {
        sb.append("null");
      } else {
        sb.append(this.path);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("dataIsCompressed:");
      sb.append(this.dataIsCompressed);
      first = false;
      if (!first) sb.append(", ");
      sb.append("buildInitial:");
      sb.append(this.buildInitial);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bitfield = 0;
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class startNodeCache_argsStandardSchemeFactory implements SchemeFactory {
      public startNodeCache_argsStandardScheme getScheme() {
        return new startNodeCache_argsStandardScheme();
      }
    }

    private static class startNodeCache_argsStandardScheme extends StandardScheme<startNodeCache_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, startNodeCache_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // PATH
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.path = iprot.readString();
                struct.setPathIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // DATA_IS_COMPRESSED
              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                struct.dataIsCompressed = iprot.readBool();
                struct.setDataIsCompressedIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // BUILD_INITIAL
              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                struct.buildInitial = iprot.readBool();
                struct.setBuildInitialIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, startNodeCache_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.path != null) {
          oprot.writeFieldBegin(PATH_FIELD_DESC);
          oprot.writeString(struct.path);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(DATA_IS_COMPRESSED_FIELD_DESC);
        oprot.writeBool(struct.dataIsCompressed);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(BUILD_INITIAL_FIELD_DESC);
        oprot.writeBool(struct.buildInitial);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class startNodeCache_argsTupleSchemeFactory implements SchemeFactory {
      public startNodeCache_argsTupleScheme getScheme() {
        return new startNodeCache_argsTupleScheme();
      }
    }

    private static class startNodeCache_argsTupleScheme extends TupleScheme<startNodeCache_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, startNodeCache_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetPath()) {
          optionals.set(1);
        }
        if (struct.isSetDataIsCompressed()) {
          optionals.set(2);
        }
        if (struct.isSetBuildInitial()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetPath()) {
          oprot.writeString(struct.path);
        }
        if (struct.isSetDataIsCompressed()) {
          oprot.writeBool(struct.dataIsCompressed);
        }
        if (struct.isSetBuildInitial()) {
          oprot.writeBool(struct.buildInitial);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, startNodeCache_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.path = iprot.readString();
          struct.setPathIsSet(true);
        }
        if (incoming.get(2)) {
          struct.dataIsCompressed = iprot.readBool();
          struct.setDataIsCompressedIsSet(true);
        }
        if (incoming.get(3)) {
          struct.buildInitial = iprot.readBool();
          struct.setBuildInitialIsSet(true);
        }
      }
    }

  }

  public static class startNodeCache_result implements org.apache.thrift.TBase<startNodeCache_result, startNodeCache_result._Fields>, java.io.Serializable, Cloneable, Comparable<startNodeCache_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startNodeCache_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new startNodeCache_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new startNodeCache_resultTupleSchemeFactory());
    }

    public NodeCacheProjection success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NodeCacheProjection.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startNodeCache_result.class, metaDataMap);
    }

    public startNodeCache_result() {
    }

    public startNodeCache_result(
      NodeCacheProjection success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public startNodeCache_result(startNodeCache_result other) {
      if (other.isSetSuccess()) {
        this.success = new NodeCacheProjection(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public startNodeCache_result deepCopy() {
      return new startNodeCache_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public NodeCacheProjection getSuccess() {
      return this.success;
    }

    public startNodeCache_result setSuccess(NodeCacheProjection success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public startNodeCache_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((NodeCacheProjection)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof startNodeCache_result)
        return this.equals((startNodeCache_result)that);
      return false;
    }

    public boolean equals(startNodeCache_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(startNodeCache_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("startNodeCache_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class startNodeCache_resultStandardSchemeFactory implements SchemeFactory {
      public startNodeCache_resultStandardScheme getScheme() {
        return new startNodeCache_resultStandardScheme();
      }
    }

    private static class startNodeCache_resultStandardScheme extends StandardScheme<startNodeCache_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, startNodeCache_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new NodeCacheProjection();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, startNodeCache_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class startNodeCache_resultTupleSchemeFactory implements SchemeFactory {
      public startNodeCache_resultTupleScheme getScheme() {
        return new startNodeCache_resultTupleScheme();
      }
    }

    private static class startNodeCache_resultTupleScheme extends TupleScheme<startNodeCache_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, startNodeCache_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, startNodeCache_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new NodeCacheProjection();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class startPathChildrenCache_args implements org.apache.thrift.TBase<startPathChildrenCache_args, startPathChildrenCache_args._Fields>, java.io.Serializable, Cloneable, Comparable<startPathChildrenCache_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPathChildrenCache_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField CACHE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheData", org.apache.thrift.protocol.TType.BOOL, (short)3);
    private static final org.apache.thrift.protocol.TField DATA_IS_COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("dataIsCompressed", org.apache.thrift.protocol.TType.BOOL, (short)4);
    private static final org.apache.thrift.protocol.TField START_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("startMode", org.apache.thrift.protocol.TType.I32, (short)5);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new startPathChildrenCache_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new startPathChildrenCache_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public String path; // required
    public boolean cacheData; // required
    public boolean dataIsCompressed; // required
    /**
     * 
     * @see PathChildrenCacheStartMode
     */
    public PathChildrenCacheStartMode startMode; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      PATH((short)2, "path"),
      CACHE_DATA((short)3, "cacheData"),
      DATA_IS_COMPRESSED((short)4, "dataIsCompressed"),
      /**
       * 
       * @see PathChildrenCacheStartMode
       */
      START_MODE((short)5, "startMode");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // PATH
            return PATH;
          case 3: // CACHE_DATA
            return CACHE_DATA;
          case 4: // DATA_IS_COMPRESSED
            return DATA_IS_COMPRESSED;
          case 5: // START_MODE
            return START_MODE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __CACHEDATA_ISSET_ID = 0;
    private static final int __DATAISCOMPRESSED_ISSET_ID = 1;
    private byte __isset_bitfield = 0;
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.CACHE_DATA, new org.apache.thrift.meta_data.FieldMetaData("cacheData", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.DATA_IS_COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("dataIsCompressed", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.START_MODE, new org.apache.thrift.meta_data.FieldMetaData("startMode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PathChildrenCacheStartMode.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPathChildrenCache_args.class, metaDataMap);
    }

    public startPathChildrenCache_args() {
    }

    public startPathChildrenCache_args(
      CuratorProjection projection,
      String path,
      boolean cacheData,
      boolean dataIsCompressed,
      PathChildrenCacheStartMode startMode)
    {
      this();
      this.projection = projection;
      this.path = path;
      this.cacheData = cacheData;
      setCacheDataIsSet(true);
      this.dataIsCompressed = dataIsCompressed;
      setDataIsCompressedIsSet(true);
      this.startMode = startMode;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public startPathChildrenCache_args(startPathChildrenCache_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetPath()) {
        this.path = other.path;
      }
      this.cacheData = other.cacheData;
      this.dataIsCompressed = other.dataIsCompressed;
      if (other.isSetStartMode()) {
        this.startMode = other.startMode;
      }
    }

    public startPathChildrenCache_args deepCopy() {
      return new startPathChildrenCache_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.path = null;
      setCacheDataIsSet(false);
      this.cacheData = false;
      setDataIsCompressedIsSet(false);
      this.dataIsCompressed = false;
      this.startMode = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public startPathChildrenCache_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public String getPath() {
      return this.path;
    }

    public startPathChildrenCache_args setPath(String path) {
      this.path = path;
      return this;
    }

    public void unsetPath() {
      this.path = null;
    }

    /** Returns true if field path is set (has been assigned a value) and false otherwise */
    public boolean isSetPath() {
      return this.path != null;
    }

    public void setPathIsSet(boolean value) {
      if (!value) {
        this.path = null;
      }
    }

    public boolean isCacheData() {
      return this.cacheData;
    }

    public startPathChildrenCache_args setCacheData(boolean cacheData) {
      this.cacheData = cacheData;
      setCacheDataIsSet(true);
      return this;
    }

    public void unsetCacheData() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHEDATA_ISSET_ID);
    }

    /** Returns true if field cacheData is set (has been assigned a value) and false otherwise */
    public boolean isSetCacheData() {
      return EncodingUtils.testBit(__isset_bitfield, __CACHEDATA_ISSET_ID);
    }

    public void setCacheDataIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHEDATA_ISSET_ID, value);
    }

    public boolean isDataIsCompressed() {
      return this.dataIsCompressed;
    }

    public startPathChildrenCache_args setDataIsCompressed(boolean dataIsCompressed) {
      this.dataIsCompressed = dataIsCompressed;
      setDataIsCompressedIsSet(true);
      return this;
    }

    public void unsetDataIsCompressed() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATAISCOMPRESSED_ISSET_ID);
    }

    /** Returns true if field dataIsCompressed is set (has been assigned a value) and false otherwise */
    public boolean isSetDataIsCompressed() {
      return EncodingUtils.testBit(__isset_bitfield, __DATAISCOMPRESSED_ISSET_ID);
    }

    public void setDataIsCompressedIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATAISCOMPRESSED_ISSET_ID, value);
    }

    /**
     * 
     * @see PathChildrenCacheStartMode
     */
    public PathChildrenCacheStartMode getStartMode() {
      return this.startMode;
    }

    /**
     * 
     * @see PathChildrenCacheStartMode
     */
    public startPathChildrenCache_args setStartMode(PathChildrenCacheStartMode startMode) {
      this.startMode = startMode;
      return this;
    }

    public void unsetStartMode() {
      this.startMode = null;
    }

    /** Returns true if field startMode is set (has been assigned a value) and false otherwise */
    public boolean isSetStartMode() {
      return this.startMode != null;
    }

    public void setStartModeIsSet(boolean value) {
      if (!value) {
        this.startMode = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case PATH:
        if (value == null) {
          unsetPath();
        } else {
          setPath((String)value);
        }
        break;

      case CACHE_DATA:
        if (value == null) {
          unsetCacheData();
        } else {
          setCacheData((Boolean)value);
        }
        break;

      case DATA_IS_COMPRESSED:
        if (value == null) {
          unsetDataIsCompressed();
        } else {
          setDataIsCompressed((Boolean)value);
        }
        break;

      case START_MODE:
        if (value == null) {
          unsetStartMode();
        } else {
          setStartMode((PathChildrenCacheStartMode)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case PATH:
        return getPath();

      case CACHE_DATA:
        return Boolean.valueOf(isCacheData());

      case DATA_IS_COMPRESSED:
        return Boolean.valueOf(isDataIsCompressed());

      case START_MODE:
        return getStartMode();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case PATH:
        return isSetPath();
      case CACHE_DATA:
        return isSetCacheData();
      case DATA_IS_COMPRESSED:
        return isSetDataIsCompressed();
      case START_MODE:
        return isSetStartMode();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof startPathChildrenCache_args)
        return this.equals((startPathChildrenCache_args)that);
      return false;
    }

    public boolean equals(startPathChildrenCache_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_path = true && this.isSetPath();
      boolean that_present_path = true && that.isSetPath();
      if (this_present_path || that_present_path) {
        if (!(this_present_path && that_present_path))
          return false;
        if (!this.path.equals(that.path))
          return false;
      }

      boolean this_present_cacheData = true;
      boolean that_present_cacheData = true;
      if (this_present_cacheData || that_present_cacheData) {
        if (!(this_present_cacheData && that_present_cacheData))
          return false;
        if (this.cacheData != that.cacheData)
          return false;
      }

      boolean this_present_dataIsCompressed = true;
      boolean that_present_dataIsCompressed = true;
      if (this_present_dataIsCompressed || that_present_dataIsCompressed) {
        if (!(this_present_dataIsCompressed && that_present_dataIsCompressed))
          return false;
        if (this.dataIsCompressed != that.dataIsCompressed)
          return false;
      }

      boolean this_present_startMode = true && this.isSetStartMode();
      boolean that_present_startMode = true && that.isSetStartMode();
      if (this_present_startMode || that_present_startMode) {
        if (!(this_present_startMode && that_present_startMode))
          return false;
        if (!this.startMode.equals(that.startMode))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(startPathChildrenCache_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPath()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCacheData()).compareTo(other.isSetCacheData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCacheData()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheData, other.cacheData);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDataIsCompressed()).compareTo(other.isSetDataIsCompressed());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDataIsCompressed()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataIsCompressed, other.dataIsCompressed);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetStartMode()).compareTo(other.isSetStartMode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetStartMode()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startMode, other.startMode);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("startPathChildrenCache_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("path:");
      if (this.path == null) {
        sb.append("null");
      } else {
        sb.append(this.path);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("cacheData:");
      sb.append(this.cacheData);
      first = false;
      if (!first) sb.append(", ");
      sb.append("dataIsCompressed:");
      sb.append(this.dataIsCompressed);
      first = false;
      if (!first) sb.append(", ");
      sb.append("startMode:");
      if (this.startMode == null) {
        sb.append("null");
      } else {
        sb.append(this.startMode);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bitfield = 0;
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class startPathChildrenCache_argsStandardSchemeFactory implements SchemeFactory {
      public startPathChildrenCache_argsStandardScheme getScheme() {
        return new startPathChildrenCache_argsStandardScheme();
      }
    }

    private static class startPathChildrenCache_argsStandardScheme extends StandardScheme<startPathChildrenCache_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, startPathChildrenCache_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // PATH
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.path = iprot.readString();
                struct.setPathIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // CACHE_DATA
              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                struct.cacheData = iprot.readBool();
                struct.setCacheDataIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // DATA_IS_COMPRESSED
              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                struct.dataIsCompressed = iprot.readBool();
                struct.setDataIsCompressedIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 5: // START_MODE
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.startMode = PathChildrenCacheStartMode.findByValue(iprot.readI32());
                struct.setStartModeIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, startPathChildrenCache_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.path != null) {
          oprot.writeFieldBegin(PATH_FIELD_DESC);
          oprot.writeString(struct.path);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(CACHE_DATA_FIELD_DESC);
        oprot.writeBool(struct.cacheData);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(DATA_IS_COMPRESSED_FIELD_DESC);
        oprot.writeBool(struct.dataIsCompressed);
        oprot.writeFieldEnd();
        if (struct.startMode != null) {
          oprot.writeFieldBegin(START_MODE_FIELD_DESC);
          oprot.writeI32(struct.startMode.getValue());
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class startPathChildrenCache_argsTupleSchemeFactory implements SchemeFactory {
      public startPathChildrenCache_argsTupleScheme getScheme() {
        return new startPathChildrenCache_argsTupleScheme();
      }
    }

    private static class startPathChildrenCache_argsTupleScheme extends TupleScheme<startPathChildrenCache_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, startPathChildrenCache_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetPath()) {
          optionals.set(1);
        }
        if (struct.isSetCacheData()) {
          optionals.set(2);
        }
        if (struct.isSetDataIsCompressed()) {
          optionals.set(3);
        }
        if (struct.isSetStartMode()) {
          optionals.set(4);
        }
        oprot.writeBitSet(optionals, 5);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetPath()) {
          oprot.writeString(struct.path);
        }
        if (struct.isSetCacheData()) {
          oprot.writeBool(struct.cacheData);
        }
        if (struct.isSetDataIsCompressed()) {
          oprot.writeBool(struct.dataIsCompressed);
        }
        if (struct.isSetStartMode()) {
          oprot.writeI32(struct.startMode.getValue());
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, startPathChildrenCache_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(5);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.path = iprot.readString();
          struct.setPathIsSet(true);
        }
        if (incoming.get(2)) {
          struct.cacheData = iprot.readBool();
          struct.setCacheDataIsSet(true);
        }
        if (incoming.get(3)) {
          struct.dataIsCompressed = iprot.readBool();
          struct.setDataIsCompressedIsSet(true);
        }
        if (incoming.get(4)) {
          struct.startMode = PathChildrenCacheStartMode.findByValue(iprot.readI32());
          struct.setStartModeIsSet(true);
        }
      }
    }

  }

  public static class startPathChildrenCache_result implements org.apache.thrift.TBase<startPathChildrenCache_result, startPathChildrenCache_result._Fields>, java.io.Serializable, Cloneable, Comparable<startPathChildrenCache_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPathChildrenCache_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new startPathChildrenCache_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new startPathChildrenCache_resultTupleSchemeFactory());
    }

    public PathChildrenCacheProjection success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PathChildrenCacheProjection.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPathChildrenCache_result.class, metaDataMap);
    }

    public startPathChildrenCache_result() {
    }

    public startPathChildrenCache_result(
      PathChildrenCacheProjection success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public startPathChildrenCache_result(startPathChildrenCache_result other) {
      if (other.isSetSuccess()) {
        this.success = new PathChildrenCacheProjection(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public startPathChildrenCache_result deepCopy() {
      return new startPathChildrenCache_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public PathChildrenCacheProjection getSuccess() {
      return this.success;
    }

    public startPathChildrenCache_result setSuccess(PathChildrenCacheProjection success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public startPathChildrenCache_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((PathChildrenCacheProjection)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof startPathChildrenCache_result)
        return this.equals((startPathChildrenCache_result)that);
      return false;
    }

    public boolean equals(startPathChildrenCache_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(startPathChildrenCache_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("startPathChildrenCache_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class startPathChildrenCache_resultStandardSchemeFactory implements SchemeFactory {
      public startPathChildrenCache_resultStandardScheme getScheme() {
        return new startPathChildrenCache_resultStandardScheme();
      }
    }

    private static class startPathChildrenCache_resultStandardScheme extends StandardScheme<startPathChildrenCache_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, startPathChildrenCache_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new PathChildrenCacheProjection();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, startPathChildrenCache_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class startPathChildrenCache_resultTupleSchemeFactory implements SchemeFactory {
      public startPathChildrenCache_resultTupleScheme getScheme() {
        return new startPathChildrenCache_resultTupleScheme();
      }
    }

    private static class startPathChildrenCache_resultTupleScheme extends TupleScheme<startPathChildrenCache_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, startPathChildrenCache_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, startPathChildrenCache_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new PathChildrenCacheProjection();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class startPersistentEphemeralNode_args implements org.apache.thrift.TBase<startPersistentEphemeralNode_args, startPersistentEphemeralNode_args._Fields>, java.io.Serializable, Cloneable, Comparable<startPersistentEphemeralNode_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPersistentEphemeralNode_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)3);
    private static final org.apache.thrift.protocol.TField MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("mode", org.apache.thrift.protocol.TType.I32, (short)4);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new startPersistentEphemeralNode_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new startPersistentEphemeralNode_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public String path; // required
    public ByteBuffer data; // required
    /**
     * 
     * @see PersistentEphemeralNodeMode
     */
    public PersistentEphemeralNodeMode mode; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      PATH((short)2, "path"),
      DATA((short)3, "data"),
      /**
       * 
       * @see PersistentEphemeralNodeMode
       */
      MODE((short)4, "mode");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // PATH
            return PATH;
          case 3: // DATA
            return DATA;
          case 4: // MODE
            return MODE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , true)));
      tmpMap.put(_Fields.MODE, new org.apache.thrift.meta_data.FieldMetaData("mode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PersistentEphemeralNodeMode.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPersistentEphemeralNode_args.class, metaDataMap);
    }

    public startPersistentEphemeralNode_args() {
    }

    public startPersistentEphemeralNode_args(
      CuratorProjection projection,
      String path,
      ByteBuffer data,
      PersistentEphemeralNodeMode mode)
    {
      this();
      this.projection = projection;
      this.path = path;
      this.data = data;
      this.mode = mode;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public startPersistentEphemeralNode_args(startPersistentEphemeralNode_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetPath()) {
        this.path = other.path;
      }
      if (other.isSetData()) {
        this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);
;
      }
      if (other.isSetMode()) {
        this.mode = other.mode;
      }
    }

    public startPersistentEphemeralNode_args deepCopy() {
      return new startPersistentEphemeralNode_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.path = null;
      this.data = null;
      this.mode = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public startPersistentEphemeralNode_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public String getPath() {
      return this.path;
    }

    public startPersistentEphemeralNode_args setPath(String path) {
      this.path = path;
      return this;
    }

    public void unsetPath() {
      this.path = null;
    }

    /** Returns true if field path is set (has been assigned a value) and false otherwise */
    public boolean isSetPath() {
      return this.path != null;
    }

    public void setPathIsSet(boolean value) {
      if (!value) {
        this.path = null;
      }
    }

    public byte[] getData() {
      setData(org.apache.thrift.TBaseHelper.rightSize(data));
      return data == null ? null : data.array();
    }

    public ByteBuffer bufferForData() {
      return data;
    }

    public startPersistentEphemeralNode_args setData(byte[] data) {
      setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data));
      return this;
    }

    public startPersistentEphemeralNode_args setData(ByteBuffer data) {
      this.data = data;
      return this;
    }

    public void unsetData() {
      this.data = null;
    }

    /** Returns true if field data is set (has been assigned a value) and false otherwise */
    public boolean isSetData() {
      return this.data != null;
    }

    public void setDataIsSet(boolean value) {
      if (!value) {
        this.data = null;
      }
    }

    /**
     * 
     * @see PersistentEphemeralNodeMode
     */
    public PersistentEphemeralNodeMode getMode() {
      return this.mode;
    }

    /**
     * 
     * @see PersistentEphemeralNodeMode
     */
    public startPersistentEphemeralNode_args setMode(PersistentEphemeralNodeMode mode) {
      this.mode = mode;
      return this;
    }

    public void unsetMode() {
      this.mode = null;
    }

    /** Returns true if field mode is set (has been assigned a value) and false otherwise */
    public boolean isSetMode() {
      return this.mode != null;
    }

    public void setModeIsSet(boolean value) {
      if (!value) {
        this.mode = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case PATH:
        if (value == null) {
          unsetPath();
        } else {
          setPath((String)value);
        }
        break;

      case DATA:
        if (value == null) {
          unsetData();
        } else {
          setData((ByteBuffer)value);
        }
        break;

      case MODE:
        if (value == null) {
          unsetMode();
        } else {
          setMode((PersistentEphemeralNodeMode)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case PATH:
        return getPath();

      case DATA:
        return getData();

      case MODE:
        return getMode();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case PATH:
        return isSetPath();
      case DATA:
        return isSetData();
      case MODE:
        return isSetMode();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof startPersistentEphemeralNode_args)
        return this.equals((startPersistentEphemeralNode_args)that);
      return false;
    }

    public boolean equals(startPersistentEphemeralNode_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_path = true && this.isSetPath();
      boolean that_present_path = true && that.isSetPath();
      if (this_present_path || that_present_path) {
        if (!(this_present_path && that_present_path))
          return false;
        if (!this.path.equals(that.path))
          return false;
      }

      boolean this_present_data = true && this.isSetData();
      boolean that_present_data = true && that.isSetData();
      if (this_present_data || that_present_data) {
        if (!(this_present_data && that_present_data))
          return false;
        if (!this.data.equals(that.data))
          return false;
      }

      boolean this_present_mode = true && this.isSetMode();
      boolean that_present_mode = true && that.isSetMode();
      if (this_present_mode || that_present_mode) {
        if (!(this_present_mode && that_present_mode))
          return false;
        if (!this.mode.equals(that.mode))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(startPersistentEphemeralNode_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPath()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetData()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMode()).compareTo(other.isSetMode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMode()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mode, other.mode);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("startPersistentEphemeralNode_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("path:");
      if (this.path == null) {
        sb.append("null");
      } else {
        sb.append(this.path);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("data:");
      if (this.data == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.data, sb);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("mode:");
      if (this.mode == null) {
        sb.append("null");
      } else {
        sb.append(this.mode);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class startPersistentEphemeralNode_argsStandardSchemeFactory implements SchemeFactory {
      public startPersistentEphemeralNode_argsStandardScheme getScheme() {
        return new startPersistentEphemeralNode_argsStandardScheme();
      }
    }

    private static class startPersistentEphemeralNode_argsStandardScheme extends StandardScheme<startPersistentEphemeralNode_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, startPersistentEphemeralNode_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // PATH
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.path = iprot.readString();
                struct.setPathIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // DATA
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.data = iprot.readBinary();
                struct.setDataIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // MODE
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.mode = PersistentEphemeralNodeMode.findByValue(iprot.readI32());
                struct.setModeIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, startPersistentEphemeralNode_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.path != null) {
          oprot.writeFieldBegin(PATH_FIELD_DESC);
          oprot.writeString(struct.path);
          oprot.writeFieldEnd();
        }
        if (struct.data != null) {
          oprot.writeFieldBegin(DATA_FIELD_DESC);
          oprot.writeBinary(struct.data);
          oprot.writeFieldEnd();
        }
        if (struct.mode != null) {
          oprot.writeFieldBegin(MODE_FIELD_DESC);
          oprot.writeI32(struct.mode.getValue());
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class startPersistentEphemeralNode_argsTupleSchemeFactory implements SchemeFactory {
      public startPersistentEphemeralNode_argsTupleScheme getScheme() {
        return new startPersistentEphemeralNode_argsTupleScheme();
      }
    }

    private static class startPersistentEphemeralNode_argsTupleScheme extends TupleScheme<startPersistentEphemeralNode_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, startPersistentEphemeralNode_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetPath()) {
          optionals.set(1);
        }
        if (struct.isSetData()) {
          optionals.set(2);
        }
        if (struct.isSetMode()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetPath()) {
          oprot.writeString(struct.path);
        }
        if (struct.isSetData()) {
          oprot.writeBinary(struct.data);
        }
        if (struct.isSetMode()) {
          oprot.writeI32(struct.mode.getValue());
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, startPersistentEphemeralNode_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.path = iprot.readString();
          struct.setPathIsSet(true);
        }
        if (incoming.get(2)) {
          struct.data = iprot.readBinary();
          struct.setDataIsSet(true);
        }
        if (incoming.get(3)) {
          struct.mode = PersistentEphemeralNodeMode.findByValue(iprot.readI32());
          struct.setModeIsSet(true);
        }
      }
    }

  }

  public static class startPersistentEphemeralNode_result implements org.apache.thrift.TBase<startPersistentEphemeralNode_result, startPersistentEphemeralNode_result._Fields>, java.io.Serializable, Cloneable, Comparable<startPersistentEphemeralNode_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPersistentEphemeralNode_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new startPersistentEphemeralNode_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new startPersistentEphemeralNode_resultTupleSchemeFactory());
    }

    public PersistentEphemeralNodeProjection success; // required
    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PersistentEphemeralNodeProjection.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPersistentEphemeralNode_result.class, metaDataMap);
    }

    public startPersistentEphemeralNode_result() {
    }

    public startPersistentEphemeralNode_result(
      PersistentEphemeralNodeProjection success,
      CuratorException ex1)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public startPersistentEphemeralNode_result(startPersistentEphemeralNode_result other) {
      if (other.isSetSuccess()) {
        this.success = new PersistentEphemeralNodeProjection(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public startPersistentEphemeralNode_result deepCopy() {
      return new startPersistentEphemeralNode_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
    }

    public PersistentEphemeralNodeProjection getSuccess() {
      return this.success;
    }

    public startPersistentEphemeralNode_result setSuccess(PersistentEphemeralNodeProjection success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public startPersistentEphemeralNode_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((PersistentEphemeralNodeProjection)value);
        }
        break;

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof startPersistentEphemeralNode_result)
        return this.equals((startPersistentEphemeralNode_result)that);
      return false;
    }

    public boolean equals(startPersistentEphemeralNode_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(startPersistentEphemeralNode_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("startPersistentEphemeralNode_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class startPersistentEphemeralNode_resultStandardSchemeFactory implements SchemeFactory {
      public startPersistentEphemeralNode_resultStandardScheme getScheme() {
        return new startPersistentEphemeralNode_resultStandardScheme();
      }
    }

    private static class startPersistentEphemeralNode_resultStandardScheme extends StandardScheme<startPersistentEphemeralNode_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, startPersistentEphemeralNode_result 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 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new PersistentEphemeralNodeProjection();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, startPersistentEphemeralNode_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class startPersistentEphemeralNode_resultTupleSchemeFactory implements SchemeFactory {
      public startPersistentEphemeralNode_resultTupleScheme getScheme() {
        return new startPersistentEphemeralNode_resultTupleScheme();
      }
    }

    private static class startPersistentEphemeralNode_resultTupleScheme extends TupleScheme<startPersistentEphemeralNode_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, startPersistentEphemeralNode_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, startPersistentEphemeralNode_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new PersistentEphemeralNodeProjection();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

  public static class sync_args implements org.apache.thrift.TBase<sync_args, sync_args._Fields>, java.io.Serializable, Cloneable, Comparable<sync_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sync_args");

    private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField ASYNC_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("asyncContext", org.apache.thrift.protocol.TType.STRING, (short)3);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new sync_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new sync_argsTupleSchemeFactory());
    }

    public CuratorProjection projection; // required
    public String path; // required
    public String asyncContext; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      PROJECTION((short)1, "projection"),
      PATH((short)2, "path"),
      ASYNC_CONTEXT((short)3, "asyncContext");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROJECTION
            return PROJECTION;
          case 2: // PATH
            return PATH;
          case 3: // ASYNC_CONTEXT
            return ASYNC_CONTEXT;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class)));
      tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.ASYNC_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("asyncContext", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sync_args.class, metaDataMap);
    }

    public sync_args() {
    }

    public sync_args(
      CuratorProjection projection,
      String path,
      String asyncContext)
    {
      this();
      this.projection = projection;
      this.path = path;
      this.asyncContext = asyncContext;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public sync_args(sync_args other) {
      if (other.isSetProjection()) {
        this.projection = new CuratorProjection(other.projection);
      }
      if (other.isSetPath()) {
        this.path = other.path;
      }
      if (other.isSetAsyncContext()) {
        this.asyncContext = other.asyncContext;
      }
    }

    public sync_args deepCopy() {
      return new sync_args(this);
    }

    @Override
    public void clear() {
      this.projection = null;
      this.path = null;
      this.asyncContext = null;
    }

    public CuratorProjection getProjection() {
      return this.projection;
    }

    public sync_args setProjection(CuratorProjection projection) {
      this.projection = projection;
      return this;
    }

    public void unsetProjection() {
      this.projection = null;
    }

    /** Returns true if field projection is set (has been assigned a value) and false otherwise */
    public boolean isSetProjection() {
      return this.projection != null;
    }

    public void setProjectionIsSet(boolean value) {
      if (!value) {
        this.projection = null;
      }
    }

    public String getPath() {
      return this.path;
    }

    public sync_args setPath(String path) {
      this.path = path;
      return this;
    }

    public void unsetPath() {
      this.path = null;
    }

    /** Returns true if field path is set (has been assigned a value) and false otherwise */
    public boolean isSetPath() {
      return this.path != null;
    }

    public void setPathIsSet(boolean value) {
      if (!value) {
        this.path = null;
      }
    }

    public String getAsyncContext() {
      return this.asyncContext;
    }

    public sync_args setAsyncContext(String asyncContext) {
      this.asyncContext = asyncContext;
      return this;
    }

    public void unsetAsyncContext() {
      this.asyncContext = null;
    }

    /** Returns true if field asyncContext is set (has been assigned a value) and false otherwise */
    public boolean isSetAsyncContext() {
      return this.asyncContext != null;
    }

    public void setAsyncContextIsSet(boolean value) {
      if (!value) {
        this.asyncContext = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROJECTION:
        if (value == null) {
          unsetProjection();
        } else {
          setProjection((CuratorProjection)value);
        }
        break;

      case PATH:
        if (value == null) {
          unsetPath();
        } else {
          setPath((String)value);
        }
        break;

      case ASYNC_CONTEXT:
        if (value == null) {
          unsetAsyncContext();
        } else {
          setAsyncContext((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PROJECTION:
        return getProjection();

      case PATH:
        return getPath();

      case ASYNC_CONTEXT:
        return getAsyncContext();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case PROJECTION:
        return isSetProjection();
      case PATH:
        return isSetPath();
      case ASYNC_CONTEXT:
        return isSetAsyncContext();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof sync_args)
        return this.equals((sync_args)that);
      return false;
    }

    public boolean equals(sync_args that) {
      if (that == null)
        return false;

      boolean this_present_projection = true && this.isSetProjection();
      boolean that_present_projection = true && that.isSetProjection();
      if (this_present_projection || that_present_projection) {
        if (!(this_present_projection && that_present_projection))
          return false;
        if (!this.projection.equals(that.projection))
          return false;
      }

      boolean this_present_path = true && this.isSetPath();
      boolean that_present_path = true && that.isSetPath();
      if (this_present_path || that_present_path) {
        if (!(this_present_path && that_present_path))
          return false;
        if (!this.path.equals(that.path))
          return false;
      }

      boolean this_present_asyncContext = true && this.isSetAsyncContext();
      boolean that_present_asyncContext = true && that.isSetAsyncContext();
      if (this_present_asyncContext || that_present_asyncContext) {
        if (!(this_present_asyncContext && that_present_asyncContext))
          return false;
        if (!this.asyncContext.equals(that.asyncContext))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(sync_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProjection()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPath()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAsyncContext()).compareTo(other.isSetAsyncContext());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAsyncContext()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asyncContext, other.asyncContext);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("sync_args(");
      boolean first = true;

      sb.append("projection:");
      if (this.projection == null) {
        sb.append("null");
      } else {
        sb.append(this.projection);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("path:");
      if (this.path == null) {
        sb.append("null");
      } else {
        sb.append(this.path);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("asyncContext:");
      if (this.asyncContext == null) {
        sb.append("null");
      } else {
        sb.append(this.asyncContext);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (projection != null) {
        projection.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class sync_argsStandardSchemeFactory implements SchemeFactory {
      public sync_argsStandardScheme getScheme() {
        return new sync_argsStandardScheme();
      }
    }

    private static class sync_argsStandardScheme extends StandardScheme<sync_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, sync_args 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: // PROJECTION
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.projection = new CuratorProjection();
                struct.projection.read(iprot);
                struct.setProjectionIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // PATH
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.path = iprot.readString();
                struct.setPathIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ASYNC_CONTEXT
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.asyncContext = iprot.readString();
                struct.setAsyncContextIsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, sync_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.projection != null) {
          oprot.writeFieldBegin(PROJECTION_FIELD_DESC);
          struct.projection.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.path != null) {
          oprot.writeFieldBegin(PATH_FIELD_DESC);
          oprot.writeString(struct.path);
          oprot.writeFieldEnd();
        }
        if (struct.asyncContext != null) {
          oprot.writeFieldBegin(ASYNC_CONTEXT_FIELD_DESC);
          oprot.writeString(struct.asyncContext);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class sync_argsTupleSchemeFactory implements SchemeFactory {
      public sync_argsTupleScheme getScheme() {
        return new sync_argsTupleScheme();
      }
    }

    private static class sync_argsTupleScheme extends TupleScheme<sync_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, sync_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetProjection()) {
          optionals.set(0);
        }
        if (struct.isSetPath()) {
          optionals.set(1);
        }
        if (struct.isSetAsyncContext()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetProjection()) {
          struct.projection.write(oprot);
        }
        if (struct.isSetPath()) {
          oprot.writeString(struct.path);
        }
        if (struct.isSetAsyncContext()) {
          oprot.writeString(struct.asyncContext);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, sync_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.projection = new CuratorProjection();
          struct.projection.read(iprot);
          struct.setProjectionIsSet(true);
        }
        if (incoming.get(1)) {
          struct.path = iprot.readString();
          struct.setPathIsSet(true);
        }
        if (incoming.get(2)) {
          struct.asyncContext = iprot.readString();
          struct.setAsyncContextIsSet(true);
        }
      }
    }

  }

  public static class sync_result implements org.apache.thrift.TBase<sync_result, sync_result._Fields>, java.io.Serializable, Cloneable, Comparable<sync_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sync_result");

    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new sync_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new sync_resultTupleSchemeFactory());
    }

    public CuratorException ex1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      EX1((short)1, "ex1");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX1
            return EX1;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sync_result.class, metaDataMap);
    }

    public sync_result() {
    }

    public sync_result(
      CuratorException ex1)
    {
      this();
      this.ex1 = ex1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public sync_result(sync_result other) {
      if (other.isSetEx1()) {
        this.ex1 = new CuratorException(other.ex1);
      }
    }

    public sync_result deepCopy() {
      return new sync_result(this);
    }

    @Override
    public void clear() {
      this.ex1 = null;
    }

    public CuratorException getEx1() {
      return this.ex1;
    }

    public sync_result setEx1(CuratorException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

    /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */
    public boolean isSetEx1() {
      return this.ex1 != null;
    }

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((CuratorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case EX1:
        return getEx1();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case EX1:
        return isSetEx1();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof sync_result)
        return this.equals((sync_result)that);
      return false;
    }

    public boolean equals(sync_result that) {
      if (that == null)
        return false;

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(sync_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
      }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("sync_result(");
      boolean first = true;

      sb.append("ex1:");
      if (this.ex1 == null) {
        sb.append("null");
      } else {
        sb.append(this.ex1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class sync_resultStandardSchemeFactory implements SchemeFactory {
      public sync_resultStandardScheme getScheme() {
        return new sync_resultStandardScheme();
      }
    }

    private static class sync_resultStandardScheme extends StandardScheme<sync_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, sync_result 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: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new CuratorException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(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();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, sync_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class sync_resultTupleSchemeFactory implements SchemeFactory {
      public sync_resultTupleScheme getScheme() {
        return new sync_resultTupleScheme();
      }
    }

    private static class sync_resultTupleScheme extends TupleScheme<sync_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, sync_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetEx1()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, sync_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.ex1 = new CuratorException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
      }
    }

  }

}
